From 068d597166468470dd8c7888a9f892f0ae4bedb5 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Sun, 4 Nov 2012 09:31:56 -0500 Subject: Dev: fix IE fails in draggable and selectable - Fixed #8770 Dev: Remove globals and Standardize Test Suite --- tests/unit/selectable/selectable_options.js | 2 +- tests/unit/selectable/selectable_test_helpers.js | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'tests/unit/selectable') diff --git a/tests/unit/selectable/selectable_options.js b/tests/unit/selectable/selectable_options.js index 2b7fc1648..50e047427 100644 --- a/tests/unit/selectable/selectable_options.js +++ b/tests/unit/selectable/selectable_options.js @@ -26,7 +26,7 @@ test("autoRefresh", function() { TestHelpers.selectable.drag(el, 1000, 1000); equal(actual, 0); sel.show(); - TestHelpers.selectable.drag(el, 1000, 1000); + TestHelpers.selectable.drag( sel[ 0 ], 1000, 1000 ); equal(actual, sel.length); el.selectable("destroy"); sel.show(); diff --git a/tests/unit/selectable/selectable_test_helpers.js b/tests/unit/selectable/selectable_test_helpers.js index c707ab622..6f87efbb3 100644 --- a/tests/unit/selectable/selectable_test_helpers.js +++ b/tests/unit/selectable/selectable_test_helpers.js @@ -1,12 +1,8 @@ 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); + drag: function( el, dx, dy ) { + $( el ).simulate( "drag", { + dx: dx || 0, + dy: dy || 0 + }); } }; \ No newline at end of file -- cgit v1.2.3