aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable/draggable_methods.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2013-03-14 19:08:21 -0400
committerScott González <scott.gonzalez@gmail.com>2013-03-14 19:08:21 -0400
commit44d07173db32b498e5f83f60db290ff1463daee3 (patch)
tree59537f38aae5d3aed4a1a491d0ebfb3635ba8768 /tests/unit/draggable/draggable_methods.js
parentdb27541b3ccc8af8c558915d99bcf544d4afacc7 (diff)
downloadjquery-ui-44d07173db32b498e5f83f60db290ff1463daee3.tar.gz
jquery-ui-44d07173db32b498e5f83f60db290ff1463daee3.zip
Widget: Stop setting ui-state-disabled and aria by default on setting disabled option.
Fixes #5973 - Resizable: disabled should not have the ui-state-disabled class or aria attribute aria-disabled Fixes #5974 - Draggable: disabled should not have the ui-state-disabled class or aria attribute aria-disabled Fixes #6039 - Droppable: disabled should not have ui-state-disabled This reverts commit 23771d38ba9d2663f6db0243c8e992dc7ff6844a.
Diffstat (limited to 'tests/unit/draggable/draggable_methods.js')
-rw-r--r--tests/unit/draggable/draggable_methods.js14
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" );
});