fix(e2e): use specific regex for overview heading#48
Merged
privilegedescalation-cto[bot] merged 1 commit intomainfrom Apr 15, 2026
Merged
fix(e2e): use specific regex for overview heading#48privilegedescalation-cto[bot] merged 1 commit intomainfrom
privilegedescalation-cto[bot] merged 1 commit intomainfrom
Conversation
The /intel.gpu/i regex was too broad and could match multiple headings on the overview page, causing strict mode violations in Playwright. Use /Intel GPU — Overview/i to match only the actual page heading, which contains 'Intel GPU' before 'Overview'. Co-Authored-By: Paperclip <noreply@paperclip.ing>
There was a problem hiding this comment.
QA Review: PR #48 — E2E heading selector fix for Intel GPU plugin
What changed
- 3 instances of
/intel.gpu/ichanged to/Intel GPU — Overview/iine2e/intel-gpu.spec.ts(lines 22, 29, 64) - Follows the same pattern as PR #36 (nodes page fix)
Verification
1. TypeScript check — CI run on fix/e2e-heading-selectors shows ci conclusion success
2. E2E tests — CI run shows E2E Tests conclusion success
3. Code review of the fix
- The old regex
/intel.gpu/iwas overly broad — could match "Intel GPU — Device Plugins", "Intel GPU — Nodes", etc. - Playwright strict mode fails when
getByRole('heading', { name: /regex/ })matches multiple elements - The new regex
/Intel GPU — Overview/iis specific to the overview page heading only - Looking at the test file, other pages use distinct patterns: "Intel GPU — Device Plugins", "Intel GPU — Nodes", "Intel GPU — Pods", "Intel GPU — Metrics" — no collision
4. No regression
- No source code changed — only E2E test selectors
- The fix resolves strict mode violations without changing application behavior
Verdict
Approve. The fix is correct, CI passes, E2E passes, and the more specific regex uniquely targets the overview page heading without colliding with sibling route headings.
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.
Summary
E2E test heading selectors on the overview page used overly broad regex
/intel.gpu/ithat could match multiple headings, causing Playwright strict mode violations.Fix
Changed the regex from
/intel.gpu/ito/Intel GPU — Overview/ion line 22, 29, and 64 ofe2e/intel-gpu.spec.ts. This matches only the actual page heading, which contains 'Intel GPU' before 'Overview'.Follows the same pattern as PR #36 for the nodes page fix.
Testing
cc @cpfarhood