diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-05 18:37:48 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-05 18:42:41 +0100 |
commit | 8b3e57024138f1a40be762fd5d29cc390129a8ad (patch) | |
tree | 9b5556664d298ffb136efc7a47347cf28cd05608 /tests | |
parent | 8bdf0359bbb3401c053fa453496ffd0c4b9f61bd (diff) | |
download | jquery-ui-8b3e57024138f1a40be762fd5d29cc390129a8ad.tar.gz jquery-ui-8b3e57024138f1a40be762fd5d29cc390129a8ad.zip |
Menu: Look into submenus for uninitialized menu items. Fixes #8773 - Menu: refresh() doesn't refresh existing submenus.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/menu/menu_methods.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js index c49783c3e..a7e78ea69 100644 --- a/tests/unit/menu/menu_methods.js +++ b/tests/unit/menu/menu_methods.js @@ -60,6 +60,15 @@ test( "refresh", function() { equal( element.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" ); }); +test( "refresh submenu", function() { + expect( 2 ); + var element = $( "#menu2" ).menu(); + equal( element.find( "ul:first .ui-menu-item" ).length, 3 ); + element.find( "ul" ).andSelf().append( "<li><a href=\"#\">New Item</a></li>" ); + element.menu("refresh"); + equal( element.find( "ul:first .ui-menu-item" ).length, 4 ); +}); + test( "widget", function() { expect( 2 ); var element = $( "#menu1" ).menu(), |