From eba85ef50a021b4b6587c1937ef2e51466c270e6 Mon Sep 17 00:00:00 2001 From: MadameSheema Date: Thu, 20 Aug 2020 09:39:38 +0200 Subject: [PATCH] fixes 're-orders columns via drag and drop' test (#75126) Co-authored-by: Elastic Machine --- .../cypress/integration/events_viewer.spec.ts | 4 +++- .../plugins/security_solution/cypress/screens/hosts/events.ts | 2 ++ .../plugins/security_solution/cypress/tasks/hosts/events.ts | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/security_solution/cypress/integration/events_viewer.spec.ts b/x-pack/plugins/security_solution/cypress/integration/events_viewer.spec.ts index cd4573817cc27..5f2de69689865 100644 --- a/x-pack/plugins/security_solution/cypress/integration/events_viewer.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/events_viewer.spec.ts @@ -10,6 +10,7 @@ import { FIELDS_BROWSER_SELECTED_CATEGORY_TITLE, } from '../screens/fields_browser'; import { + EVENTS_PAGE, HEADER_SUBTITLE, HOST_GEO_CITY_NAME_HEADER, HOST_GEO_COUNTRY_NAME_HEADER, @@ -153,7 +154,7 @@ describe('Events Viewer', () => { }); }); - context.skip('Events columns', () => { + context('Events columns', () => { before(() => { loginAndWaitForPage(HOSTS_URL); openEvents(); @@ -171,6 +172,7 @@ describe('Events Viewer', () => { const expectedOrderAfterDragAndDrop = 'message@timestamphost.nameevent.moduleevent.datasetevent.actionuser.namesource.ipdestination.ip'; + cy.get(EVENTS_PAGE).scrollTo('bottom'); cy.get(HEADERS_GROUP).invoke('text').should('equal', originalColumnOrder); dragAndDropColumn({ column: 0, newPosition: 1 }); cy.get(HEADERS_GROUP).invoke('text').should('equal', expectedOrderAfterDragAndDrop); diff --git a/x-pack/plugins/security_solution/cypress/screens/hosts/events.ts b/x-pack/plugins/security_solution/cypress/screens/hosts/events.ts index 4b1ca19bd96fe..05f517b5de662 100644 --- a/x-pack/plugins/security_solution/cypress/screens/hosts/events.ts +++ b/x-pack/plugins/security_solution/cypress/screens/hosts/events.ts @@ -6,6 +6,8 @@ export const CLOSE_MODAL = '[data-test-subj="modal-inspect-close"]'; +export const EVENTS_PAGE = '[data-test-subj="pageContainer"]'; + export const EVENTS_VIEWER_FIELDS_BUTTON = '[data-test-subj="events-viewer-panel"] [data-test-subj="show-field-browser"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/hosts/events.ts b/x-pack/plugins/security_solution/cypress/tasks/hosts/events.ts index 1d2c4aa8d0834..226178cd92f18 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/hosts/events.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/hosts/events.ts @@ -68,8 +68,6 @@ export const dragAndDropColumn = ({ .eq(column) .then((header) => drag(header)); - cy.wait(5000); // wait for DOM updates before moving - cy.get(DRAGGABLE_HEADER) .eq(newPosition) .then((targetPosition) => {