mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tooltip: Added some tests.
This commit is contained in:
parent
e77fcaa6eb
commit
302ad626bf
@ -2,6 +2,25 @@
|
||||
|
||||
module( "tooltip: core" );
|
||||
|
||||
test( "markup structure", function() {
|
||||
expect( 6 );
|
||||
var element = $( "#tooltipped1" ).tooltip(),
|
||||
tooltip = $( ".ui-tooltip" );
|
||||
|
||||
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
|
||||
});
|
||||
|
||||
}( jQuery ) );
|
||||
|
Loading…
Reference in New Issue
Block a user