Skip to content

fix(plugin-e2e): correct dashboard toolbar version thresholds - #2836

Merged
sunker merged 4 commits into
mainfrom
adamyeats/plugin-e2e-toolbar-version-thresholds
Aug 21, 2026
Merged

fix(plugin-e2e): correct dashboard toolbar version thresholds#2836
sunker merged 4 commits into
mainfrom
adamyeats/plugin-e2e-toolbar-version-thresholds

Conversation

@adamyeats

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

DashboardPage.toolbar maps a Grafana version to the toolbar that holds the time range controls.
Each threshold was the version at which the selector first existed, per @grafana/e2e-selectors.
At each of those versions the element is still behind a default-off feature toggle, so the getter
returns a locator for an element Grafana never renders:

Old threshold Selector Belongs to Default-on from
11.1.0 Dashboard.Controls scenes dashboard (dashboardScene) 11.3.0
9.4.0 NavToolbar.container top nav (topnav) 9.5.0

Anything scoping to toolbar then waits for a root that never appears. In TimeRange.set the
scoped click consumes the whole test budget, so its catch only runs during teardown and reports
locator.click: Target page, context or browser has been closed — which hides the real error,
Test timeout of 30000ms exceeded.

This moves both thresholds to the version at which each toolbar became the default. 9.5.0 is
already the threshold addPanel uses for the same top nav change, two branches down the same file.

Which issue(s) this PR fixes:

None filed — found while investigating the red 9.4.17 and 11.1.13 legs on #2832.

Special notes for your reviewer:

These versions reached CI for the first time this week. playwright.yml runs the full matrix only
on PRs that touch packages/plugin-e2e/**, and the resolver picks the latest patch of each minor
when it runs, so the set moves as Grafana publishes releases. The last full-matrix run before this
week resolved 9.3.16 and 11.0.11, which sit either side of both broken ranges. The nightly uses
limit: 1, so it only covers the latest stable and grafana-dev. Every plugin-e2e PR is affected
until this lands, including #2819.

Behaviour changes only for 9.4.x and 11.1.x–11.2.x, which are exactly the broken ranges. Every
other version resolves to the same selector as before. Verified against each version with the
compose environment from playwright.yml:

Grafana Resolves to Before After
8.5.27 .page-toolbar pass pass
9.4.17 .page-toolbar fail pass
11.0.11 Nav toolbar pass pass
11.1.13 Nav toolbar fail pass
11.2.10 Nav toolbar fail pass
13.2.0 dashboard controls pass pass

DashboardPage.test.ts locks all three branches and fails on 9.4.17, 11.1.13 and 11.2.10 with the
old thresholds.

@cla-assistant

cla-assistant Bot commented Aug 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@grafana-catalog-project-bot grafana-catalog-project-bot Bot moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team Aug 19, 2026

@sunker sunker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for raising this PR @adamyeats! What we usually do in situations like these is to temporarily uncomment this line to run the internal plugin-e2e tests in all supported version of Grafana. Would you mind doing that and verify all tests still pass?

@adamyeats

Copy link
Copy Markdown
Contributor Author

limit: 0 is on in the last commit, so this run covers every version from 8.5.0. I will report the result here and revert the line before merge.

@adamyeats
adamyeats requested a review from sunker August 20, 2026 20:20
codyconfer
codyconfer previously approved these changes Aug 20, 2026
@adamyeats

Copy link
Copy Markdown
Contributor Author

All 28 versions ran. 24 passed. Four failed: 9.5.21, 10.0.13, 10.1.10 and 11.5.10.

None of the four failed on the toolbar. I checked every errored action in their traces, and each one stalls on panel options groups, alert rule steps, query editor rows or panel menus. No errored action uses Nav toolbar, dashboard controls or .page-toolbar. The three versions this PR changes behaviour for (9.4.17, 11.1.13 and 11.2.10) all passed.

The four failures look pre-existing on versions the matrix has never included. I can raise a separate issue with the details if that is useful.

limit: 0 is reverted, so the diff is back to the two source files.

@sunker sunker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice 🚀

@sunker
sunker merged commit 96b3ace into main Aug 21, 2026
40 checks passed
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team Aug 21, 2026
@sunker
sunker deleted the adamyeats/plugin-e2e-toolbar-version-thresholds branch August 21, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

3 participants