aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog/dialog_test_helpers.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-04-06 20:23:50 -0400
committerScott González <scott.gonzalez@gmail.com>2015-04-09 09:26:27 -0400
commit7d4811206f8b64e9bd8eea168a77edf23629659b (patch)
treeb22edbe4117b692ced3f803fd5192c046229e56e /tests/unit/dialog/dialog_test_helpers.js
parent0714f55ad48c9d3dace29003677353f5e152a13a (diff)
downloadjquery-ui-7d4811206f8b64e9bd8eea168a77edf23629659b.tar.gz
jquery-ui-7d4811206f8b64e9bd8eea168a77edf23629659b.zip
Dialog: Convert tests to new infrastructure
Ref #10119 Ref gh-1528
Diffstat (limited to 'tests/unit/dialog/dialog_test_helpers.js')
-rw-r--r--tests/unit/dialog/dialog_test_helpers.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/unit/dialog/dialog_test_helpers.js b/tests/unit/dialog/dialog_test_helpers.js
index 705eb3010..f11c77cde 100644
--- a/tests/unit/dialog/dialog_test_helpers.js
+++ b/tests/unit/dialog/dialog_test_helpers.js
@@ -1,4 +1,6 @@
-TestHelpers.dialog = {
+define( function() {
+
+var dialogTestHelpers = {
drag: function(element, handle, dx, dy) {
var d = element.dialog("widget");
//this mouseover is to work around a limitation in resizable
@@ -14,7 +16,7 @@ TestHelpers.dialog = {
handle = $(".ui-dialog-titlebar", d),
offsetBefore = d.offset();
- TestHelpers.dialog.drag(element, handle, dx, dy);
+ dialogTestHelpers.drag(element, handle, dx, dy);
offsetAfter = d.offset();
@@ -34,7 +36,7 @@ TestHelpers.dialog = {
heightBefore = element.height(),
widthBefore = element.width();
- TestHelpers.dialog.drag(element, handle, 50, 50);
+ dialogTestHelpers.drag(element, handle, 50, 50);
heightAfter = element.height();
widthAfter = element.width();
@@ -45,3 +47,7 @@ TestHelpers.dialog = {
deepEqual(actual, expected, "resized[" + 50 + ", " + 50 + "] " + msg);
}
};
+
+return dialogTestHelpers;
+
+} );