aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable/draggable_options.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/draggable/draggable_options.js')
-rw-r--r--tests/unit/draggable/draggable_options.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js
index 77b2fe1db..4834dd9c4 100644
--- a/tests/unit/draggable/draggable_options.js
+++ b/tests/unit/draggable/draggable_options.js
@@ -281,8 +281,8 @@ test("{ cursorAt: { left: -5, top: -5 } }", function() {
clientY: before.top + offsetY
};
expected = {
- left: before.left + offsetX - cursorAtX + deltaX,
- top: before.top + offsetY - cursorAtY + deltaY
+ left: before.left + offsetX - cursorAtX + deltaX - TestHelpers.draggable.unreliableOffset,
+ top: before.top + offsetY - cursorAtY + deltaY - TestHelpers.draggable.unreliableOffset
};
el.simulate("mousedown", pos);
@@ -315,8 +315,8 @@ test("{ cursorAt: { right: 10, bottom: 20 } }", function() {
clientY: before.top + offsetY
};
expected = {
- left: before.left + offsetX - el.width() + cursorAtX + deltaX,
- top: before.top + offsetY - el.height() + cursorAtY + deltaY
+ left: before.left + offsetX - el.width() + cursorAtX + deltaX - TestHelpers.draggable.unreliableOffset,
+ top: before.top + offsetY - el.height() + cursorAtY + deltaY - TestHelpers.draggable.unreliableOffset
};
el.simulate("mousedown", pos);
@@ -349,8 +349,8 @@ test("{ cursorAt: [10, 20] }", function() {
clientY: before.top + offsetY
};
expected = {
- left: before.left + offsetX - cursorAtX + deltaX,
- top: before.top + offsetY - cursorAtY + deltaY
+ left: before.left + offsetX - cursorAtX + deltaX - TestHelpers.draggable.unreliableOffset,
+ top: before.top + offsetY - cursorAtY + deltaY - TestHelpers.draggable.unreliableOffset
};
el.simulate("mousedown", pos);
@@ -383,8 +383,8 @@ test("{ cursorAt: '20, 40' }", function() {
clientY: before.top + offsetY
};
expected = {
- left: before.left + offsetX - cursorAtX + deltaX,
- top: before.top + offsetY - cursorAtY + deltaY
+ left: before.left + offsetX - cursorAtX + deltaX - TestHelpers.draggable.unreliableOffset,
+ top: before.top + offsetY - cursorAtY + deltaY - TestHelpers.draggable.unreliableOffset
};
el.simulate("mousedown", pos);