diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-11-03 16:17:16 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2012-11-03 16:17:16 -0400 |
commit | 3df9ea29e644a3dd6345161513dae5823d9b0460 (patch) | |
tree | 08bdc053f90d110cb4af39c4de464d92ad8142c6 /tests/unit/selectable/selectable_test_helpers.js | |
parent | 68ad80c2922daccba773a9adafe9fb5efcb129a2 (diff) | |
download | jquery-ui-3df9ea29e644a3dd6345161513dae5823d9b0460.tar.gz jquery-ui-3df9ea29e644a3dd6345161513dae5823d9b0460.zip |
Dev: remove globals from tests and moved test helpers to correct location - Fixed #8770 Dev: Remove globals and Standardize Test Suite
Diffstat (limited to 'tests/unit/selectable/selectable_test_helpers.js')
-rw-r--r-- | tests/unit/selectable/selectable_test_helpers.js | 12 |
1 files changed, 12 insertions, 0 deletions
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 |