aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorTJ VanToll <tj.vantoll@gmail.com>2013-06-13 13:47:07 -0700
committerTJ VanToll <tj.vantoll@gmail.com>2013-06-16 22:37:36 -0400
commit91b7b9f9ab2e5baa31e37f34600457599409e161 (patch)
treec3cfb261dcfc0c7cc5260ce28a27130f8966f447 /tests/unit
parentb5c41a2b33311d2de8f0b473cc454bd281ea0ad1 (diff)
downloadjquery-ui-91b7b9f9ab2e5baa31e37f34600457599409e161.tar.gz
jquery-ui-91b7b9f9ab2e5baa31e37f34600457599409e161.zip
Menu: Reset ui-menu-icons class in refresh. Fixes #9377: Menu: Refreshing should recheck for menu icons
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/menu/menu_methods.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js
index c51d123c2..5d390c0d7 100644
--- a/tests/unit/menu/menu_methods.js
+++ b/tests/unit/menu/menu_methods.js
@@ -69,6 +69,19 @@ test( "refresh submenu", function() {
equal( element.find( "ul:first .ui-menu-item" ).length, 4 );
});
+test( "refresh icons (see #9377)", function() {
+ expect( 3 );
+ var element = $( "#menu1" ).menu();
+ ok( !element.hasClass( "ui-menu-icons") );
+ element.find( "li:first a" ).html( '<span class="ui-icon ui-icon-disk"></span>Save</a>' );
+ element.menu( "refresh" );
+
+ ok( element.hasClass( "ui-menu-icons" ) );
+ element.find( "li:first a" ).html( "Save" );
+ element.menu( "refresh" );
+ ok( !element.hasClass( "ui-menu-icons") );
+});
+
test( "widget", function() {
expect( 2 );
var element = $( "#menu1" ).menu(),