Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Unskip bulk actions Cypress tests (#174365)
## Summary **Resolves: #171101 200 runs of bulk_edit_rules_actions.cy.ts in ESS env: [*Buildkite 4776*](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4776) 200 runs of bulk_edit_rules_actions.cy.ts in Serverless env: [*Buildkite 4777*](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4777) All tests were green except a couple tests that stopped abruptly mid-way because of CI runner timeouts. So there weren't failed tests. Two issues were causing fails: 1. `"hunter_no_actions"` role that was used in "User with no privileges can't add rule actions" test doesn't exist in Serverless env. Changed it to `"t1_analyst"` – it exists in both ESS and Serverless and doesn't give permission to edit rules. 2. Race condition caused by disabled auto-refresh - In the `beforeAll` hook the auto-refresh is disabled for the Rule Management page. - Then `excessivelyInstallAllPrebuiltRules` is called, which installs all 1000+ prebuilt rules (only in Serverless, because ESS has 0 prebuilt rules available to install). - While the installation is in progress the Rule Management page loads and displays 9 rules. - Then the test selects all rules (9) and executes a bulk update on them. - Once the bulk action succeeds, the user sees a toast with "1000+ actions have been updated" while the test expects "9 actions have been updated" because of disabled auto-refresh. - I decided to skip installing all the Elastic prebuilt rules because the operation is very heavy and we check that bulk actions work for prebuilt rules anyways since two test prebuilt rules are created and installed in beforeAll.
- Loading branch information