aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/menu/menu_options.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/menu/menu_options.js')
-rw-r--r--tests/unit/menu/menu_options.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/unit/menu/menu_options.js b/tests/unit/menu/menu_options.js
index a25b59a2c..27c2fabb3 100644
--- a/tests/unit/menu/menu_options.js
+++ b/tests/unit/menu/menu_options.js
@@ -12,56 +12,56 @@ module( "menu: options", {
test( "{ disabled: true }", function() {
expect( 2 );
- var menu = $( "#menu1" ).menu({
+ var element = $( "#menu1" ).menu({
disabled: true,
select: function(event, ui) {
log();
}
});
- ok( menu.is( ".ui-state-disabled" ), "Missing ui-state-disabled class" );
+ ok( element.is( ".ui-state-disabled" ), "Missing ui-state-disabled class" );
log( "click", true );
- click( menu, "1" );
+ click( element, "1" );
log( "afterclick" );
equal( logOutput(), "click,afterclick", "Click order not valid." );
});
test( "{ disabled: false }", function() {
expect( 2 );
- var menu = $( "#menu1" ).menu({
+ var element = $( "#menu1" ).menu({
disabled: false,
select: function( event, ui ) {
log();
}
});
- ok( menu.not( ".ui-state-disabled" ), "Has ui-state-disabled class" );
+ ok( element.not( ".ui-state-disabled" ), "Has ui-state-disabled class" );
log( "click", true );
- click( menu, "1" );
+ click( element, "1" );
log( "afterclick" );
equal( logOutput(), "click,1,afterclick", "Click order not valid." );
});
test( "{ role: 'menu' } ", function () {
- var menu = $( "#menu1" ).menu(),
- items = menu.find( "li" );
+ var element = $( "#menu1" ).menu(),
+ items = element.find( "li" );
expect( 2 + 5 * items.length );
- equal( menu.attr( "role" ), "menu" );
+ 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" ), "presentation", "menu item ("+ item + ") role" );
equal( $( "a", this ).attr( "role" ), "menuitem", "menu item ("+ item + ") role" );
- ok( $( "a", this ).hasClass( "ui-corner-all" ), "a element class for menu item ("+ item + ") " );
- equal( $( "a", this ).attr( "tabindex" ), "-1", "a element tabindex for menu item ("+ item + ") " );
+ ok( $( "a", this ).hasClass( "ui-corner-all" ), "a element class for menu item ("+ item + ")" );
+ equal( $( "a", this ).attr( "tabindex" ), "-1", "a element tabindex for menu item ("+ item + ")" );
});
});
test( "{ role: 'listbox' } ", function () {
- var menu = $( "#menu1" ).menu({
+ var element = $( "#menu1" ).menu({
role: "listbox"
}),
- items = menu.find( "li" );
- expect(2 + items.length);
- equal( menu.attr( "role" ), "listbox" );
+ items = element.find( "li" );
+ expect( 2 + items.length );
+ equal( element.attr( "role" ), "listbox" );
ok( items.length > 0, "number of menu items" );
items.each(function( item ) {
equal( $( "a", this ).attr( "role" ), "option", "menu item ("+ item + ") role" );