From 23771d38ba9d2663f6db0243c8e992dc7ff6844a Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 14 Mar 2013 15:07:06 -0400 Subject: Revert "Widget: Stop setting ui-state-disabled and aria by default on setting disabled option." This needs to wait for a major release. This reverts commit 4d67f4f34908a50ef88f95df4103ee001b777e45. --- tests/unit/selectable/selectable_methods.js | 36 ++++++++++++----------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'tests/unit/selectable') diff --git a/tests/unit/selectable/selectable_methods.js b/tests/unit/selectable/selectable_methods.js index 179d4ecd6..72f9bb28d 100644 --- a/tests/unit/selectable/selectable_methods.js +++ b/tests/unit/selectable/selectable_methods.js @@ -71,40 +71,34 @@ test("enable", function() { equal(actual, expected, "enable is chainable"); }); -test( "disable", function() { - expect( 6 ); - var chainable, +test("disable", function() { + expect(3); + var expected, actual, fired = false, - element = $( "#selectable1" ); + el = $("#selectable1"); - element.selectable({ + el.selectable({ disabled: false, - start: function() { - fired = true; - } + start: function() { fired = true; } }); - element.simulate( "drag", { + el.simulate( "drag", { dx: 20, dy: 20 }); - equal( fired, true, "start fired" ); - - chainable = element.selectable( "disable" ); + equal(fired, true, "start fired"); + el.selectable("disable"); fired = false; - element.simulate( "drag", { + el.simulate( "drag", { dx: 20, dy: 20 }); - equal( fired, false, "start fired" ); - - ok( !element.selectable( "widget" ).hasClass( "ui-state-disabled" ), "element does not get 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" ); - - element.selectable( "destroy" ); + equal(fired, false, "start fired"); + el.selectable("destroy"); - equal( chainable, element, "disable is chainable" ); + expected = $("
").selectable(); + actual = expected.selectable("disable"); + equal(actual, expected, "disable is chainable"); }); })(jQuery); -- cgit v1.2.3