diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2013-03-11 21:28:51 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2013-03-11 22:08:21 -0400 |
commit | 4d67f4f34908a50ef88f95df4103ee001b777e45 (patch) | |
tree | e14cd5bcc22a960ab65db9bd6567f9b8638ce272 /tests/unit/resizable | |
parent | 4f95a0f396965e91982f1b5e67da814bb6640ce1 (diff) | |
download | jquery-ui-4d67f4f34908a50ef88f95df4103ee001b777e45.tar.gz jquery-ui-4d67f4f34908a50ef88f95df4103ee001b777e45.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
Diffstat (limited to 'tests/unit/resizable')
-rw-r--r-- | tests/unit/resizable/resizable_methods.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/unit/resizable/resizable_methods.js b/tests/unit/resizable/resizable_methods.js index b12f3035a..abb8951f9 100644 --- a/tests/unit/resizable/resizable_methods.js +++ b/tests/unit/resizable/resizable_methods.js @@ -3,10 +3,19 @@ */ (function($) { -module("resizable: methods"); +module( "resizable: methods" ); -// this is here to make JSHint pass "unused", and we don't want to -// remove the parameter for when we finally implement -$.noop(); +test( "disable", function() { + expect( 5 ); + + var element = $( "#resizable1" ).resizable({ disabled: false }), + chainable = element.resizable( "disable" ); + + ok( !element.resizable( "widget" ).hasClass( "ui-state-disabled" ), "element does not get ui-state-disabled" ); + ok( !element.resizable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" ); + ok( element.resizable( "widget" ).hasClass( "ui-resizable-disabled" ), "element gets ui-resizable-disabled" ); + equal( element.resizable( "option", "disabled" ), true, "disabled option setter" ); + equal( chainable, element, "disable is chainable" ); +}); })(jQuery); |