2015-04-06 18:33:25 +00:00
|
|
|
define( [
|
|
|
|
"jquery",
|
|
|
|
"ui/resizable"
|
|
|
|
], 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 );
|
|
|
|
|
|
|
|
var element = $( "#resizable1" ).resizable({ disabled: false }),
|
|
|
|
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" );
|
|
|
|
});
|
2009-02-02 14:36:08 +00:00
|
|
|
|
2015-04-06 18:33:25 +00:00
|
|
|
} );
|