aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/menu/menu_methods.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/menu/menu_methods.js')
-rw-r--r--tests/unit/menu/menu_methods.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js
index cd6728266..0835f61ec 100644
--- a/tests/unit/menu/menu_methods.js
+++ b/tests/unit/menu/menu_methods.js
@@ -12,36 +12,36 @@ module( "menu: methods", {
test( "enable/disable", function() {
expect( 3 );
- var menu = $( "#menu1" ).menu({
+ var element = $( "#menu1" ).menu({
select: function( event, ui ) {
log();
}
});
- menu.menu( "disable" );
- ok(menu.is( ".ui-state-disabled" ),"Missing ui-state-disabled class" );
+ element.menu( "disable" );
+ ok( element.is( ".ui-state-disabled" ), "Missing ui-state-disabled class" );
log( "click", true );
- click( menu, "1" );
+ click( element, "1" );
log( "afterclick" );
- menu.menu( "enable" );
- ok(menu.not( ".ui-state-disabled" ),"Has ui-state-disabled class" );
+ element.menu( "enable" );
+ ok( element.not( ".ui-state-disabled" ), "Has ui-state-disabled class" );
log( "click" );
- click( menu, "1" );
+ click( element, "1" );
log( "afterclick" );
equal( logOutput(), "click,afterclick,click,1,afterclick", "Click order not valid." );
});
test( "refresh", function() {
expect( 5 );
- var menu = $( "#menu1" ).menu();
- equal( menu.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" );
- menu.append( "<li><a href='#'>test item</a></li>" ).menu( "refresh" );
- equal( menu.find( ".ui-menu-item" ).length, 6, "Incorrect number of menu items" );
- menu.find( ".ui-menu-item:last" ).remove().end().menu( "refresh" );
- equal( menu.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" );
- menu.append( "<li>---</li>" ).menu( "refresh" );
- equal( menu.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" );
- menu.children( ":last" ).remove().end().menu( "refresh" );
- equal( menu.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" );
+ var element = $( "#menu1" ).menu();
+ equal( element.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" );
+ element.append( "<li><a href='#'>test item</a></li>" ).menu( "refresh" );
+ equal( element.find( ".ui-menu-item" ).length, 6, "Incorrect number of menu items" );
+ element.find( ".ui-menu-item:last" ).remove().end().menu( "refresh" );
+ equal( element.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" );
+ element.append( "<li>---</li>" ).menu( "refresh" );
+ equal( element.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" );
+ element.children( ":last" ).remove().end().menu( "refresh" );
+ equal( element.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" );
});
test( "destroy", function() {