aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-04-06 14:38:11 -0400
committerScott González <scott.gonzalez@gmail.com>2015-04-09 09:26:26 -0400
commitb8625346f6de6d7533493fc27b24d8acd45aa84c (patch)
tree3413e800c886284b334b19880d1f9728b44c6c10 /tests
parent4e7407cd699bcb02cfdd6e28d463831e782233e7 (diff)
downloadjquery-ui-b8625346f6de6d7533493fc27b24d8acd45aa84c.tar.gz
jquery-ui-b8625346f6de6d7533493fc27b24d8acd45aa84c.zip
Selectable: Convert tests to new infrastructure
Ref #10119 Ref gh-1528
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/selectable/selectable.html27
-rw-r--r--tests/unit/selectable/selectable_common.js9
-rw-r--r--tests/unit/selectable/selectable_events.js13
-rw-r--r--tests/unit/selectable/selectable_methods.js10
-rw-r--r--tests/unit/selectable/selectable_options.js10
5 files changed, 27 insertions, 42 deletions
diff --git a/tests/unit/selectable/selectable.html b/tests/unit/selectable/selectable.html
index 024d28911..4486084e4 100644
--- a/tests/unit/selectable/selectable.html
+++ b/tests/unit/selectable/selectable.html
@@ -4,31 +4,8 @@
<meta charset="utf-8">
<title>jQuery UI Selectable 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", "selectable" ],
- js: [
- "ui/core.js",
- "ui/widget.js",
- "ui/mouse.js",
- "ui/selectable.js"
- ]
- });
- </script>
-
- <script src="selectable_common.js"></script>
- <script src="selectable_core.js"></script>
- <script src="selectable_events.js"></script>
- <script src="selectable_methods.js"></script>
- <script src="selectable_options.js"></script>
-
- <script src="../swarminject.js"></script>
+ <script src="../../lib/css.js" data-modules="core selectable"></script>
+ <script src="../../lib/bootstrap.js" data-widget="selectable"></script>
</head>
<body>
diff --git a/tests/unit/selectable/selectable_common.js b/tests/unit/selectable/selectable_common.js
index 79bf6e3c5..9a14e6df5 100644
--- a/tests/unit/selectable/selectable_common.js
+++ b/tests/unit/selectable/selectable_common.js
@@ -1,4 +1,9 @@
-TestHelpers.commonWidgetTests("selectable", {
+define( [
+ "lib/common",
+ "ui/selectable"
+], function( common ) {
+
+common.testWidget( "selectable", {
defaults: {
appendTo: "body",
autoRefresh: true,
@@ -20,3 +25,5 @@ TestHelpers.commonWidgetTests("selectable", {
unselecting: null
}
});
+
+} );
diff --git a/tests/unit/selectable/selectable_events.js b/tests/unit/selectable/selectable_events.js
index 5df7f2f5b..6eb99f325 100644
--- a/tests/unit/selectable/selectable_events.js
+++ b/tests/unit/selectable/selectable_events.js
@@ -1,7 +1,8 @@
-/*
- * selectable_events.js
- */
-(function( $ ) {
+define( [
+ "jquery",
+ "lib/helper",
+ "ui/selectable"
+], function( $, testHelpers ) {
module("selectable: events");
@@ -40,7 +41,7 @@ test( "mousedown: initial position of helper", function() {
var helperOffset,
element = $( "#selectable1" ).selectable(),
- contentToForceScroll = TestHelpers.forceScrollableWindow( "body" );
+ contentToForceScroll = testHelpers.forceScrollableWindow( "body" );
$( window ).scrollTop( 100 ).scrollLeft( 100 );
@@ -59,4 +60,4 @@ test( "mousedown: initial position of helper", function() {
$( window ).scrollTop( 0 ).scrollLeft( 0 );
});
-})( jQuery );
+} );
diff --git a/tests/unit/selectable/selectable_methods.js b/tests/unit/selectable/selectable_methods.js
index 02c9ab075..045809670 100644
--- a/tests/unit/selectable/selectable_methods.js
+++ b/tests/unit/selectable/selectable_methods.js
@@ -1,7 +1,7 @@
-/*
- * selectable_methods.js
- */
-(function($) {
+define( [
+ "jquery",
+ "ui/selectable"
+], function( $ ) {
module("selectable: methods");
@@ -108,4 +108,4 @@ test( "disable", function( assert ) {
equal( chainable, element, "disable is chainable" );
});
-})(jQuery);
+} );
diff --git a/tests/unit/selectable/selectable_options.js b/tests/unit/selectable/selectable_options.js
index 292c0cf96..cdbfb4aab 100644
--- a/tests/unit/selectable/selectable_options.js
+++ b/tests/unit/selectable/selectable_options.js
@@ -1,7 +1,7 @@
-/*
- * selectable_options.js
- */
-(function($) {
+define( [
+ "jquery",
+ "ui/selectable"
+], function( $ ) {
module("selectable: options");
@@ -61,4 +61,4 @@ test("filter", function() {
el.selectable("destroy");
});
-})(jQuery);
+} );