diff options
Diffstat (limited to 'tests/unit/tooltip')
-rw-r--r-- | tests/unit/tooltip/tooltip_common.js | 1 | ||||
-rw-r--r-- | tests/unit/tooltip/tooltip_core.js | 5 | ||||
-rw-r--r-- | tests/unit/tooltip/tooltip_methods.js | 5 | ||||
-rw-r--r-- | tests/unit/tooltip/tooltip_options.js | 3 |
4 files changed, 12 insertions, 2 deletions
diff --git a/tests/unit/tooltip/tooltip_common.js b/tests/unit/tooltip/tooltip_common.js index d12ee9519..6d503aecd 100644 --- a/tests/unit/tooltip/tooltip_common.js +++ b/tests/unit/tooltip/tooltip_common.js @@ -11,6 +11,7 @@ TestHelpers.commonWidgetTests( "tooltip", { }, show: true, tooltipClass: null, + track: false, // callbacks close: null, diff --git a/tests/unit/tooltip/tooltip_core.js b/tests/unit/tooltip/tooltip_core.js index 1c8817aa8..2b39253a2 100644 --- a/tests/unit/tooltip/tooltip_core.js +++ b/tests/unit/tooltip/tooltip_core.js @@ -34,7 +34,10 @@ test( "accessibility", function() { equal( element.attr( "aria-describedby" ), "fixture-span " + tooltipId, "multiple describedby when open" ); // strictEqual to distinguish between .removeAttr( "title" ) and .attr( "title", "" ) - strictEqual( element.attr( "title" ), undefined, "no title when open" ); + // support: jQuery <1.6.2 + // support: IE <8 + // We should use strictEqual( ..., undefined ) when dropping jQuery 1.6.1 support (or IE6/7) + ok( !element.attr( "title" ), "no title when open" ); element.tooltip( "close" ); equal( element.attr( "aria-describedby" ), "fixture-span", "correct describedby when closed" ); diff --git a/tests/unit/tooltip/tooltip_methods.js b/tests/unit/tooltip/tooltip_methods.js index 1b8cd2bf2..ef783cbd3 100644 --- a/tests/unit/tooltip/tooltip_methods.js +++ b/tests/unit/tooltip/tooltip_methods.js @@ -42,7 +42,10 @@ test( "enable/disable", function() { element.tooltip( "disable" ); equal( $( ".ui-tooltip" ).length, 0, "no tooltip when disabled" ); - equal( tooltip.attr( "title" ), undefined, "title removed on disable" ); + // support: jQuery <1.6.2 + // support: IE <8 + // We should use strictEqual( ..., undefined ) when dropping jQuery 1.6.1 support (or IE6/7) + ok( !tooltip.attr( "title" ), "title removed on disable" ); element.tooltip( "open" ); equal( $( ".ui-tooltip" ).length, 0, "open does nothing when disabled" ); diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js index a4ef9f472..771da6da7 100644 --- a/tests/unit/tooltip/tooltip_options.js +++ b/tests/unit/tooltip/tooltip_options.js @@ -3,11 +3,13 @@ module( "tooltip: options" ); test( "content: default", function() { + expect( 1 ); var element = $( "#tooltipped1" ).tooltip().tooltip( "open" ); deepEqual( $( "#" + element.data( "ui-tooltip-id" ) ).text(), "anchortitle" ); }); test( "content: return string", function() { + expect( 1 ); var element = $( "#tooltipped1" ).tooltip({ content: function() { return "customstring"; @@ -17,6 +19,7 @@ test( "content: return string", function() { }); test( "content: return jQuery", function() { + expect( 1 ); var element = $( "#tooltipped1" ).tooltip({ content: function() { return $( "<div>" ).html( "cu<b>s</b>tomstring" ); |