Skip to content

Commit

Permalink
Tooltip: Added missing items test
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Feb 11, 2011
1 parent cfa4833 commit c4a7f45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/unit/tooltip/tooltip.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ <h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests">
</ol>

<div id="main" style="position: absolute; top: -10000px; left: -10000px;">
<div id="qunit-fixture">
<div>
<a id="tooltipped1" href="#" title="anchortitle">anchor</a>
<input title="inputtitle" />
<span data-tooltip="text">span</span>
</div>
</div>

Expand Down
10 changes: 9 additions & 1 deletion tests/unit/tooltip/tooltip_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ module("tooltip: options", {


test("option: items", function() {
ok(false, "missing items test");
var event = $.Event("mouseenter");
event.target = $("[data-tooltip]");
$("#qunit-fixture").tooltip({
items: "[data-tooltip]",
content: function() {
return $(this).attr("data-tooltip");
}
}).tooltip("open", event);
same( $(".ui-tooltip").text(), "text" );
});

test("content: default", function() {
Expand Down

0 comments on commit c4a7f45

Please sign in to comment.