aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/menu/menu_methods.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-06-27 09:49:56 -0400
committerScott González <scott.gonzalez@gmail.com>2012-06-27 09:49:56 -0400
commit9b6c1c5cdb18d76d9febfc079a1cc439dc3789b3 (patch)
tree62036061cfbd8873b47a6013f44e70b9ee11bcfd /tests/unit/menu/menu_methods.js
parent90050c7cee24078c968f98b33d466d864d97722b (diff)
downloadjquery-ui-9b6c1c5cdb18d76d9febfc079a1cc439dc3789b3.tar.gz
jquery-ui-9b6c1c5cdb18d76d9febfc079a1cc439dc3789b3.zip
Menu tests: Cleanup.
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() {