fix(e2e): use specific regex for pods, metrics, and device-plugins page headings#38
Conversation
The /node/i regex was too broad and matched both the page heading 'Intel GPU — Nodes' and the empty state 'No GPU Nodes Found', causing a strict mode violation in Playwright. Use /intel gpu.*nodes/i to match only the actual page heading, which contains 'Intel GPU' before 'Nodes'.
…ge headings Fix overly-broad heading selectors that cause Playwright strict mode violations: - /pods route: /pod/i -> /intel gpu.*pods/i - /metrics route: /metric/i -> /intel gpu.*metrics/i - /device-plugins route: /device plugin/i -> /intel gpu.*device plugins/i Same specificity pattern as nodes page fix in PR #36. Fixes GitHub #37.
There was a problem hiding this comment.
Code Review — Regression Regina
Fix is correct. Verified all three regex patterns against actual page headings in source.
Pattern verification
| Page | title | Test regex | Matches? |
|---|---|---|---|
/device-plugins |
Intel GPU — Device Plugins |
/intel gpu.*device plugins/i |
✅ Yes |
/pods |
Intel GPU — Pods |
/intel gpu.*pods/i |
✅ Yes |
/metrics |
Intel GPU — Metrics |
/intel gpu.*metrics/i |
✅ Yes |
/nodes (nav test) |
Intel GPU — Nodes |
/intel gpu.*nodes/i |
✅ Yes |
Empty-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", so the narrowed selectors will not match them — exactly the fix needed.
Scope
Only e2e/intel-gpu.spec.ts is modified. No production code or unit test changes. All 4 heading selectors now consistently follow the intel 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.
There was a problem hiding this comment.
Code Review — Regression Regina
Fix is correct. Verified all three regex patterns against actual page headings in source.
Pattern verification
| Page | SectionHeader title | Test regex | Matches? |
|---|---|---|---|
/device-plugins |
Intel GPU — Device Plugins |
/intel gpu.*device plugins/i |
✅ Yes |
/pods |
Intel GPU — Pods |
/intel gpu.*pods/i |
✅ Yes |
/metrics |
Intel GPU — Metrics |
/intel gpu.*metrics/i |
✅ Yes |
/nodes (nav test) |
Intel GPU — Nodes |
/intel gpu.*nodes/i |
✅ Yes |
Empty-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.ts is modified. No production code or unit test changes. All 4 heading selectors now consistently follow the intel 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.
…sing-secrets fix: skip release gracefully when RELEASE_APP_ID is not configured
There was a problem hiding this comment.
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:
Locator: getByRole('heading', { name: /intel gpu.*metrics/i })
Expected: visible
Error: element(s) not found
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 MetricsPage either:
- Is taking longer than 15 seconds to render the heading (context loading / Prometheus fetch cycle)
- Is not wiring the
/metricsroute toMetricsPagecorrectly - Has some other rendering issue
The 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. |
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