Skip to content

Commit

Permalink
[8.16] [EDR Workflows] Fix alert_test.cy.ts flakiness (#198516) (#198575
Browse files Browse the repository at this point in the history
)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[EDR Workflows] Fix alert_test.cy.ts flakiness
(#198516)](#198516)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tomasz
Ciecierski","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-31T16:16:33Z","message":"[EDR
Workflows] Fix alert_test.cy.ts flakiness
(#198516)","sha":"04ad8964558d98fbe8dd8788d09f30fa4bfd0b55","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Defend
Workflows","v8.16.0","backport:version","v8.17.0"],"title":"[EDR
Workflows] Fix alert_test.cy.ts
flakiness","number":198516,"url":"https://github.com/elastic/kibana/pull/198516","mergeCommit":{"message":"[EDR
Workflows] Fix alert_test.cy.ts flakiness
(#198516)","sha":"04ad8964558d98fbe8dd8788d09f30fa4bfd0b55"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198516","number":198516,"mergeCommit":{"message":"[EDR
Workflows] Fix alert_test.cy.ts flakiness
(#198516)","sha":"04ad8964558d98fbe8dd8788d09f30fa4bfd0b55"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Tomasz Ciecierski <[email protected]>
  • Loading branch information
kibanamachine and tomsonpl authored Oct 31, 2024
1 parent 50a4813 commit 8b7d186
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/osquery/cypress/e2e/roles/alert_test.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import { waitForAlertsToPopulate } from '@kbn/test-suites-xpack/security_solution_cypress/cypress/tasks/create_new_rule';
import { disableNewFeaturesTours } from '../../tasks/navigation';
import { initializeDataViews } from '../../tasks/login';
import { checkResults, clickRuleName, submitQuery } from '../../tasks/live_query';
Expand All @@ -31,9 +32,8 @@ describe('Alert Test', { tags: ['@ess'] }, () => {
onBeforeLoad: (win) => disableNewFeaturesTours(win),
});
clickRuleName(ruleName);
cy.getBySel('expand-event').first().click({ force: true });

cy.wait(500);
waitForAlertsToPopulate();
cy.getBySel('expand-event').first().click();
cy.getBySel('securitySolutionFlyoutInvestigationGuideButton').click();
cy.contains('Get processes').click();
});
Expand Down

0 comments on commit 8b7d186

Please sign in to comment.