diff options
author | Scott González <scott.gonzalez@gmail.com> | 2015-04-06 20:23:50 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-04-09 09:26:27 -0400 |
commit | 7d4811206f8b64e9bd8eea168a77edf23629659b (patch) | |
tree | b22edbe4117b692ced3f803fd5192c046229e56e /tests/unit/dialog/dialog_test_helpers.js | |
parent | 0714f55ad48c9d3dace29003677353f5e152a13a (diff) | |
download | jquery-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.js | 12 |
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; + +} ); |