aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/tabs
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/tabs
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/tabs')
-rw-r--r--tests/unit/tabs/tabs_options.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/unit/tabs/tabs_options.js b/tests/unit/tabs/tabs_options.js
index c78c42b58..02a2fea34 100644
--- a/tests/unit/tabs/tabs_options.js
+++ b/tests/unit/tabs/tabs_options.js
@@ -144,24 +144,40 @@ test( "{ collapsible: true }", function() {
});
test( "disabled", function() {
- expect( 10 );
+ expect( 22 );
// fully enabled by default
var element = $( "#tabs1" ).tabs();
disabled( element, false );
+ ok( !element.tabs( "widget" ).hasClass( "ui-state-disabled" ), "after: wrapper doesn't have ui-state-disabled class" );
+ ok( !element.tabs( "widget" ).hasClass( "ui-tabs-disabled" ), "after: wrapper doesn't have ui-tabs-disabled class" );
+ ok( !element.tabs( "widget" ).attr( "aria-disabled" ), "after: wrapper doesn't have aria-disabled attr" );
+
// disable single tab
element.tabs( "option", "disabled", [ 1 ] );
disabled( element, [ 1 ] );
+ ok( !element.tabs( "widget" ).hasClass( "ui-state-disabled" ), "after: wrapper doesn't have ui-state-disabled class" );
+ ok( !element.tabs( "widget" ).hasClass( "ui-tabs-disabled" ), "after: wrapper doesn't have ui-tabs-disabled class" );
+ ok( !element.tabs( "widget" ).attr( "aria-disabled" ), "after: wrapper doesn't have aria-disabled attr" );
+
// disabled active tab
element.tabs( "option", "disabled", [ 0, 1 ] );
disabled( element, [ 0, 1 ] );
+ ok( !element.tabs( "widget" ).hasClass( "ui-state-disabled" ), "after: wrapper doesn't have ui-state-disabled class" );
+ ok( !element.tabs( "widget" ).hasClass( "ui-tabs-disabled" ), "after: wrapper doesn't have ui-tabs-disabled class" );
+ ok( !element.tabs( "widget" ).attr( "aria-disabled" ), "after: wrapper doesn't have aria-disabled attr" );
+
// disable all tabs
element.tabs( "option", "disabled", [ 0, 1, 2 ] );
disabled( element, true );
+ ok( !element.tabs( "widget" ).hasClass( "ui-state-disabled" ), "after: wrapper doesn't have ui-state-disabled class" );
+ ok( !element.tabs( "widget" ).hasClass( "ui-tabs-disabled" ), "after: wrapper doesn't have ui-tabs-disabled class" );
+ ok( !element.tabs( "widget" ).attr( "aria-disabled" ), "after: wrapper doesn't have aria-disabled attr" );
+
// enable all tabs
element.tabs( "option", "disabled", [] );
disabled( element, false );