-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Security Solution] Skipped tests: flaky Suricata tests #231473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c476cff
bb57870
c9af01c
c79ce3d
083da4f
6e40b31
0cf6193
d1d8997
8080cd2
bfadaf9
69f818b
dee7223
3fc6f1f
2c5b635
a4cada5
8dc6e6e
cd328c2
2a79276
958f203
818d549
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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'); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cypress automatically waits for the element to exist and be visible before .type(), so should('exist') is redundant. Moreover should('exist') might be flaky, since the element might exist in the DOM and not be visible, so in case of wanting to check something is more robust to check the visibility. |
||
| 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); | ||
| }); | ||
| }); | ||
| }); | ||
| }); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"]`; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. used only in one test |
||
|
|
||
| export const TIMELINE_ROW_RENDERERS_SURICATA_SIGNATURE_TOOLTIP = `[data-test-subj="suricata.eve.alert.signature-tooltip"]`; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding a comment, the block of code that performs the hover should be extracted into a task.