Skip to content

[9.0] [Detection Engine] Cypress cleanup and simplification (#217276)#221991

Merged
rylnd merged 2 commits intoelastic:9.0from
rylnd:backport/9.0/pr-217276
May 30, 2025
Merged

[9.0] [Detection Engine] Cypress cleanup and simplification (#217276)#221991
rylnd merged 2 commits intoelastic:9.0from
rylnd:backport/9.0/pr-217276

Conversation

@rylnd
Copy link
Copy Markdown
Contributor

@rylnd rylnd commented May 30, 2025

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

## Summary

This PR attempts to simplify our Cypress tests to focus in on what
exactly we want a test to be doing. Many of our rule creation cypress
tests were testing rule creation, rule edit, rule details and more. This
results in a lot of flake and us triaging tests that often test things
other than what we're ultimately trying to answer.

I tried to simplify it so the rule specific tests simply answer - can we
create this rule type in the UI? Then there's a single test for checking
the entire flow of create rule -> rule details and check for alerts. The
FTRs should be ensuring that the rules generate alerts as expected so we
don't need to check this for every rule type in cypress.

I also moved alert suppression into it's own folder as there is a lot of
specific logic to test around that.

(cherry picked from commit 81c93ca)

# Conflicts:
#	x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression_ess_basic.cy.ts
@rylnd rylnd requested a review from kibanamachine as a code owner May 30, 2025 01:34
@rylnd rylnd added the backport This PR is a backport of another PR label May 30, 2025
@rylnd rylnd enabled auto-merge (squash) May 30, 2025 01:34
@rylnd
Copy link
Copy Markdown
Contributor Author

rylnd commented May 30, 2025

The failing test, Detection Engine - Security Solution Cypress Tests #1 / Alert Suppression license check - Rule Details EQL rule shows an upselling message on rule suppression details shows an upselling message on rule suppression details, is failing because it conflicts with #219870. This somehow didn't come up during the backport merge resolution, but I will remove that test from this PR now.

PR elastic#221991, which removed the Tech Preview from alert suppression for
EQL, was backported to 9.0 before this branch (which introduced a test
for said Tech Preview). Now that I'm backporting this branch, that test
is (expectedly) failing. This fixes that!
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@rylnd rylnd merged commit 9b7f760 into elastic:9.0 May 30, 2025
9 checks passed
@rylnd rylnd deleted the backport/9.0/pr-217276 branch May 30, 2025 19:07
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