diff options
Diffstat (limited to 'tests/unit/selectmenu/core.js')
-rw-r--r-- | tests/unit/selectmenu/core.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/unit/selectmenu/core.js b/tests/unit/selectmenu/core.js index 5431d689d..021f9b28a 100644 --- a/tests/unit/selectmenu/core.js +++ b/tests/unit/selectmenu/core.js @@ -6,7 +6,7 @@ define( [ module( "selectmenu: core" ); test( "markup structure", function( assert ) { - expect( 4 ); + expect( 5 ); var element = $( "#files" ).selectmenu(), button = element.selectmenu( "widget" ), @@ -16,6 +16,7 @@ test( "markup structure", function( assert ) { assert.hasClasses( button, "ui-selectmenu-button ui-selectmenu-button-closed ui-widget" ); assert.lacksClasses( button, "ui-selectmenu-button-open" ); + assert.lacksClasses( button, "ui-selectmenu-open" ); assert.hasClasses( menuWrap, "ui-selectmenu-menu" ); assert.lacksClasses( menuWrap, "ui-selectmenu-menu-open" ); } ); @@ -89,7 +90,7 @@ test( "_renderButtonItem()", function() { element.selectmenu( "refresh" ); option = element.find( "option:selected" ); equal( - option.text() + element[ 0 ].selectedIndex, + " " + option.text() + element[ 0 ].selectedIndex, button.text(), "refresh: button item text" ); @@ -98,7 +99,7 @@ test( "_renderButtonItem()", function() { menu.find( "li" ).last().simulate( "mouseover" ).trigger( "click" ); option = element.find( "option" ).last(); equal( - option.text() + element[ 0 ].selectedIndex, + " " + option.text() + element[ 0 ].selectedIndex, button.text(), "click: button item text" ); @@ -146,7 +147,7 @@ $.each( [ selected.val(), "original select state" ); - equal( button.text(), selected.text(), "button text" ); + equal( button.text(), " " + selected.text(), "button text" ); start(); } ); } ); @@ -181,7 +182,7 @@ $.each( [ selected.val(), "original select state" ); - equal( button.text(), selected.text(), "button text" ); + equal( button.text(), " " + selected.text(), "button text" ); start(); }, 1 ); } ); @@ -222,7 +223,7 @@ $.each( [ "button aria-activedescendant" ); equal( element.find( "option:selected" ).val(), options.eq( 1 ).val(), "original select state" ); - equal( button.text(), options.eq( 1 ).text(), "button text" ); + equal( button.text(), " " + options.eq( 1 ).text(), "button text" ); start(); } ); } ); |