2015-04-06 18:33:25 +00:00
|
|
|
define( [
|
|
|
|
"jquery",
|
2015-07-15 02:05:00 +00:00
|
|
|
"ui/widgets/resizable"
|
2015-04-06 18:33:25 +00:00
|
|
|
], function( $ ) {
|
2009-02-02 14:36:08 +00:00
|
|
|
|
2013-03-14 23:08:21 +00:00
|
|
|
module( "resizable: methods" );
|
2009-02-02 14:36:08 +00:00
|
|
|
|
2015-01-30 14:59:26 +00:00
|
|
|
test( "disable", function( assert ) {
|
2013-03-14 23:08:21 +00:00
|
|
|
expect( 5 );
|
|
|
|
|
2015-08-24 12:58:35 +00:00
|
|
|
var element = $( "#resizable1" ).resizable( { disabled: false } ),
|
2013-03-14 23:08:21 +00:00
|
|
|
chainable = element.resizable( "disable" );
|
|
|
|
|
2015-01-30 14:59:26 +00:00
|
|
|
assert.lacksClasses( element.resizable( "widget" ), "ui-state-disabled" );
|
2013-03-14 23:08:21 +00:00
|
|
|
ok( !element.resizable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" );
|
2015-01-30 14:59:26 +00:00
|
|
|
assert.hasClasses( element.resizable( "widget" ), "ui-resizable-disabled" );
|
2013-03-14 23:08:21 +00:00
|
|
|
equal( element.resizable( "option", "disabled" ), true, "disabled option setter" );
|
|
|
|
equal( chainable, element, "disable is chainable" );
|
2015-08-24 12:58:35 +00:00
|
|
|
} );
|
2009-02-02 14:36:08 +00:00
|
|
|
|
2015-04-06 18:33:25 +00:00
|
|
|
} );
|