aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/dialog/dialog_options.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/dialog/dialog_options.js')
-rw-r--r--tests/unit/dialog/dialog_options.js50
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js
index e4ff6ac72..1b9af7a09 100644
--- a/tests/unit/dialog/dialog_options.js
+++ b/tests/unit/dialog/dialog_options.js
@@ -4,7 +4,7 @@ define( [
"ui/dialog",
"ui/effect-blind",
"ui/effect-explode"
-], function( $, dialogTestHelpers ) {
+], function( $, testHelper ) {
module("dialog: options");
@@ -231,15 +231,15 @@ test("draggable", function() {
var element = $("<div></div>").dialog({ draggable: false });
- dialogTestHelpers.testDrag(element, 50, -50, 0, 0);
+ testHelper.testDrag(element, 50, -50, 0, 0);
element.dialog("option", "draggable", true);
- dialogTestHelpers.testDrag(element, 50, -50, 50, -50);
+ testHelper.testDrag(element, 50, -50, 50, -50);
element.remove();
element = $("<div></div>").dialog({ draggable: true });
- dialogTestHelpers.testDrag(element, 50, -50, 50, -50);
+ testHelper.testDrag(element, 50, -50, 50, -50);
element.dialog("option", "draggable", false);
- dialogTestHelpers.testDrag(element, 50, -50, 0, 0);
+ testHelper.testDrag(element, 50, -50, 0, 0);
element.remove();
});
@@ -269,17 +269,17 @@ test("maxHeight", function( assert ) {
expect(3);
var element = $("<div></div>").dialog({ maxHeight: 200 });
- dialogTestHelpers.drag(element, ".ui-resizable-s", 1000, 1000);
+ testHelper.drag(element, ".ui-resizable-s", 1000, 1000);
assert.close(element.dialog("widget").height(), 200, 1, "maxHeight");
element.remove();
element = $("<div></div>").dialog({ maxHeight: 200 });
- dialogTestHelpers.drag(element, ".ui-resizable-n", -1000, -1000);
+ testHelper.drag(element, ".ui-resizable-n", -1000, -1000);
assert.close(element.dialog("widget").height(), 200, 1, "maxHeight");
element.remove();
element = $("<div></div>").dialog({ maxHeight: 200 }).dialog("option", "maxHeight", 300);
- dialogTestHelpers.drag(element, ".ui-resizable-s", 1000, 1000);
+ testHelper.drag(element, ".ui-resizable-s", 1000, 1000);
assert.close(element.dialog("widget").height(), 300, 1, "maxHeight");
element.remove();
});
@@ -288,17 +288,17 @@ test("maxWidth", function( assert ) {
expect(3);
var element = $("<div></div>").dialog({ maxWidth: 200 });
- dialogTestHelpers.drag(element, ".ui-resizable-e", 1000, 1000);
+ testHelper.drag(element, ".ui-resizable-e", 1000, 1000);
assert.close(element.dialog("widget").width(), 200, 1, "maxWidth");
element.remove();
element = $("<div></div>").dialog({ maxWidth: 200 });
- dialogTestHelpers.drag(element, ".ui-resizable-w", -1000, -1000);
+ testHelper.drag(element, ".ui-resizable-w", -1000, -1000);
assert.close(element.dialog("widget").width(), 200, 1, "maxWidth");
element.remove();
element = $("<div></div>").dialog({ maxWidth: 200 }).dialog("option", "maxWidth", 300);
- dialogTestHelpers.drag(element, ".ui-resizable-w", -1000, -1000);
+ testHelper.drag(element, ".ui-resizable-w", -1000, -1000);
assert.close(element.dialog("widget").width(), 300, 1, "maxWidth");
element.remove();
});
@@ -307,17 +307,17 @@ test("minHeight", function( assert ) {
expect(3);
var element = $("<div></div>").dialog({ minHeight: 10 });
- dialogTestHelpers.drag(element, ".ui-resizable-s", -1000, -1000);
+ testHelper.drag(element, ".ui-resizable-s", -1000, -1000);
assert.close(element.dialog("widget").height(), 10, 1, "minHeight");
element.remove();
element = $("<div></div>").dialog({ minHeight: 10 });
- dialogTestHelpers.drag(element, ".ui-resizable-n", 1000, 1000);
+ testHelper.drag(element, ".ui-resizable-n", 1000, 1000);
assert.close(element.dialog("widget").height(), 10, 1, "minHeight");
element.remove();
element = $("<div></div>").dialog({ minHeight: 10 }).dialog("option", "minHeight", 30);
- dialogTestHelpers.drag(element, ".ui-resizable-n", 1000, 1000);
+ testHelper.drag(element, ".ui-resizable-n", 1000, 1000);
assert.close(element.dialog("widget").height(), 30, 1, "minHeight");
element.remove();
});
@@ -326,17 +326,17 @@ test("minWidth", function( assert ) {
expect(3);
var element = $("<div></div>").dialog({ minWidth: 10 });
- dialogTestHelpers.drag(element, ".ui-resizable-e", -1000, -1000);
+ testHelper.drag(element, ".ui-resizable-e", -1000, -1000);
assert.close(element.dialog("widget").width(), 10, 1, "minWidth");
element.remove();
element = $("<div></div>").dialog({ minWidth: 10 });
- dialogTestHelpers.drag(element, ".ui-resizable-w", 1000, 1000);
+ testHelper.drag(element, ".ui-resizable-w", 1000, 1000);
assert.close(element.dialog("widget").width(), 10, 1, "minWidth");
element.remove();
element = $("<div></div>").dialog({ minWidth: 30 }).dialog("option", "minWidth", 30);
- dialogTestHelpers.drag(element, ".ui-resizable-w", 1000, 1000);
+ testHelper.drag(element, ".ui-resizable-w", 1000, 1000);
assert.close(element.dialog("widget").width(), 30, 1, "minWidth");
element.remove();
});
@@ -424,15 +424,15 @@ test("resizable", function() {
expect(4);
var element = $("<div></div>").dialog();
- dialogTestHelpers.shouldResize(element, 50, 50, "[default]");
+ testHelper.shouldResize(element, 50, 50, "[default]");
element.dialog("option", "resizable", false);
- dialogTestHelpers.shouldResize(element, 0, 0, "disabled after init");
+ testHelper.shouldResize(element, 0, 0, "disabled after init");
element.remove();
element = $("<div></div>").dialog({ resizable: false });
- dialogTestHelpers.shouldResize(element, 0, 0, "disabled in init options");
+ testHelper.shouldResize(element, 0, 0, "disabled in init options");
element.dialog("option", "resizable", true);
- dialogTestHelpers.shouldResize(element, 50, 50, "enabled after init");
+ testHelper.shouldResize(element, 50, 50, "enabled after init");
element.remove();
});
@@ -497,18 +497,18 @@ test("#4826: setting resizable false toggles resizable on dialog", function() {
var i,
element = $("<div></div>").dialog({ resizable: false });
- dialogTestHelpers.shouldResize(element, 0, 0, "[default]");
+ testHelper.shouldResize(element, 0, 0, "[default]");
for (i=0; i<2; i++) {
element.dialog("close").dialog("open");
- dialogTestHelpers.shouldResize(element, 0, 0, "initialized with resizable false toggle ("+ (i+1) +")");
+ testHelper.shouldResize(element, 0, 0, "initialized with resizable false toggle ("+ (i+1) +")");
}
element.remove();
element = $("<div></div>").dialog({ resizable: true });
- dialogTestHelpers.shouldResize(element, 50, 50, "[default]");
+ testHelper.shouldResize(element, 50, 50, "[default]");
for (i=0; i<2; i++) {
element.dialog("close").dialog("option", "resizable", false).dialog("open");
- dialogTestHelpers.shouldResize(element, 0, 0, "set option resizable false toggle ("+ (i+1) +")");
+ testHelper.shouldResize(element, 0, 0, "set option resizable false toggle ("+ (i+1) +")");
}
element.remove();