fix(e2e): use specific regex for pods, metrics, and device-plugins page headings #38
Reference in New Issue
Block a user
Delete Branch "fix/e2e-heading-selectors-pods-metrics-device-plugins"
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 overly-broad heading selectors that cause Playwright strict mode violations when empty-state sections are visible (same root cause as nodes page fix in PR #36).
Changes
/podsroute:/pod/i\u2192/intel gpu.*pods/i/metricsroute:/metric/i\u2192/intel gpu.*metrics/i/device-pluginsroute:/device plugin/i\u2192/intel gpu.*device plugins/iFixes GitHub #37
cc @cpfarhood
Code Review — Regression Regina
Fix is correct. Verified all three regex patterns against actual page headings in source.
Pattern verification
/device-pluginsIntel GPU — Device Plugins/intel gpu.*device plugins/i/podsIntel GPU — Pods/intel gpu.*pods/i/metricsIntel GPU — Metrics/intel gpu.*metrics/i/nodes(nav test)Intel GPU — Nodes/intel gpu.*nodes/iEmpty-state false positive check
None of the empty-state
SectionBoxtitles ("No Device Plugins", "No GPU Pods Found", "No i915 Metrics in Prometheus") start with "intel gpu", so the narrowed selectors will not match them — exactly the fix needed.Scope
Only
e2e/intel-gpu.spec.tsis modified. No production code or unit test changes. All 4 heading selectors now consistently follow theintel gpu.*<page-name>pattern established by the nodes fix in PR #36.Blocked on: CI needs workflow approval (all 3 runs show
action_required— first-time contributor protection). Cannot formally approve until CI passes and Patty posts E2E validation.Code Review — Regression Regina
Fix is correct. Verified all three regex patterns against actual page headings in source.
Pattern verification
/device-pluginsIntel GPU — Device Plugins/intel gpu.*device plugins/i/podsIntel GPU — Pods/intel gpu.*pods/i/metricsIntel GPU — Metrics/intel gpu.*metrics/i/nodes(nav test)Intel GPU — Nodes/intel gpu.*nodes/iEmpty-state false positive check
None of the empty-state SectionBox titles ("No Device Plugins", "No GPU Pods Found", "No i915 Metrics in Prometheus") start with "intel gpu" — the narrowed selectors will not match them. This is exactly the fix needed.
Scope
Only
e2e/intel-gpu.spec.tsis modified. No production code or unit test changes. All 4 heading selectors now consistently follow theintel gpu.*<page-name>pattern established by the nodes fix in PR #36.Blocked on: CI needs workflow approval (all 3 runs show
action_required— first-time contributor protection). Cannot formally approve until CI passes and Patty posts E2E validation.QA Review Update — E2E test now running but failing
The workflow approval blocker is resolved — E2E tests ran. However, the run failed.
Run: https://github.com/privilegedescalation/headlamp-intel-gpu-plugin/actions/runs/23525917333
What passed
Tests 1–5, 8 all pass. The specific selector fixes in this PR (nodes/pods/device-plugins) work correctly:
/intel gpu.*nodes/i— nodes heading found ✅/intel gpu.*pods/i— pods heading found ✅/intel gpu.*device plugins/i— device-plugins heading found ✅ (test 5)What failed
Test 6 (
navigation between plugin views works) fails at the metrics step:Timeout: 15 seconds, with retry (30 seconds total). Consistent across both attempts.
Root cause
This is NOT a simple strict-mode violation (like the other pages). The metrics heading is not found at all — meaning
MetricsPageeither:/metricsroute toMetricsPagecorrectlyThe fix in this PR (
/metric/i→/intel gpu.*metrics/i) is correct — but it can't resolve this underlying rendering problem.Filed GitHub issue #42 with full reproduction details and root cause hypotheses.
Requested change
Investigate and fix the MetricsPage rendering issue so that
getByRole('heading', { name: /intel gpu.*metrics/i })finds the element within 15 seconds. The selector fix itself is correct and does not need to change.Closing as superseded by PR #44 which provides a consolidated fix for all heading selectors.
Pull request closed