unit testing - jQuery UI Tooltip opens on changing content -


i've found bug in ui.tooltip: tooltip interrupts closing if content changing. here example.

please me make proper test, 1 fails time time on "tooltip hidden early":

asynctest( "content: change while close", function() {     expect( 2 );     $.fx.off = true     var tooltip,         hidingduration = 20,         element = $( "#tooltipped1" ).tooltip({             hide: hidingduration         });      element.tooltip( "open" );     tooltip = $( "#" + element.data( "ui-tooltip-id" ) );      $.fx.off = false;     element.tooltip( "close" );     settimeout( function() {         ok( tooltip.is( ":visible" ), "tooltip hidden early" );     }, hidingduration * 0.5 );      //element.tooltip({ content: 'foo' });     //tooltip = $( "#" + element.data( "ui-tooltip-id" ) );      settimeout( function() {         ok( !tooltip.is( ":visible" ), "tooltip doesn't hid properly" );         start();     }, hidingduration * 1.5 ); }); 


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -