Skip to content

test: Fix Service Dashboards Scout wait (strict progressbar locator)#267796

Merged
jennypavlova merged 2 commits into
elastic:mainfrom
jennypavlova:256350-fix-test
May 6, 2026
Merged

test: Fix Service Dashboards Scout wait (strict progressbar locator)#267796
jennypavlova merged 2 commits into
elastic:mainfrom
jennypavlova:256350-fix-test

Conversation

@jennypavlova
Copy link
Copy Markdown
Member

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 #256350

Made with Cursor

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>
@jennypavlova jennypavlova requested review from a team as code owners May 5, 2026 16:24
@botelastic botelastic Bot added the Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation label May 5, 2026
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 5, 2026

Approvability

Verdict: 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.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 5, 2026

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 (DashboardsTab), replacing a generic progressbar role check with a waitFor on a specific test ID. Since the fix addresses strict-mode timing issues, a 30-run pass would help confirm stability.

Trigger a run with the Flaky Test Runner UI or post this comment on the PR:

/flaky scoutConfig:x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts:30

Share feedback in the #appex-qa channel.

Posted via Macroscope — Flaky Test Runner nudge

@jennypavlova
Copy link
Copy Markdown
Member Author

/flaky scoutConfig:x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts:30

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner

✅ Build triggered - kibana-flaky-test-suite-runner#12118

  • x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts x30

@kibanamachine
Copy link
Copy Markdown
Contributor

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.
[✅] x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts (--arch serverless --domain observability_complete): 30/30 tests passed.

see run history

@jennypavlova jennypavlova added backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels v9.3.0 v9.4.0 labels May 6, 2026
@jennypavlova jennypavlova self-assigned this May 6, 2026
@jennypavlova
Copy link
Copy Markdown
Member Author

/flaky scoutConfig:x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts:30

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner

✅ Build triggered - kibana-flaky-test-suite-runner#12130

  • x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts x30

Copy link
Copy Markdown
Contributor

@sbelastic sbelastic left a comment

Choose a reason for hiding this comment

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

LGTM

@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #153 / Cloud Security Posture POST /internal/cloud_security_posture/graph Happy flows Pinning should pin an event by document id and pin related entities

Metrics [docs]

✅ unchanged

History

cc @jennypavlova

@kibanamachine
Copy link
Copy Markdown
Contributor

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.
[✅] x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts (--arch serverless --domain observability_complete): 30/30 tests passed.

see run history

@jennypavlova jennypavlova merged commit c83fd87 into elastic:main May 6, 2026
32 checks passed
ersin-erdal pushed a commit to ersin-erdal/kibana that referenced this pull request May 6, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing test: Service Dashboards - displays a linked dashboard with a control group

3 participants