diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2013-11-15 12:51:10 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2013-11-15 12:51:10 +0100 |
commit | 3945a8f074e8b101a2cdcba4a3b1cdbe9a8356e2 (patch) | |
tree | 7af2d276b36386342d6ad4b03f5b4c631ee29288 /tests/unit/menu | |
parent | 0e5a2e126ab4179f1ec83e1e4e773058b49e336d (diff) | |
download | jquery-ui-3945a8f074e8b101a2cdcba4a3b1cdbe9a8356e2.tar.gz jquery-ui-3945a8f074e8b101a2cdcba4a3b1cdbe9a8356e2.zip |
Menu: Update unit test that regressed from style changes (see 9910e938aad1090339a2c7f60693093ee18aba82)
Diffstat (limited to 'tests/unit/menu')
-rw-r--r-- | tests/unit/menu/menu_common.js | 2 | ||||
-rw-r--r-- | tests/unit/menu/menu_events.js | 12 | ||||
-rw-r--r-- | tests/unit/menu/menu_options.js | 9 |
3 files changed, 10 insertions, 13 deletions
diff --git a/tests/unit/menu/menu_common.js b/tests/unit/menu/menu_common.js index 2404ebe02..099dd091e 100644 --- a/tests/unit/menu/menu_common.js +++ b/tests/unit/menu/menu_common.js @@ -7,7 +7,7 @@ TestHelpers.commonWidgetTests( "menu", { items: "> *", menus: "ul", position: { - my: "left top", + my: "left-1 top", at: "right top" }, role: "menu", diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js index 0b89b86ac..9d74b4bbb 100644 --- a/tests/unit/menu/menu_events.js +++ b/tests/unit/menu/menu_events.js @@ -389,15 +389,15 @@ asyncTest( "handle keyboard navigation on menu with scroll and without submenus" log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_DOWN } ); - equal( logOutput(), "keydown,10", "Keydown PAGE_DOWN" ); + equal( logOutput(), "keydown,11", "Keydown PAGE_DOWN" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_DOWN } ); - equal( logOutput(), "keydown,20", "Keydown PAGE_DOWN" ); + equal( logOutput(), "keydown,22", "Keydown PAGE_DOWN" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_UP } ); - equal( logOutput(), "keydown,10", "Keydown PAGE_UP" ); + equal( logOutput(), "keydown,11", "Keydown PAGE_UP" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_UP } ); @@ -484,15 +484,15 @@ asyncTest( "handle keyboard navigation on menu with scroll and with submenus", f function menukeyboard3() { log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_DOWN } ); - equal( logOutput(), "keydown,10", "Keydown PAGE_DOWN" ); + equal( logOutput(), "keydown,11", "Keydown PAGE_DOWN" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_DOWN } ); - equal( logOutput(), "keydown,20", "Keydown PAGE_DOWN" ); + equal( logOutput(), "keydown,22", "Keydown PAGE_DOWN" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_UP } ); - equal( logOutput(), "keydown,10", "Keydown PAGE_UP" ); + equal( logOutput(), "keydown,11", "Keydown PAGE_UP" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_UP } ); diff --git a/tests/unit/menu/menu_options.js b/tests/unit/menu/menu_options.js index 527cc4784..c76673345 100644 --- a/tests/unit/menu/menu_options.js +++ b/tests/unit/menu/menu_options.js @@ -66,13 +66,12 @@ test( "{ icons: { submenu: 'custom' } }", function() { test( "{ role: 'menu' } ", function() { var element = $( "#menu1" ).menu(), items = element.find( "li" ); - expect( 2 + 4 * items.length ); + expect( 2 + 3 * items.length ); equal( element.attr( "role" ), "menu" ); ok( items.length > 0, "number of menu items" ); items.each(function( item ) { ok( $( this ).hasClass( "ui-menu-item" ), "menu item ("+ item + ") class for item" ); equal( $( this ).attr( "role" ), "menuitem", "menu item ("+ item + ") role" ); - ok( $( this ).hasClass( "ui-corner-all" ), "class for menu item ("+ item + ")" ); equal( $( this ).attr( "tabindex" ), "-1", "tabindex for menu item ("+ item + ")" ); }); }); @@ -82,13 +81,12 @@ test( "{ role: 'listbox' } ", function() { role: "listbox" }), items = element.find( "li" ); - expect( 2 + 4 * items.length ); + expect( 2 + 3 * items.length ); equal( element.attr( "role" ), "listbox" ); ok( items.length > 0, "number of menu items" ); items.each(function( item ) { ok( $( this ).hasClass( "ui-menu-item" ), "menu item ("+ item + ") class for item" ); equal( $( this ).attr( "role" ), "option", "menu item ("+ item + ") role" ); - ok( $( this ).hasClass( "ui-corner-all" ), "class for menu item ("+ item + ")" ); equal( $( this ).attr( "tabindex" ), "-1", "tabindex for menu item ("+ item + ")" ); }); }); @@ -98,13 +96,12 @@ test( "{ role: null }", function() { role: null }), items = element.find( "li" ); - expect( 2 + 4 * items.length ); + expect( 2 + 3 * items.length ); strictEqual( element.attr( "role" ), undefined ); ok( items.length > 0, "number of menu items" ); items.each(function( item ) { ok( $( this ).hasClass( "ui-menu-item" ), "menu item ("+ item + ") class for item" ); equal( $( this ).attr( "role" ), undefined, "menu item ("+ item + ") role" ); - ok( $( this ).hasClass( "ui-corner-all" ), "class for menu item ("+ item + ")" ); equal( $( this ).attr( "tabindex" ), "-1", "tabindex for menu item ("+ item + ")" ); }); }); |