From 5f8969258d92487127cd09afec0d51ec57d5c712 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 5 Sep 2023 02:26:22 +0000 Subject: [PATCH] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- .../timelines/data_providers.cy.ts | 98 ++++++++++--------- 1 file changed, 51 insertions(+), 47 deletions(-) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/data_providers.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/data_providers.cy.ts index df2d45b0ee4a3..0caaefd1c5e69 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/data_providers.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/data_providers.cy.ts @@ -30,61 +30,65 @@ import { HOSTS_URL } from '../../../urls/navigation'; import { cleanKibana, scrollToBottom } from '../../../tasks/common'; // Failing in serverless -describe('timeline data providers', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { - before(() => { - cleanKibana(); - }); +describe( + 'timeline data providers', + { tags: ['@ess', '@serverless', '@brokenInServerless'] }, + () => { + before(() => { + cleanKibana(); + }); - beforeEach(() => { - login(); - visit(HOSTS_URL); - waitForAllHostsToBeLoaded(); - scrollToBottom(); - createNewTimeline(); - addNameAndDescriptionToTimeline(getTimeline()); - populateTimeline(); - }); + beforeEach(() => { + login(); + visit(HOSTS_URL); + waitForAllHostsToBeLoaded(); + scrollToBottom(); + createNewTimeline(); + addNameAndDescriptionToTimeline(getTimeline()); + populateTimeline(); + }); - it('displays the data provider action menu when Enter is pressed', () => { - addDataProvider({ field: 'host.name', operator: 'exists' }); + it('displays the data provider action menu when Enter is pressed', () => { + addDataProvider({ field: 'host.name', operator: 'exists' }); - cy.get(TIMELINE_DATA_PROVIDERS_ACTION_MENU).should('not.exist'); - cy.get(`${TIMELINE_FLYOUT_HEADER} ${TIMELINE_DROPPED_DATA_PROVIDERS}`).focus(); - cy.get(`${TIMELINE_FLYOUT_HEADER} ${TIMELINE_DROPPED_DATA_PROVIDERS}`) - .first() - .parent() - .type('{enter}'); + cy.get(TIMELINE_DATA_PROVIDERS_ACTION_MENU).should('not.exist'); + cy.get(`${TIMELINE_FLYOUT_HEADER} ${TIMELINE_DROPPED_DATA_PROVIDERS}`).focus(); + cy.get(`${TIMELINE_FLYOUT_HEADER} ${TIMELINE_DROPPED_DATA_PROVIDERS}`) + .first() + .parent() + .type('{enter}'); + + cy.get(TIMELINE_DATA_PROVIDERS_ACTION_MENU).should('exist'); + }); - cy.get(TIMELINE_DATA_PROVIDERS_ACTION_MENU).should('exist'); - }); + it.skip( + 'persists timeline when data provider is updated by dragging a field from data grid', + { tags: ['@brokenInServerless'] }, + () => { + updateDataProviderbyDraggingField('host.name', 0); + waitForTimelineChanges(); + cy.reload(); + cy.get(`${GET_TIMELINE_GRID_CELL('host.name')}`) + .first() + .then((hostname) => { + cy.get(TIMELINE_DATA_PROVIDERS_CONTAINER).contains(`host.name: "${hostname.text()}"`); + }); + } + ); - it.skip( - 'persists timeline when data provider is updated by dragging a field from data grid', - { tags: ['@brokenInServerless'] }, - () => { - updateDataProviderbyDraggingField('host.name', 0); + it('persists timeline when a field is added by hover action "Add To Timeline" in data provider ', () => { + addDataProvider({ field: 'host.name', operator: 'exists' }); + waitForTimelineChanges(); + updateDataProviderByFieldHoverAction('host.name', 0); waitForTimelineChanges(); cy.reload(); cy.get(`${GET_TIMELINE_GRID_CELL('host.name')}`) .first() .then((hostname) => { - cy.get(TIMELINE_DATA_PROVIDERS_CONTAINER).contains(`host.name: "${hostname.text()}"`); - }); - } - ); - - it('persists timeline when a field is added by hover action "Add To Timeline" in data provider ', () => { - addDataProvider({ field: 'host.name', operator: 'exists' }); - waitForTimelineChanges(); - updateDataProviderByFieldHoverAction('host.name', 0); - waitForTimelineChanges(); - cy.reload(); - cy.get(`${GET_TIMELINE_GRID_CELL('host.name')}`) - .first() - .then((hostname) => { - cy.get(TIMELINE_DATA_PROVIDERS_CONTAINER).should((dataProviderContainer) => { - expect(dataProviderContainer).to.contain(`host.name: "${hostname.text()}"`); + cy.get(TIMELINE_DATA_PROVIDERS_CONTAINER).should((dataProviderContainer) => { + expect(dataProviderContainer).to.contain(`host.name: "${hostname.text()}"`); + }); }); - }); - }); -}); + }); + } +);