Skip to content
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

[Cypress][Flake][Detection Engine] Fix flakey add/edit exception test #171697

Merged

Conversation

yctercero
Copy link
Contributor

Summary

Addresses #169382, #169274

Wasn't liking the 10s default rule interval in the test. Updated it to 1m that requires enabling/disabling to kick off a run.

@yctercero yctercero self-assigned this Nov 21, 2023
@yctercero yctercero added release_note:skip Skip the PR/issue when compiling release notes Team:Detection Engine Security Solution Detection Engine Area v8.12.0 labels Nov 21, 2023
@yctercero
Copy link
Contributor Author

yctercero commented Nov 21, 2023

@yctercero
Copy link
Contributor Author

@elasticmachine merge upstream

@yctercero yctercero marked this pull request as ready for review November 27, 2023 19:30
@yctercero yctercero requested review from a team as code owners November 27, 2023 20:15
@@ -54,7 +54,7 @@ export function visitRuleDetailsPage(ruleId: string, options?: VisitRuleDetailsP
visit(ruleDetailsUrl(ruleId, options?.tab), { role: options?.role });
}

export const enablesRule = () => {
export const clickEnableDisableSwitch = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need deterministic behavior here? If the rule was enabled for some reason this will disable it and the rest test logic won't be relevant. Should't some name like enableRuleViaSwitch() or just enableRule() should work better? On top of this the function should contain expectation that the switch in the right position.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name definitely is confusing. There's nothing about the existing util logic that's checking the actual status (enabled or disabled). I went ahead and separated it into two utils that check the status appropriately.

Copy link
Contributor

@nkhristinin nkhristinin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@kibana-ci
Copy link
Collaborator

💛 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 @yctercero

@yctercero
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Detection Engine Security Solution Detection Engine Area v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants