Skip to content

Commit

Permalink
Fix drag and drop flakiness (elastic#61993)
Browse files Browse the repository at this point in the history
* increases the time between dragging and dropping an element

* fixes test
  • Loading branch information
MadameSheema committed Mar 31, 2020
1 parent 1f1d519 commit a4bda30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}"`);
});
});
});
Expand Down
8 changes: 4 additions & 4 deletions x-pack/legacy/plugins/siem/cypress/tasks/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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);
};

0 comments on commit a4bda30

Please sign in to comment.