diff options
Diffstat (limited to 'tests/unit/tooltip/tooltip_core.js')
-rw-r--r-- | tests/unit/tooltip/tooltip_core.js | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/tests/unit/tooltip/tooltip_core.js b/tests/unit/tooltip/tooltip_core.js index 247927df4..d18b85398 100644 --- a/tests/unit/tooltip/tooltip_core.js +++ b/tests/unit/tooltip/tooltip_core.js @@ -1,11 +1,26 @@ -/* - * tooltip_core.js - */ +(function( $ ) { +module( "tooltip: core" ); -(function($) { +test( "markup structure", function() { + expect( 6 ); + var element = $( "#tooltipped1" ).tooltip(), + tooltip = $( ".ui-tooltip" ); -module("tooltip: core"); + equal( element.attr( "aria-describedby" ), undefined, "no aria-describedby on init" ); + equal( tooltip.length, 0, "no tooltip on init" ); + element.tooltip( "open" ); + tooltip = $( "#" + element.attr( "aria-describedby" ) ); + equal( tooltip.length, 1, "tooltip exists" ); + ok( tooltip.hasClass( "ui-tooltip" ), "tooltip is .ui-tooltip" ); + equal( tooltip.length, 1, ".ui-tooltip exists" ); + equal( tooltip.find( ".ui-tooltip-content" ).length, 1, + ".ui-tooltip-content exists" ); +}); -})(jQuery); +test( "accessibility", function() { + // TODO: add tests +}); + +}( jQuery ) ); |