diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/timelines/row_renderers.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/timelines/row_renderers.cy.ts index c6c062996e6fd..877efea6f820a 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/timelines/row_renderers.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/timelines/row_renderers.cy.ts @@ -5,15 +5,11 @@ * 2.0. */ -import { elementsOverlap } from '../../../helpers/rules'; import { TIMELINE_ROW_RENDERERS_DISABLE_ALL_BTN, TIMELINE_ROW_RENDERERS_MODAL_ITEMS_CHECKBOX, TIMELINE_ROW_RENDERERS_SEARCHBOX, TIMELINE_SHOW_ROW_RENDERERS_GEAR, - TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE, - TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE_TOOLTIP, - TIMELINE_ROW_RENDERERS_SURICATA_LINK_TOOLTIP, TIMELINE_ROW_RENDERERS_MODAL_CLOSE_BUTTON, TIMELINE_ROW_RENDERERS_WRAPPER, } from '../../../screens/timeline'; @@ -130,22 +126,4 @@ describe('Row renderers', { tags: ['@ess', '@serverless'] }, () => { cy.wait('@updateTimeline').its('response.statusCode').should('eq', 200); }); - - describe('Suricata', () => { - // This test has become very flaky over time and was blocking a lot of PRs. - // A follw-up ticket to tackle this issue has been created. - it.skip('Signature tooltips do not overlap', () => { - // Hover the signature to show the tooltips - cy.get(TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE).parents('.euiPopover').realHover(); - - cy.get(TIMELINE_ROW_RENDERERS_SURICATA_LINK_TOOLTIP).then(($googleLinkTooltip) => { - cy.get(TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE_TOOLTIP).then(($signatureTooltip) => { - expect( - elementsOverlap($googleLinkTooltip, $signatureTooltip), - 'tooltips do not overlap' - ).to.equal(false); - }); - }); - }); - }); }); diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/timelines/row_renderers_suricata.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/timelines/row_renderers_suricata.cy.ts new file mode 100644 index 0000000000000..974555ca4f938 --- /dev/null +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/timelines/row_renderers_suricata.cy.ts @@ -0,0 +1,67 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { elementsOverlap } from '../../../helpers/rules'; +import { + TIMELINE_ROW_RENDERERS_SEARCHBOX, + TIMELINE_SHOW_ROW_RENDERERS_GEAR, + TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE, + TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE_TOOLTIP, + TIMELINE_ROW_RENDERERS_SURICATA_LINK_TOOLTIP, +} from '../../../screens/timeline'; +import { deleteTimelines } from '../../../tasks/api_calls/timelines'; +import { waitForWelcomePanelToBeLoaded } from '../../../tasks/common'; +import { waitForAllHostsToBeLoaded } from '../../../tasks/hosts/all_hosts'; + +import { login } from '../../../tasks/login'; +import { visitWithTimeRange } from '../../../tasks/navigation'; +import { openTimelineUsingToggle } from '../../../tasks/security_main'; +import { populateTimeline } from '../../../tasks/timeline'; + +import { hostsUrl } from '../../../urls/navigation'; + +describe('Row renderers - Suricata', { tags: ['@ess', '@serverless'] }, () => { + before(() => { + cy.task('esArchiverLoad', { archiveName: 'bulk_process' }); + }); + + after(() => { + cy.task('esArchiverUnload', { archiveName: 'bulk_process' }); + }); + beforeEach(() => { + deleteTimelines(); + login(); + visitWithTimeRange(hostsUrl('allHosts'), { + visitOptions: { + onLoad: () => { + waitForWelcomePanelToBeLoaded(); + waitForAllHostsToBeLoaded(); + }, + }, + }); + openTimelineUsingToggle(); + populateTimeline(); + }); + + it('Signature tooltips do not overlap', () => { + // Hover the signature to show the tooltips + cy.get(TIMELINE_SHOW_ROW_RENDERERS_GEAR).realClick(); + cy.get(TIMELINE_ROW_RENDERERS_SEARCHBOX).should('exist'); + cy.get(TIMELINE_ROW_RENDERERS_SEARCHBOX).type('suricata'); + + cy.get(TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE, { timeout: 3000 }).realHover(); + + cy.get(TIMELINE_ROW_RENDERERS_SURICATA_LINK_TOOLTIP).then(($googleLinkTooltip) => { + cy.get(TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE_TOOLTIP).then(($signatureTooltip) => { + expect( + elementsOverlap($googleLinkTooltip, $signatureTooltip), + 'tooltips do not overlap' + ).to.equal(false); + }); + }); + }); +}); diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/timeline.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/timeline.ts index ab2aad0262c86..fdf31a846600c 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/timeline.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/timeline.ts @@ -198,7 +198,7 @@ export const TIMELINE_ROW_RENDERERS_SEARCHBOX = `${TIMELINE_ROW_RENDERERS_MODAL} export const TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE = `${TIMELINE_ROW_RENDERERS_MODAL} [data-test-subj="render-content-suricata.eve.alert.signature"]`; -export const TIMELINE_ROW_RENDERERS_SURICATA_LINK_TOOLTIP = `[data-test-subj="externalLinkTooltip"]`; +export const TIMELINE_ROW_RENDERERS_SURICATA_LINK_TOOLTIP = `[data-test-subj="externalLink"]`; export const TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE_TOOLTIP = `[data-test-subj="suricata.eve.alert.signature-tooltip"]`;