-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Cypress][Flake][Detection Engine] Fix flakey add/edit exception test #171697
Conversation
@elasticmachine merge upstream |
@@ -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 = () => { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: cc @yctercero |
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.