fix(cypress): use wait for drag handlers

This commit is contained in:
moklick
2022-04-28 23:49:56 +02:00
parent ebf2a66639
commit 8a7bc49c79
7 changed files with 49 additions and 34 deletions
+3 -2
View File
@@ -27,7 +27,8 @@
Cypress.Commands.add('drag', (selector, { x, y }) => {
return cy
.get(selector)
.trigger('mousedown', { which: 1, force: true })
.trigger('mousemove', { clientX: x, clientY: y, force: true })
.trigger('mousedown', { which: 1 })
.trigger('mousemove', { clientX: x, clientY: y })
.wait(50)
.trigger('mouseup', { force: true });
});