mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Tooltip: Unit test for nested tooltips
This commit is contained in:
parent
132e9f0c72
commit
78f781fccd
@ -43,7 +43,7 @@
|
|||||||
<input title="inputtitle">
|
<input title="inputtitle">
|
||||||
<span id="multiple-describedby" aria-describedby="fixture-span" title="...">aria-describedby</span>
|
<span id="multiple-describedby" aria-describedby="fixture-span" title="...">aria-describedby</span>
|
||||||
<span id="fixture-span" title="title-text">span</span>
|
<span id="fixture-span" title="title-text">span</span>
|
||||||
<span id="contains-tooltipped"><span id="contained-tooltipped" title="foobar">baz</span></span>
|
<span id="contains-tooltipped" title="parent"><span id="contained-tooltipped" title="child">baz</span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,4 +57,20 @@ test( "delegated removal", function() {
|
|||||||
equal( $( ".ui-tooltip" ).length, 0 );
|
equal( $( ".ui-tooltip" ).length, 0 );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test( "nested tooltips", function() {
|
||||||
|
expect( 2 );
|
||||||
|
|
||||||
|
var child = $( "#contained-tooltipped" ),
|
||||||
|
parent = $( "#contains-tooltipped" ).tooltip({
|
||||||
|
show: null,
|
||||||
|
hide: null
|
||||||
|
});
|
||||||
|
|
||||||
|
parent.trigger( "mouseover" );
|
||||||
|
equal( $( ".ui-tooltip:visible" ).text(), "parent" );
|
||||||
|
|
||||||
|
child.trigger( "mouseover" );
|
||||||
|
equal( $( ".ui-tooltip" ).text(), "child" );
|
||||||
|
});
|
||||||
|
|
||||||
}( jQuery ) );
|
}( jQuery ) );
|
||||||
|
Loading…
Reference in New Issue
Block a user