[FIX] web: avoid interactions between drag and drop tests

The commit 5854bb7d12 introduces a new option
to drag element without dropping them.

But it's not allowed to start a new drag and drop until the first one is
completely done.

So when the element is removed from the dom (the test is finished), we complete
the drag and drop in order to let next tests perform drag and drop.
This commit is contained in:
fwi-odoo
2017-07-13 11:38:53 +02:00
parent 8bea502f33
commit bb908979e9
@@ -412,6 +412,14 @@ function dragAndDrop($el, $to, options) {
pageX: toOffset.left,
pageY: toOffset.top
}));
} else {
// It's impossible to drag another element when one is already
// being dragged. So it's necessary to finish the drop when the test is
// over otherwise it's impossible for the next tests to drag and
// drop elements.
$el.on("remove", function () {
$el.trigger($.Event("mouseup"));
});
}
}