Fix drag and drop flakiness (#61993) (#62024)

* increases the time between dragging and dropping an element

* fixes test
This commit is contained in:
MadameSheema 2020-03-31 21:26:59 +02:00 committed by GitHub
parent 27a783e032
commit a9cd868dd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -49,7 +49,7 @@ describe('timeline data providers', () => {
.first()
.invoke('text')
.should(hostname => {
expect(dataProviderText).to.eq(hostname);
expect(dataProviderText).to.eq(`host.name: "${hostname}"`);
});
});
});

View file

@ -23,14 +23,14 @@ export const drag = (subject: JQuery<HTMLElement>) => {
clientY: subjectLocation.top,
force: true,
})
.wait(100)
.wait(1000)
.trigger('mousemove', {
button: primaryButton,
clientX: subjectLocation.left + dndSloppyClickDetectionThreshold,
clientY: subjectLocation.top,
force: true,
})
.wait(100);
.wait(1000);
};
/** 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(100)
.wait(1000)
.trigger('mouseup', { force: true })
.wait(100);
.wait(1000);
};