diff options
Diffstat (limited to 'tests/unit/selectmenu')
-rw-r--r-- | tests/unit/selectmenu/selectmenu.html | 1 | ||||
-rw-r--r-- | tests/unit/selectmenu/selectmenu_common.js | 5 | ||||
-rw-r--r-- | tests/unit/selectmenu/selectmenu_core.js | 15 |
3 files changed, 20 insertions, 1 deletions
diff --git a/tests/unit/selectmenu/selectmenu.html b/tests/unit/selectmenu/selectmenu.html index 618eea3d0..c9a399ad5 100644 --- a/tests/unit/selectmenu/selectmenu.html +++ b/tests/unit/selectmenu/selectmenu.html @@ -9,6 +9,7 @@ <script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/jquery-simulate/jquery.simulate.js"></script> <script src="../testsuite.js"></script> + <script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script> <script> TestHelpers.loadResources({ css: [ "core", "menu" , "selectmenu" ], diff --git a/tests/unit/selectmenu/selectmenu_common.js b/tests/unit/selectmenu/selectmenu_common.js index cb8712e7b..f741eaf27 100644 --- a/tests/unit/selectmenu/selectmenu_common.js +++ b/tests/unit/selectmenu/selectmenu_common.js @@ -1,7 +1,10 @@ TestHelpers.commonWidgetTests( "selectmenu", { defaults: { appendTo: null, - classes: {}, + classes: { + "ui-selectmenu-button-open": "ui-corner-top", + "ui-selectmenu-button-closed": "ui-corner-all" + }, disabled: null, icons: { button: "ui-icon-triangle-1-s" diff --git a/tests/unit/selectmenu/selectmenu_core.js b/tests/unit/selectmenu/selectmenu_core.js index 0a2431861..1116bd604 100644 --- a/tests/unit/selectmenu/selectmenu_core.js +++ b/tests/unit/selectmenu/selectmenu_core.js @@ -2,6 +2,21 @@ module( "selectmenu: core" ); +test( "markup structure", function( assert ) { + expect( 4 ); + + var element = $( "#files" ).selectmenu(), + button = element.selectmenu( "widget" ), + menu = element.selectmenu( "menuWidget" ), + menuWrap = menu.parent(); + + assert.hasClasses( button, + "ui-selectmenu-button ui-selectmenu-button-closed ui-widget" ); + assert.lacksClasses( button, "ui-selectmenu-button-open" ); + assert.hasClasses( menuWrap, "ui-selectmenu-menu" ); + assert.lacksClasses( menuWrap, "ui-selectmenu-menu-open" ); +}); + asyncTest( "accessibility", function() { var wrappers, button, menu, element = $( "#speed" ).attr( "title", "A demo title" ); |