From 7ad356a6010ecc5e9b3b772e2b7bd542281c6f91 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Mon, 11 Nov 2019 11:17:55 +0100 Subject: [PATCH 1/3] updates KQL_SEARCH_BAR locator --- .../siem/cypress/integration/lib/events_viewer/selectors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/selectors.ts b/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/selectors.ts index c6cf4d455fb593..2bcde9552780ea 100644 --- a/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/selectors.ts +++ b/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/selectors.ts @@ -11,7 +11,7 @@ export const EVENTS_VIEWER_PANEL = '[data-test-subj="events-viewer-panel"]'; export const EVENTS_VIEWER_FIELDS_BUTTON = `${EVENTS_VIEWER_PANEL} [data-test-subj="show-field-browser-gear"]`; /** The KQL search bar that exists at the top of most pages */ -export const KQL_SEARCH_BAR = '[data-test-subj="kqlInput"]'; +export const KQL_SEARCH_BAR = '[data-test-subj="queryInput"]'; /** The Events Viewer Showing N events header subtitle */ export const HEADER_SUBTITLE = `${EVENTS_VIEWER_PANEL} [data-test-subj="subtitle"]`; From 6b78970a2ab00e4691778a43f5d1b094a463e440 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Mon, 11 Nov 2019 11:35:08 +0100 Subject: [PATCH 2/3] updates HEADER_SUBTITLE locator --- .../siem/cypress/integration/lib/events_viewer/selectors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/selectors.ts b/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/selectors.ts index 2bcde9552780ea..0e3717feef7ad0 100644 --- a/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/selectors.ts +++ b/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/selectors.ts @@ -14,7 +14,7 @@ export const EVENTS_VIEWER_FIELDS_BUTTON = `${EVENTS_VIEWER_PANEL} [data-test-su export const KQL_SEARCH_BAR = '[data-test-subj="queryInput"]'; /** The Events Viewer Showing N events header subtitle */ -export const HEADER_SUBTITLE = `${EVENTS_VIEWER_PANEL} [data-test-subj="subtitle"]`; +export const HEADER_SUBTITLE = `${EVENTS_VIEWER_PANEL} [data-test-subj="header-panel-subtitle"]`; /** The inspect query modal */ export const INSPECT_MODAL = '[data-test-subj="modal-inspect-euiModal"]'; From 543a2e5481cebf82353926260e9c43c1d862fee4 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Mon, 11 Nov 2019 15:40:23 +0100 Subject: [PATCH 3/3] waits for the events to be loaded --- .../siem/cypress/integration/lib/events_viewer/helpers.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/helpers.ts b/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/helpers.ts index e611744754912f..02a80f6c0329cb 100644 --- a/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/helpers.ts +++ b/x-pack/legacy/plugins/siem/cypress/integration/lib/events_viewer/helpers.ts @@ -6,12 +6,17 @@ import { EVENTS_VIEWER_FIELDS_BUTTON, KQL_SEARCH_BAR } from './selectors'; import { FIELDS_BROWSER_CONTAINER } from '../fields_browser/selectors'; +import { SERVER_SIDE_EVENT_COUNT } from '../timeline/selectors'; import { DEFAULT_TIMEOUT } from '../util/helpers'; /** Opens the eventsViewer Field Browser */ export const openEventsViewerFieldsBrowser = () => { cy.get(EVENTS_VIEWER_FIELDS_BUTTON, { timeout: DEFAULT_TIMEOUT }).click({ force: true }); + cy.get(SERVER_SIDE_EVENT_COUNT, { timeout: DEFAULT_TIMEOUT }) + .invoke('text') + .should('not.equal', '0'); + cy.get(FIELDS_BROWSER_CONTAINER).should('exist'); };