aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/resizable/methods.js
blob: 8bdc08c11dd63d43aa4153a7ad1422e3f9b5f0b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
define( [
	"qunit",
	"jquery",
	"lib/helper",
	"ui/widgets/resizable"
], function( QUnit, $, helper ) {

QUnit.module( "resizable: methods", { afterEach: helper.moduleAfterEach }  );

QUnit.test( "disable", function( assert ) {
	assert.expect( 5 );

	var element = $( "#resizable1" ).resizable( { disabled: false } ),
		chainable = element.resizable( "disable" );

	assert.lacksClasses( element.resizable( "widget" ), "ui-state-disabled" );
	assert.ok( !element.resizable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" );
	assert.hasClasses( element.resizable( "widget" ), "ui-resizable-disabled" );
	assert.equal( element.resizable( "option", "disabled" ), true, "disabled option setter" );
	assert.equal( chainable, element, "disable is chainable" );
} );

} );