diff options
author | kborchers <kris.borchers@gmail.com> | 2012-04-19 23:50:52 -0500 |
---|---|---|
committer | kborchers <kris.borchers@gmail.com> | 2012-04-19 23:50:52 -0500 |
commit | 33df9b788d3f60459c43acbfefdfeef8a07ce632 (patch) | |
tree | 424b071d4f31182e4b252f3a5116b67fdf7bf7e1 /tests | |
parent | 00306d6bbdf6c12ae1499ec090ef62dfd1a59ec5 (diff) | |
download | jquery-ui-33df9b788d3f60459c43acbfefdfeef8a07ce632.tar.gz jquery-ui-33df9b788d3f60459c43acbfefdfeef8a07ce632.zip |
Menu tests: Update tests to test mouseenter instead of mouseover
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/menu/menu_events.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js index a0051c70b..4cb083240 100644 --- a/tests/unit/menu/menu_events.js +++ b/tests/unit/menu/menu_events.js @@ -87,11 +87,12 @@ test( "handle blur on custom item menu: click", function() { asyncTest( "handle submenu auto collapse: mouseleave", function() { expect( 4 ); - var $menu = $( "#menu2" ).menu(); + var $menu = $( "#menu2" ).menu(), + event = $.Event( "mouseenter" ); function menumouseleave1() { equal( $menu.find( "ul[aria-expanded='true']" ).length, 1, "first submenu expanded" ); - $menu.find( "li:nth-child(7) li:first" ).trigger( "mouseover" ); + $menu.menu( "focus", event, $menu.find( "li:nth-child(7) li:first" ) ); setTimeout( menumouseleave2, 350 ); } function menumouseleave2() { @@ -109,17 +110,18 @@ asyncTest( "handle submenu auto collapse: mouseleave", function() { start(); } - $menu.find( "li:nth-child(7)" ).trigger( "mouseover" ); + $menu.find( "li:nth-child(7)" ).trigger( "mouseenter" ); setTimeout( menumouseleave1, 350 ); }); asyncTest( "handle submenu auto collapse: mouseleave", function() { expect( 4 ); - var $menu = $( "#menu5" ).menu( { menus: "div" } ); + var $menu = $( "#menu5" ).menu( { menus: "div" } ), + event = $.Event( "mouseenter" ); function menumouseleave1() { equal( $menu.find( "div[aria-expanded='true']" ).length, 1, "first submenu expanded" ); - $menu.find( ":nth-child(7)" ).find( "div" ).eq( 0 ).children().eq( 0 ).trigger( "mouseover" ); + $menu.menu( "focus", event, $menu.find( ":nth-child(7)" ).find( "div" ).eq( 0 ).children().eq( 0 ) ); setTimeout( menumouseleave2, 350 ); } function menumouseleave2() { @@ -137,7 +139,7 @@ asyncTest( "handle submenu auto collapse: mouseleave", function() { start(); } - $menu.find( ":nth-child(7)" ).trigger( "mouseover" ); + $menu.find( ":nth-child(7)" ).trigger( "mouseenter" ); setTimeout( menumouseleave1, 350 ); }); |