Skip to content

Plugin-e2e: Fix toggle viz selector for Grafana < 12.4.0#2350

Merged
hugohaggmark merged 1 commit intomainfrom
hugoh/fix-e2e-selectors
Dec 17, 2025
Merged

Plugin-e2e: Fix toggle viz selector for Grafana < 12.4.0#2350
hugohaggmark merged 1 commit intomainfrom
hugoh/fix-e2e-selectors

Conversation

@hugohaggmark
Copy link
Copy Markdown
Contributor

@hugohaggmark hugohaggmark commented Dec 17, 2025

What this PR does / why we need it:

This pull request updates version checks in the PanelEditPage class to ensure compatibility with Grafana versions 12.4.0 and above. The changes adjust the logic for selecting visualization-related UI elements based on the Grafana version.

Which 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/create-plugin@6.4.5-canary.2350.20292287699.0
npm install @grafana/plugin-e2e@3.0.5-canary.2350.20292287699.0
# or 
yarn add @grafana/create-plugin@6.4.5-canary.2350.20292287699.0
yarn add @grafana/plugin-e2e@3.0.5-canary.2350.20292287699.0

@hugohaggmark hugohaggmark self-assigned this Dec 17, 2025
@hugohaggmark hugohaggmark added patch Increment the patch version when merged release Create a release when this pr is merged labels Dec 17, 2025
@hugohaggmark hugohaggmark moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team Dec 17, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 17, 2025

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged and will trigger a new patch release.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.

@hugohaggmark hugohaggmark changed the title plugin-e2e: fix toggle viz selector Plugin-e2e: Fix toggle viz selector for Grafana < 12.4.0 Dec 17, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Playwright test results

Image Name Version Result Report
grafana-dev 12.4.0-20287602058
grafana-enterprise 12.3.1
grafana-enterprise 11.6.9
grafana-enterprise 10.4.19
grafana-enterprise 9.3.16
grafana-enterprise 8.5.27
Troubleshooting

404 when clicking on View report

By default, the deploy-report-pages Action deploys reports to the gh-pages branch. However, you need to take an extra step to ensure that GitHub Pages can build and serve the site from this branch. To do so:

  1. Go to the Settings tab of your repository.
  2. In the left-hand sidebar, click on Pages.
  3. Under Source, select Deploy from a branch, then choose the gh-pages branch.

This action needs to be completed manually in order for your GitHub Pages site to be built and accessible from the gh-pages branch. Once configured, GitHub will automatically build and serve the site whenever new reports are deployed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes version compatibility logic in the PanelEditPage class by updating version comparison operators from semver.lte (less than or equal) to semver.lt (less than) with version 12.4.0. The change ensures that the correct UI selectors are used when toggling and retrieving visualization names in Grafana 12.4.0 and later versions.

Key changes:

  • Updated version comparison from ≤ 12.3.0 to < 12.4.0 for consistency
  • Applied the fix to both setVisualization() and getVisualizationName() methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hugohaggmark hugohaggmark merged commit 1bc1936 into main Dec 17, 2025
41 checks passed
@hugohaggmark hugohaggmark deleted the hugoh/fix-e2e-selectors branch December 17, 2025 06:01
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team Dec 17, 2025
@grafana-plugins-platform-bot
Copy link
Copy Markdown
Contributor

🚀 PR was released in @grafana/create-plugin@6.5.0, @grafana/plugin-e2e@3.1.0 🚀

@grafana-plugins-platform-bot grafana-plugins-platform-bot Bot added the released This issue/pull request has been released. label Dec 17, 2025
yesoreyeram pushed a commit to grafana/github-datasource that referenced this pull request Jan 5, 2026
Fixes failing e2e tests in 12.3.1 and 12.4.0 of grafana. See the changes
in grafana/plugin-tools#2350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Increment the patch version when merged release Create a release when this pr is merged released This issue/pull request has been released.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants