diff options
Diffstat (limited to 'tests/unit/draggable/draggable_methods.js')
-rw-r--r-- | tests/unit/draggable/draggable_methods.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/unit/draggable/draggable_methods.js b/tests/unit/draggable/draggable_methods.js index 901c261d6..63a19e26d 100644 --- a/tests/unit/draggable/draggable_methods.js +++ b/tests/unit/draggable/draggable_methods.js @@ -74,16 +74,16 @@ test( "enable", function() { }); test( "disable", function() { - expect( 7 ); + expect( 10 ); - element = $("#draggable2").draggable({ disabled: false }); + element = $( "#draggable2" ).draggable({ disabled: false }); TestHelpers.draggable.shouldMove( element, ".draggable({ disabled: false })" ); - element.draggable("disable"); + element.draggable( "disable" ); TestHelpers.draggable.shouldNotMove( element, ".draggable('disable')" ); equal( element.draggable( "option", "disabled" ), true, "disabled option getter" ); - element.draggable("destroy"); + element.draggable( "destroy" ); element.draggable({ disabled: false }); TestHelpers.draggable.shouldMove( element, ".draggable({ disabled: false })" ); @@ -91,8 +91,12 @@ test( "disable", function() { equal( element.draggable( "option", "disabled" ), true, "disabled option setter" ); TestHelpers.draggable.shouldNotMove( element, ".draggable('option', 'disabled', true)" ); + ok( !element.draggable( "widget" ).hasClass( "ui-state-disabled" ), "element does not get ui-state-disabled" ); + ok( !element.draggable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" ); + ok( element.draggable( "widget" ).hasClass( "ui-draggable-disabled" ), "element gets ui-draggable-disabled" ); + var expected = element.draggable(), - actual = expected.draggable("disable"); + actual = expected.draggable( "disable" ); equal( actual, expected, "disable is chainable" ); }); |