fix: combine E2E infrastructure fixes (selectors + metrics heading + timeout) #45

Merged
privilegedescalation-engineer[bot] merged 4 commits from fix/e2e-selectors-and-metrics-heading into main 2026-04-11 14:05:48 +00:00

4 Commits

Author SHA1 Message Date
privilegedescalation-engineer 15ddba4f79 fix: add request timeout wrapper to prevent E2E test hang
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-25 11:26:01 +00:00
privilegedescalation-engineer 409830aa50 Merge PR #43: fix MetricsPage heading render and PR #44: fix e2e heading selectors (combined) 2026-03-25 11:21:52 +00:00
privilegedescalation-engineer 3228763b90 fix(e2e): use specific heading selectors to avoid strict mode violations
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>
2026-03-25 06:36:39 +00:00
Gandalf the Greybeard ff4a2810a5 fix: render heading immediately in MetricsPage, before ctxLoading resolves
The heading 'Intel GPU — Metrics' was blocked behind the ctxLoading check,
causing the E2E navigation test to timeout when navigating directly to
/c/main/intel-gpu/metrics. The K8s.ResourceClasses.useList() hooks
in IntelGpuDataContext can take time to resolve when navigating directly
to the metrics route (as opposed to via sidebar), causing ctxLoading to
remain true beyond the 15s test timeout.

Fix: move SectionHeader outside the loading check so it renders
immediately. The Loader now appears below the heading while waiting
for context to load. Also disable the Refresh button during ctxLoading.

Updated unit test to verify heading is visible even when ctxLoading=true.

Fixes: headlamp-intel-gpu-plugin#42

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-25 06:18:45 +00:00