jquery-ui/tests/unit/resizable/methods.js

23 lines
728 B
JavaScript
Raw Permalink Normal View History

define( [
2016-04-06 13:11:09 +00:00
"qunit",
"jquery",
"ui/widgets/resizable"
2016-04-06 13:11:09 +00:00
], function( QUnit, $ ) {
2016-04-06 13:11:09 +00:00
QUnit.module( "resizable: methods" );
2016-04-06 13:11:09 +00:00
QUnit.test( "disable", function( assert ) {
assert.expect( 5 );
2015-08-24 12:58:35 +00:00
var element = $( "#resizable1" ).resizable( { disabled: false } ),
chainable = element.resizable( "disable" );
assert.lacksClasses( element.resizable( "widget" ), "ui-state-disabled" );
2016-04-06 13:11:09 +00:00
assert.ok( !element.resizable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" );
assert.hasClasses( element.resizable( "widget" ), "ui-resizable-disabled" );
2016-04-06 13:11:09 +00:00
assert.equal( element.resizable( "option", "disabled" ), true, "disabled option setter" );
assert.equal( chainable, element, "disable is chainable" );
2015-08-24 12:58:35 +00:00
} );
} );