jquery-ui/tests/unit/tooltip/tooltip_core.js

28 lines
755 B
JavaScript
Raw Normal View History

2011-05-28 17:30:00 +00:00
(function( $ ) {
2011-05-28 17:30:00 +00:00
module( "tooltip: core" );
2011-05-28 19:43:22 +00:00
test( "markup structure", function() {
expect( 6 );
var element = $( "#tooltipped1" ).tooltip(),
tooltip = $( ".ui-tooltip" );
2011-05-28 19:43:22 +00:00
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" );
});
test( "accessibility", function() {
// TODO: add tests
expect( 0 );
2011-05-28 19:43:22 +00:00
});
2011-05-28 17:30:00 +00:00
}( jQuery ) );