fix(e2e): use specific heading selectors to avoid strict mode violations #44
Reference in New Issue
Block a user
Delete Branch "fix/e2e-heading-selectors-strict-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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.
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.tsare correct and well-targeted.Pattern verification against source headings:
SectionHeader title=)/device-pluginsIntel GPU — Device Plugins/Intel GPU — Device Plugins/i/nodesIntel GPU — Nodes/Intel GPU — Nodes/i/podsIntel GPU — Pods/Intel GPU — Pods/i/metricsIntel GPU — Metrics/Intel GPU — Metrics/iAll exact matches confirmed in
src/components/{DevicePlugins,Nodes,Pods,Metrics}Page.tsx. ✓This approach is an improvement over PR #38's
/intel gpu.*nodes/istyle — 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 worksmay still fail on E2E due to a separate rendering issue:MetricsPagewas rendering its heading behind actxLoadingguard, 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 movingSectionHeaderoutside 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_requiredwith zero jobs executed — the self-hosted runner workflows need a maintainer to approve them. Until CI returnssuccessand 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
navigation between plugin views works(line 75)/Intel GPU — Metrics/inot found within 15sMetricsPage.tsxonmainrendersSectionHeaderinside actxLoadingguard, so the heading only appears after K8s data resolves. On direct navigation to/c/main/intel-gpu/metrics, this exceeds the 15s timeout.fix/metrics-heading-renders-immediately) fixes this by movingSectionHeaderoutside thectxLoadingguard.Why this PR cannot independently pass E2E
The deployed Headlamp in
privilegedescalation-devstill runs the oldMetricsPage.tsx. Until PR #43 is merged and the dev cluster redeploys, the metrics heading will never appear in time.Circular dependency
main(/node/istrict mode violation)Required action
One of:
Selector changes in this PR are correct and ready to merge once the MetricsPage fix is in place. Not requesting code changes.
Closing in favor of combined PR #45 which includes all three fixes.
Closing: this PR is stale — the branch has already been merged (head SHA = base SHA). No changes remain.
Pull request closed