-
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
[RsponseOps] Fix flaky rules list test #131567
[RsponseOps] Fix flaky rules list test #131567
Conversation
await assertRulesLength(1); | ||
|
||
// Select disabled | ||
await testSubjects.click('ruleStatusFilterOption-enabled'); | ||
await testSubjects.click('ruleStatusFilterOption-disabled'); | ||
await new Promise((res) => setTimeout(res, 1000)); |
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.
Is there anything on the page you can check for before asserting the rules length? Using a sleep like this is only going to work in very specific timing conditions which change constantly, and extending the sleep to work in more conditions just extends the length of CI unnecessarily.
If there's a loading message in the UI that tells users the list is updating, then we should use the same indication to tell the tests that the list is still loading, like:
await testSubjects.waitForDeleted('ruleTableLoading');
await assertRulesLength(1);
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.
Yup, checkout my wait
functions in this test
passing flaky test runner build: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/558 |
Pinging @elastic/response-ops (Team:ResponseOps) |
x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts_list.ts
Outdated
Show resolved
Hide resolved
another flaky test build: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/561 |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
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.
Nice work!
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
…hromium-to-print-pdf-part-1 * 'main' of github.com:elastic/kibana: (59 commits) [Cloud Posture] Enabled findings group by feature (elastic#131780) [EBT] Fix `userId` generation (elastic#131701) [RAM] Add shareable rule tag filter (elastic#130710) Optimize package installation performance, phase 2 (elastic#131627) [Screenshotting] instrument for benchmark tests using new EventLogger class (elastic#130356) [Connector] Adding internal route for requesting ad-hoc ServiceNow access token (elastic#131171) [ci] bump kibana-buildkite-library (elastic#131754) [Synthetics] UI clean up (elastic#131598) [RsponseOps] Fix flaky rules list test (elastic#131567) [Cases] Add severity field to create case (elastic#131626) [Discover] Monospace font in Document Explorer (elastic#131513) Sessions tab improvements (elastic#131583) Add cloud icon "ess-icon" at the end of the config keys in "alerting" documentation (elastic#131735) [DOCS] Updates deprecation text for legacy APIs (elastic#131741) [ci] break out skip patterns so they can change without triggering CI (elastic#131726) Adjust search session management page font size (elastic#131291) [Unified search] Fix uptime css problem (elastic#131730) [Actionable Observability] Link to filtered rules page (elastic#131629) Add openAPI specifications for cases endpoint (elastic#131275) Display rule API key owner to users who can manage API keys (elastic#131662) ... # Conflicts: # x-pack/plugins/screenshotting/server/formats/pdf/index.ts # x-pack/plugins/screenshotting/server/screenshots/observable.ts
* Add delay to make test less flaky * Addressed comments * Addressed comments
Summary
Resolves: #131535
Waits for the rules list to re-render before assertions