diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-05-28 17:36:57 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-05-28 17:36:57 -0400 |
commit | 4dbfdcede3878415dbf5c777e9e2ce17c6916edc (patch) | |
tree | c1ac1a1e003ae1c1a1ff62c40b42ca2944aa69b1 /tests/unit/tooltip/tooltip_methods.js | |
parent | c2ae4e3fe4be63906dd5da084cfb7fb812421283 (diff) | |
download | jquery-ui-4dbfdcede3878415dbf5c777e9e2ce17c6916edc.tar.gz jquery-ui-4dbfdcede3878415dbf5c777e9e2ce17c6916edc.zip |
Tooltip: Allow content updates via async response regardless of whether a sync response came back. Added more tests.
Diffstat (limited to 'tests/unit/tooltip/tooltip_methods.js')
-rw-r--r-- | tests/unit/tooltip/tooltip_methods.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/unit/tooltip/tooltip_methods.js b/tests/unit/tooltip/tooltip_methods.js index 1487672cb..b1b319d96 100644 --- a/tests/unit/tooltip/tooltip_methods.js +++ b/tests/unit/tooltip/tooltip_methods.js @@ -3,9 +3,14 @@ module( "tooltip: methods" ); test( "destroy", function() { + expect( 2 ); domEqual( "#tooltipped1", function() { $( "#tooltipped1" ).tooltip().tooltip( "destroy" ); }); + + // make sure that open tooltips are removed on destroy + $( "#tooltipped1" ).tooltip().tooltip( "open" ).tooltip( "destroy" ); + equal( $( ".ui-tooltip" ).length, 0 ); }); test( "open/close", function() { @@ -13,12 +18,11 @@ test( "open/close", function() { $.fx.off = true; var element = $( "#tooltipped1" ).tooltip(); equal( $( ".ui-tooltip" ).length, 0, "no tooltip on init" ); -$( ".ui-tooltip" ).each(function() { - console.log( $( this ).html() ); -}); + element.tooltip( "open" ); var tooltip = $( "#" + element.attr( "aria-describedby" ) ); ok( tooltip.is( ":visible" ) ); + element.tooltip( "close" ); ok( tooltip.is( ":hidden" ) ); $.fx.off = false; |