From 9d71547394f9464e5af1f0c77e56917d0ba5abb6 Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Wed, 3 Dec 2014 11:30:22 -0500 Subject: Tooltip: Add classes option Ref #7053 Ref gh-1411 --- tests/unit/tooltip/tooltip.html | 4 ++ tests/unit/tooltip/tooltip_common.js | 5 ++- tests/unit/tooltip/tooltip_common_deprecated.js | 24 +++++++++++ tests/unit/tooltip/tooltip_core.js | 6 +-- tests/unit/tooltip/tooltip_deprecated.html | 53 +++++++++++++++++++++++++ tests/unit/tooltip/tooltip_deprecated.js | 13 ++++++ tests/unit/tooltip/tooltip_options.js | 8 ---- 7 files changed, 100 insertions(+), 13 deletions(-) create mode 100644 tests/unit/tooltip/tooltip_common_deprecated.js create mode 100644 tests/unit/tooltip/tooltip_deprecated.html create mode 100644 tests/unit/tooltip/tooltip_deprecated.js (limited to 'tests/unit/tooltip') diff --git a/tests/unit/tooltip/tooltip.html b/tests/unit/tooltip/tooltip.html index 18bd88c2c..1a7b94ae2 100644 --- a/tests/unit/tooltip/tooltip.html +++ b/tests/unit/tooltip/tooltip.html @@ -5,10 +5,14 @@ jQuery UI Tooltip Test Suite + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ anchor + + aria-describedby + span + baz +
+ +
+ +
+ +
+ + diff --git a/tests/unit/tooltip/tooltip_deprecated.js b/tests/unit/tooltip/tooltip_deprecated.js new file mode 100644 index 000000000..426f583ec --- /dev/null +++ b/tests/unit/tooltip/tooltip_deprecated.js @@ -0,0 +1,13 @@ +(function( $ ) { + +module( "tooltip: (deprecated) options" ); + +test( "tooltipClass", function() { + expect( 1 ); + var element = $( "#tooltipped1" ).tooltip({ + tooltipClass: "custom" + }).tooltip( "open" ); + ok( $( "#" + element.data( "ui-tooltip-id" ) ).hasClass( "custom" ) ); +}); + +}( jQuery ) ); diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js index 32f739544..1d9d6b3f0 100644 --- a/tests/unit/tooltip/tooltip_options.js +++ b/tests/unit/tooltip/tooltip_options.js @@ -166,14 +166,6 @@ test( "items", function() { element.tooltip( "destroy" ); }); -test( "tooltipClass", function() { - expect( 1 ); - var element = $( "#tooltipped1" ).tooltip({ - tooltipClass: "custom" - }).tooltip( "open" ); - ok( $( "#" + element.data( "ui-tooltip-id" ) ).hasClass( "custom" ) ); -}); - test( "track + show delay", function() { expect( 2 ); var event, -- cgit v1.2.3