fixes drag and drop flakiness (#60625)

This commit is contained in:
MadameSheema 2020-03-19 16:32:19 +01:00 committed by GitHub
parent 73a8548d3b
commit b0a6b302ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,14 +23,14 @@ export const drag = (subject: JQuery<HTMLElement>) => {
clientY: subjectLocation.top,
force: true,
})
.wait(5)
.wait(100)
.trigger('mousemove', {
button: primaryButton,
clientX: subjectLocation.left + dndSloppyClickDetectionThreshold,
clientY: subjectLocation.top,
force: true,
})
.wait(5);
.wait(100);
};
/** Drags the subject being dragged on the specified drop target, but does not drop it */
@ -44,7 +44,7 @@ export const dragWithoutDrop = (dropTarget: JQuery<HTMLElement>) => {
export const drop = (dropTarget: JQuery<HTMLElement>) => {
cy.wrap(dropTarget)
.trigger('mousemove', { button: primaryButton, force: true })
.wait(5)
.wait(100)
.trigger('mouseup', { force: true })
.wait(5);
.wait(100);
};