From 3df9ea29e644a3dd6345161513dae5823d9b0460 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Sat, 3 Nov 2012 16:17:16 -0400 Subject: Dev: remove globals from tests and moved test helpers to correct location - Fixed #8770 Dev: Remove globals and Standardize Test Suite --- tests/unit/selectable/selectable.html | 1 + tests/unit/selectable/selectable_core.js | 15 +-------------- tests/unit/selectable/selectable_test_helpers.js | 12 ++++++++++++ 3 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 tests/unit/selectable/selectable_test_helpers.js (limited to 'tests/unit/selectable') diff --git a/tests/unit/selectable/selectable.html b/tests/unit/selectable/selectable.html index 18ffc6ef7..13718e1f3 100644 --- a/tests/unit/selectable/selectable.html +++ b/tests/unit/selectable/selectable.html @@ -26,6 +26,7 @@ + diff --git a/tests/unit/selectable/selectable_core.js b/tests/unit/selectable/selectable_core.js index de89e66a7..9953b6c07 100644 --- a/tests/unit/selectable/selectable_core.js +++ b/tests/unit/selectable/selectable_core.js @@ -1,16 +1,3 @@ /* * selectable_core.js - */ - -TestHelpers.selectable = { - drag: function drag(el, dx, dy) { - var off = el.offset(), - pos = { clientX: off.left, clientY: off.top }; - el.simulate("mousedown", pos); - $(document).simulate("mousemove", pos); - pos.clientX += dx; - pos.clientY += dy; - $(document).simulate("mousemove", pos); - $(document).simulate("mouseup", pos); - } -}; \ No newline at end of file + */ \ No newline at end of file diff --git a/tests/unit/selectable/selectable_test_helpers.js b/tests/unit/selectable/selectable_test_helpers.js new file mode 100644 index 000000000..c707ab622 --- /dev/null +++ b/tests/unit/selectable/selectable_test_helpers.js @@ -0,0 +1,12 @@ +TestHelpers.selectable = { + drag: function(el, dx, dy) { + var off = el.offset(), + pos = { clientX: off.left, clientY: off.top }; + el.simulate("mousedown", pos); + $(document).simulate("mousemove", pos); + pos.clientX += dx; + pos.clientY += dy; + $(document).simulate("mousemove", pos); + $(document).simulate("mouseup", pos); + } +}; \ No newline at end of file -- cgit v1.2.3