From 127fc1b451eda2f5e7a6e799a285473d8eef3d33 Mon Sep 17 00:00:00 2001 From: MadameSheema Date: Tue, 31 Mar 2020 21:26:40 +0200 Subject: [PATCH] Fix drag and drop flakiness (#61993) (#62023) * increases the time between dragging and dropping an element * fixes test --- .../cypress/integration/timeline_data_providers.spec.ts | 2 +- x-pack/legacy/plugins/siem/cypress/tasks/common.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/legacy/plugins/siem/cypress/integration/timeline_data_providers.spec.ts b/x-pack/legacy/plugins/siem/cypress/integration/timeline_data_providers.spec.ts index a52f1db2c7daf..3b5a327b05219 100644 --- a/x-pack/legacy/plugins/siem/cypress/integration/timeline_data_providers.spec.ts +++ b/x-pack/legacy/plugins/siem/cypress/integration/timeline_data_providers.spec.ts @@ -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}"`); }); }); }); diff --git a/x-pack/legacy/plugins/siem/cypress/tasks/common.ts b/x-pack/legacy/plugins/siem/cypress/tasks/common.ts index 03a1fe4496030..b0c64214459f0 100644 --- a/x-pack/legacy/plugins/siem/cypress/tasks/common.ts +++ b/x-pack/legacy/plugins/siem/cypress/tasks/common.ts @@ -23,14 +23,14 @@ export const drag = (subject: JQuery) => { 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) => { export const drop = (dropTarget: JQuery) => { cy.wrap(dropTarget) .trigger('mousemove', { button: primaryButton, force: true }) - .wait(100) + .wait(1000) .trigger('mouseup', { force: true }) - .wait(100); + .wait(1000); };