diff options
-rw-r--r-- | tests/unit/selectable/selectable.html | 1 | ||||
-rw-r--r-- | tests/unit/selectable/selectable_methods.js | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/unit/selectable/selectable.html b/tests/unit/selectable/selectable.html index cc4edf909..024d28911 100644 --- a/tests/unit/selectable/selectable.html +++ b/tests/unit/selectable/selectable.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", "selectable" ], diff --git a/tests/unit/selectable/selectable_methods.js b/tests/unit/selectable/selectable_methods.js index 179d4ecd6..02c9ab075 100644 --- a/tests/unit/selectable/selectable_methods.js +++ b/tests/unit/selectable/selectable_methods.js @@ -71,7 +71,7 @@ test("enable", function() { equal(actual, expected, "enable is chainable"); }); -test( "disable", function() { +test( "disable", function( assert ) { expect( 6 ); var chainable, fired = false, @@ -98,9 +98,10 @@ test( "disable", function() { }); equal( fired, false, "start fired" ); - ok( !element.selectable( "widget" ).hasClass( "ui-state-disabled" ), "element does not get ui-state-disabled" ); + assert.lacksClasses( element.selectable( "widget" ), "ui-state-disabled" ); + ok( !element.selectable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" ); - ok( element.selectable( "widget" ).hasClass( "ui-selectable-disabled" ), "element gets ui-selectable-disabled" ); + assert.hasClasses( element.selectable( "widget" ), "ui-selectable-disabled" ); element.selectable( "destroy" ); |