Skip to content

[8.15] [Security Solution] Fix some Prebuilt Rules Cypress tests not running in CI (#191978)#192852

Merged
kibanamachine merged 1 commit intoelastic:8.15from
kibanamachine:backport/8.15/pr-191978
Sep 13, 2024
Merged

[8.15] [Security Solution] Fix some Prebuilt Rules Cypress tests not running in CI (#191978)#192852
kibanamachine merged 1 commit intoelastic:8.15from
kibanamachine:backport/8.15/pr-191978

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.15:

Questions ?

Please refer to the Backport tool documentation

… in CI (elastic#191978)

**Resolves: elastic#192256

## Summary

This PR re-enables two Cypress test files that didn't run on CI:
`update_workflow.cy.ts` and `prebuilt_rules_preview.cy.ts`. It also
fixes failing tests in `prebuilt_rules_preview.cy.ts`.

### Changes
- Renamed `update_workflow.ts` -> `update_workflow.cy.ts`. It didn't run
on CI because it wasn't picked up by a glob
[here](https://github.com/elastic/kibana/blob/main/x-pack/test/security_solution_cypress/package.json#L14).
 - `prebuilt_rules_preview.cy.ts`:
- Moved `{ tags: ['@ess', '@serverless'] }` to the top-level `describe`
block instead of having it in a variable that is used in every
`describe`. Apparently the tool we use to parse tags doesn't recognize
tags in variables anymore, so this test didn't run in either ESS or
Serverless pipelines.
- Removed `describe('All environments' ... ` wrappers since they don't
add any value anymore. Didn't remove any actual tests.
- Reverted a change from this
[PR](elastic#181427) that added a
backdrop to the modal which doesn't allow user to switch rules without
closing the modal. We have a
[test](https://github.com/elastic/kibana/blob/main/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts#L1182)
that checks that such switching is possible and this test started to
fail once I reactivated the test file.
- Fixed selectors that grab filters in the Overview tab. The old ones
stopped working. Probably because of a change to the filters component
that is built by another team.

#### Correct behaviour: Switching between rules with flyout open

https://github.com/user-attachments/assets/da4a0902-657c-45fe-adc1-eb44ad0de798
(cherry picked from commit c65c2ae)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Sep 13, 2024
@kibanamachine kibanamachine enabled auto-merge (squash) September 13, 2024 12:05
@kibana-ci
Copy link
Copy Markdown

kibana-ci commented Sep 13, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @nikitaindik

@kibanamachine kibanamachine merged commit 24d9fd0 into elastic:8.15 Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants