<meta charset="utf-8">
<title>jQuery UI Droppable Test Suite</title>
- <script src="../../jquery.js"></script>
- <script>
- $.uiBackCompat = false;
- </script>
- <link rel="stylesheet" href="../../../external/qunit/qunit.css">
- <script src="../../../external/qunit/qunit.js"></script>
- <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
- <script src="../testsuite.js"></script>
- <script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script>
- <script>
- TestHelpers.loadResources({
- css: [ "core" ],
- js: [
- "ui/core.js",
- "ui/widget.js",
- "ui/mouse.js",
- "ui/draggable.js",
- "ui/droppable.js"
- ]
- });
- </script>
-
- <script src="droppable_common.js"></script>
- <script src="droppable_core.js"></script>
- <script src="droppable_events.js"></script>
- <script src="droppable_methods.js"></script>
- <script src="droppable_options.js"></script>
- <script src="droppable_test_helpers.js"></script>
-
- <script src="../swarminject.js"></script>
+ <script src="../../lib/css.js" data-modules="core"></script>
+ <script src="../../lib/bootstrap.js" data-widget="droppable"
+ data-no-back-compat="true"></script>
</head>
<body>
<meta charset="utf-8">
<title>jQuery UI Droppable Test Suite</title>
- <script src="../../jquery.js"></script>
- <link rel="stylesheet" href="../../../external/qunit/qunit.css">
- <script src="../../../external/qunit/qunit.js"></script>
- <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
- <script src="../testsuite.js"></script>
- <script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script>
- <script>
- TestHelpers.loadResources({
- css: [ "core" ],
- js: [
- "ui/core.js",
- "ui/widget.js",
- "ui/mouse.js",
- "ui/draggable.js",
- "ui/droppable.js"
- ]
- });
- </script>
-
- <script src="droppable_common_deprecated.js"></script>
- <script src="droppable_core.js"></script>
- <script src="droppable_events.js"></script>
- <script src="droppable_methods.js"></script>
- <script src="droppable_options.js"></script>
- <script src="droppable_test_helpers.js"></script>
-
- <script src="../swarminject.js"></script>
+ <script src="../../lib/css.js" data-modules="core"></script>
+ <script src="../../lib/bootstrap.js" data-widget="droppable" data-deprecated="true"></script>
</head>
<body>
-/*
- * droppable_methods.js
- */
-(function($) {
+define( [
+ "jquery",
+ "./droppable_test_helpers",
+ "ui/droppable"
+], function( $, droppableTestHelpers ) {
module("droppable: methods");
var el, expected, actual;
el = $("#droppable1").droppable({ disabled: true });
- TestHelpers.droppable.shouldNotDrop();
+ droppableTestHelpers.shouldNotDrop();
el.droppable("enable");
- TestHelpers.droppable.shouldDrop();
+ droppableTestHelpers.shouldDrop();
equal(el.droppable("option", "disabled"), false, "disabled option getter");
el.droppable("destroy");
el.droppable({ disabled: true });
- TestHelpers.droppable.shouldNotDrop();
+ droppableTestHelpers.shouldNotDrop();
el.droppable("option", "disabled", false);
equal(el.droppable("option", "disabled"), false, "disabled option setter");
- TestHelpers.droppable.shouldDrop();
+ droppableTestHelpers.shouldDrop();
expected = $("<div></div>").droppable(),
actual = expected.droppable("enable");
var actual, expected,
element = $( "#droppable1" ).droppable({ disabled: false });
- TestHelpers.droppable.shouldDrop();
+ droppableTestHelpers.shouldDrop();
element.droppable( "disable" );
- TestHelpers.droppable.shouldNotDrop();
+ droppableTestHelpers.shouldNotDrop();
equal( element.droppable( "option", "disabled" ), true, "disabled option getter" );
element.droppable( "destroy" );
element.droppable({ disabled: false });
- TestHelpers.droppable.shouldDrop();
+ droppableTestHelpers.shouldDrop();
element.droppable( "option", "disabled", true );
assert.lacksClasses( element.droppable( "widget" ), "ui-state-disabled" );
ok( !element.droppable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" );
assert.hasClasses( element.droppable( "widget" ), "ui-droppable-disabled" );
equal( element.droppable( "option", "disabled" ), true, "disabled option setter" );
- TestHelpers.droppable.shouldNotDrop();
+ droppableTestHelpers.shouldNotDrop();
expected = $( "<div></div>" ).droppable();
actual = expected.droppable( "disable" );
equal( actual, expected, "disable is chainable" );
});
-})( jQuery );
+} );