tests draggable #2965 - fixed to account for distance: 1 default

This commit is contained in:
Richard Worth 2008-06-26 10:20:48 +00:00
parent 980fbbea51
commit 0f0fb77a9e

View File

@ -467,7 +467,7 @@ test("#2965 cursorAt with margin", function() {
var before = el.offset(); var before = el.offset();
var pos = { clientX: before.left + ox, clientY: before.top + oy }; var pos = { clientX: before.left + ox, clientY: before.top + oy };
$("#draggable2").simulate("mousedown", pos); $("#draggable2").simulate("mousedown", pos);
$(document).simulate("mousemove", pos); $(document).simulate("mousemove", { clientX: pos.clientX + 1, clientY: pos.clientY + 1});
$(document).simulate("mousemove", pos); $(document).simulate("mousemove", pos);
$("#draggable2").simulate("mouseup", pos); $("#draggable2").simulate("mouseup", pos);
var expected = actual; var expected = actual;
@ -479,7 +479,7 @@ test("#2965 cursorAt with margin", function() {
var before = el.offset(); var before = el.offset();
var pos = { clientX: before.left + ox - marg, clientY: before.top + oy - marg }; var pos = { clientX: before.left + ox - marg, clientY: before.top + oy - marg };
$("#draggable2").simulate("mousedown", pos); $("#draggable2").simulate("mousedown", pos);
$(document).simulate("mousemove", pos); $(document).simulate("mousemove", { clientX: pos.clientX + 1, clientY: pos.clientY + 1});
$(document).simulate("mousemove", pos); $(document).simulate("mousemove", pos);
$("#draggable2").simulate("mouseup", pos); $("#draggable2").simulate("mouseup", pos);