fix(plugin-e2e): adapt alert rule advanced mode detection to Grafana 13.2#2762
Merged
Merged
Conversation
Collaborator
Author
|
Alternative to #2758 |
konstantinmv
approved these changes
Jul 9, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Grafana 13.2 removed the frontend usage of the
alertingQueryAndExpressionsStepModefeature toggle (grafana/grafana#125086), which broke the nightly E2E run (29000729249) in two ways:AlertRuleEditPage.isAdvancedModeSupported()decided the editor mode by reading the toggle from boot data. On 13.2 the toggle is inert, so the page objects assumed the legacy editor while Grafana rendered the simplified step, andgetQueryRow()timed out looking for a query row title that doesn't exist there. It now detects the mode from the DOM instead: wait for the query step to mount, then check for the advanced mode switch.alerting.basicMode.spec.tsforces the toggle off to test the legacy no-switch editor. That configuration no longer exists on >= 13.2, so the spec is skipped there. alerting.advancedMode.spec.ts covers the same scenarios on those versions.Also makes the boot data override mutate the existing
featureTogglesanduserobjects in place instead of replacing them. The runtime config keeps a reference to the original object, so replacing it means plugins never see the override when the callback runs after config construction. This is what madequeryEditor.tlsEnabledflaky on nightly.Verified against grafana-enterprise nightly (13.2.0-28985753600, the build that failed in CI), 13.1.0 and 11.0.11: the alerting and feature-toggles suites are green on all three.
Which issue(s) this PR fixes:
n/a