fix(e2e): use specific heading selectors to avoid strict mode violations#44
fix(e2e): use specific heading selectors to avoid strict mode violations#44privilegedescalation-engineer[bot] wants to merge 1 commit intomainfrom
Conversation
Use full page heading text in E2E test selectors instead of generic short terms like /node/i or /pod/i that can match multiple SectionBox headings on the same page. Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
Re-requesting review — this PR includes the metrics heading selector fix (/Intel GPU — Metrics/i) that was identified as needed in PR #38. All heading selectors are now specific full titles to avoid strict mode violations. Unit tests pass (108/108). CI and E2E will run automatically. |
There was a problem hiding this comment.
QA Code Review — PRI-1006
Status: Code review complete. Blocked on CI approval + E2E validation.
Fix Analysis
The 4 selector changes in e2e/intel-gpu.spec.ts are correct and well-targeted.
Pattern verification against source headings:
| Route | Source heading (SectionHeader title=) |
New test selector | Match |
|---|---|---|---|
/device-plugins |
Intel GPU — Device Plugins |
/Intel GPU — Device Plugins/i |
✅ |
/nodes |
Intel GPU — Nodes |
/Intel GPU — Nodes/i |
✅ |
/pods |
Intel GPU — Pods |
/Intel GPU — Pods/i |
✅ |
/metrics |
Intel GPU — Metrics |
/Intel GPU — Metrics/i |
✅ |
All exact matches confirmed in src/components/{DevicePlugins,Nodes,Pods,Metrics}Page.tsx. ✓
This approach is an improvement over PR #38's /intel gpu.*nodes/i style — using the full exact heading string with the literal em dash eliminates any remaining ambiguity.
Local test results
Ran on this branch:
npm test: 108/108 passed ✓npm run tsc: 2 pre-existing TS errors onmainbranch (not introduced by this PR) ✓
Important dependency — MetricsPage rendering
This PR fixes the strict-mode violation selectors, but the metrics step in navigation between plugin views works may still fail on E2E due to a separate rendering issue: MetricsPage was rendering its heading behind a ctxLoading guard, causing the heading to not appear within the 15s timeout when navigating directly to /c/main/intel-gpu/metrics.
PR #43 (fix/metrics-heading-renders-immediately) addresses this by moving SectionHeader outside the loading check. This PR will likely only pass E2E if PR #43 is merged first (or combined into a single PR).
Relationship to open PRs
This PR supersedes the selector changes in PR #36 (nodes only) and PR #38 (pods/metrics/device-plugins). If this PR is merged, PRs #36 and #38 should be closed as duplicates.
Blocking on CI
All CI workflow runs on this branch show action_required with zero jobs executed — the self-hosted runner workflows need a maintainer to approve them. Until CI returns success and Patty posts E2E validation, I cannot formally approve.
QA Update — E2E Analysis (PRI-1016)E2E status: FAILED — the failure is caused by a missing dependency (PR #43 must be deployed first). Failure details
Why this PR cannot independently pass E2EThe deployed Headlamp in Circular dependency
Required actionOne of:
Selector changes in this PR are correct and ready to merge once the MetricsPage fix is in place. Not requesting code changes. |
…ing selectors (combined)
|
Closing in favor of combined PR #45 which includes all three fixes. |
Summary
Fix E2E test 'navigation between plugin views works' which was failing due to strict mode violations when looking up page headings.
The test used generic short regex patterns like which match multiple headings on pages with components that also contain 'node' in their titles.
Changes
cc @cpfarhood