test: Fix Service Dashboards Scout wait (strict progressbar locator)#267796
Conversation
Wait for apmMainTemplateServiceAgentLoader instead of getByRole('progressbar'),
which matched multiple EUI spinners and violated Playwright strict mode. Align
dashboards tab navigation with metrics tab and service detail goToPage.
Closes elastic#256350
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pinging @elastic/obs-presentation-team (Team:obs-presentation) |
ApprovabilityVerdict: Would Approve Test-only change that replaces a generic progressbar locator with a more specific test ID locator for improved test stability. No production code or runtime behavior is affected. Macroscope would have approved this PR. A repo admin can enable approvability here. |
|
Catch flakiness early (recommended): run the flaky test runner against this PR before merging. This PR changes wait/timing logic in a shared Scout page object ( Trigger a run with the Flaky Test Runner UI or post this comment on the PR: Share feedback in the #appex-qa channel. Posted via Macroscope — Flaky Test Runner nudge |
|
/flaky scoutConfig:x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts:30 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#12118
|
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#12118[❌] x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts (--arch stateful --domain classic): 28/30 tests passed. |
|
/flaky scoutConfig:x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts:30 |
Flaky Test Runner✅ Build triggered - kibana-flaky-test-suite-runner#12130
|
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
|
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#12130[✅] x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts (--arch stateful --domain classic): 30/30 tests passed. |
…lastic#267796) ## Summary - Replaced `getByRole('progressbar')` in `DashboardsTab.waitForDashboardsToLoad` with a wait for `apmMainTemplateServiceAgentLoader` to be hidden. The generic progressbar role matched multiple concurrent EUI loaders (chrome, environment filter, service title, etc.) and caused Playwright **strict mode** failures. - Extended `waitForTabLoad` on the dashboards tab to wait for the same main template loader after the unified search bar is visible, matching `MetricsTab` / `ServiceDetailsPage.goToPage` and stabilizing navigation before the unlink test. ## Testing - Ran `service_dashboards.spec.ts` locally — passed. Expect serverless observability Scout (`local-serverless-observability_complete`) to validate after CI merges. Cc flaky Scout/serverless monitoring: worth confirming stability once merged. Closes elastic#256350 Made with [Cursor](https://cursor.com) Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
getByRole('progressbar')inDashboardsTab.waitForDashboardsToLoadwith a wait forapmMainTemplateServiceAgentLoaderto be hidden. The generic progressbar role matched multiple concurrent EUI loaders (chrome, environment filter, service title, etc.) and caused Playwright strict mode failures.waitForTabLoadon the dashboards tab to wait for the same main template loader after the unified search bar is visible, matchingMetricsTab/ServiceDetailsPage.goToPageand stabilizing navigation before the unlink test.Testing
service_dashboards.spec.tslocally — passed. Expect serverless observability Scout (local-serverless-observability_complete) to validate after CI merges.Cc flaky Scout/serverless monitoring: worth confirming stability once merged.
Closes #256350
Made with Cursor