2011-05-28 17:30:00 +00:00
|
|
|
(function( $ ) {
|
2010-04-15 07:45:35 +00:00
|
|
|
|
2011-05-28 17:30:00 +00:00
|
|
|
module( "tooltip: core" );
|
2010-04-15 07:45:35 +00:00
|
|
|
|
2011-05-28 19:43:22 +00:00
|
|
|
test( "markup structure", function() {
|
|
|
|
expect( 6 );
|
|
|
|
var element = $( "#tooltipped1" ).tooltip(),
|
|
|
|
tooltip = $( ".ui-tooltip" );
|
2010-04-15 07:45:35 +00:00
|
|
|
|
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
|
2012-03-10 14:38:30 +00:00
|
|
|
expect( 0 );
|
2011-05-28 19:43:22 +00:00
|
|
|
});
|
2010-04-15 07:45:35 +00:00
|
|
|
|
2011-05-28 17:30:00 +00:00
|
|
|
}( jQuery ) );
|