Conversation
There was a problem hiding this comment.
Pull request overview
Updates the @grafana/plugin-e2e test harness to align with the latest @grafana/e2e-selectors, adjusting affected selectors/usages and tweaking the local Grafana docker setup to keep the e2e suite stable.
Changes:
- Bump
@grafana/e2e-selectorsto a newer build. - Update a panel edit test and alert rule page object to use updated selector/label behavior.
- Disable Grafana
splashScreenanddashboardNewLayoutsfeature toggles in the plugin-e2e docker compose environment.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/plugin-e2e/tests/as-admin-user/panel/panelEdit.spec.ts | Updates a color picker option label to match new selector/label expectations. |
| packages/plugin-e2e/src/models/pages/AlertRuleEditPage.ts | Switches default query row lookup to use Grafana selectors instead of a hard-coded test id. |
| packages/plugin-e2e/package.json | Bumps @grafana/e2e-selectors dependency version. |
| packages/plugin-e2e/docker-compose.yaml | Disables splash screen and new dashboard layouts to reduce e2e friction. |
| }, | ||
| "dependencies": { | ||
| "@grafana/e2e-selectors": "13.0.0-23624974663", | ||
| "@grafana/e2e-selectors": "13.0.0-24159250795", | ||
| "semver": "^7.5.4", | ||
| "uuid": "^13.0.0", | ||
| "yaml": "^2.3.4" |
There was a problem hiding this comment.
@grafana/e2e-selectors was bumped here, but the repo-level package-lock.json still pins the previous version. This will cause CI installs to keep using the old selectors unless the lockfile is updated (run npm install / update the lockfile).
| return new AlertRuleQuery(this.ctx, this.ctx.page.getByTestId('query-editor-row')); | ||
| return new AlertRuleQuery( | ||
| this.ctx, | ||
| this.getByGrafanaSelector(this.ctx.selectors.components.QueryEditorRows.rows) |
There was a problem hiding this comment.
In the advanced-mode-disabled branch, QueryEditorRows.rows is passed directly as the query root. Since this selector represents a collection of rows (used elsewhere with .filter()/.last()), this can unintentionally target multiple rows and later actions may fail Playwright strictness or operate on the wrong row. Narrow the locator to a single row (e.g. .first()), or otherwise uniquely identify the default row.
| this.getByGrafanaSelector(this.ctx.selectors.components.QueryEditorRows.rows) | |
| this.getByGrafanaSelector(this.ctx.selectors.components.QueryEditorRows.rows).first() |
Playwright test results
Troubleshooting404 when clicking on
|
sunker
left a comment
There was a problem hiding this comment.
Thanks a lot for raising this @ashharrison90!
I created an issue for adding support for new dashboard layout and splash screen in plugin e2e. Will look into this asap.
|
🚀 PR was released in |
What this PR does / why we need it:
dashboardNewLayoutsWhich issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
📦 Published PR as canary version:
Canary Versions✨ Test out this PR locally via:
npm install @grafana/plugin-e2e@3.4.13-canary.2569.24237094857.0 # or yarn add @grafana/plugin-e2e@3.4.13-canary.2569.24237094857.0