fix e2e: use button role for storage classes sidebar selector #69
Reference in New Issue
Block a user
Delete Branch "gandalf/fix-e2e-pri-935-storage-classes-button-role"
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 flaky E2E selector in
e2e/rook.spec.tsfor storage classes navigation test (PRI-935).getByRole('link')togetByRole('button')since Headlamp sidebar entries are rendered as buttons, not linksTesting
npm run lintpasses (0 errors, pre-existing warnings)npm run tscpassesReferences
cc @cpfarhood
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
UAT Review — PRI-935 (Pixel Patty)
Evidence Gathered
1. CI status: PASSING
2. Code change confirmed:
e2e/rook.spec.ts:47: changed fromgetByRole('link')togetByRole('button')headlamp-sealed-secrets-plugin/e2e/sealed-secrets.spec.ts:8which usessidebar.getByRole('button', { name: /sealed.secrets/i })3. E2E status: FAILING
4. Deploy script analysis:
scripts/deploy-e2e-headlamp.sh(updated in same PR) creates proper RBAC for storageclasses and cephclustersUAT Verdict: CONDITIONAL PASS
The fix is logically sound — Headlamp sidebar entries render as
<button>elements, not<a>tags, sogetByRole('button')is the correct selector. This is confirmed by the sealed-secrets plugin which uses the same pattern.UAT cannot complete browser validation because no E2E Headlamp instance is currently deployed to
headlamp-dev. The headlamp-dev namespace has no activeheadlamp-e2edeployment at this time.Recommendation: Retrigger the E2E workflow (
workflow_dispatch) or ask @Hugh_Hackman to verify the headlamp-dev E2E instance is provisioned and reachable before final merge. The code change itself is correct.cc @cpfarhood
UAT Review Update — PRI-935 (Pixel Patty)
Critical Finding: E2E Tested main Branch, NOT PR #69
I downloaded the Playwright test artifact from the main-branch E2E run (#25450721608). The test code in that artifact still uses
getByRole('link')on line 240 ofe2e/rook.spec.ts— this is the UNFIXED version. This means:Storage Classesappears asbutton "Storage Classes" [ref=e145], NOT a link. SogetByRole('button')is the right selector.element not foundforgetByRole('link'), while the page renders it as a button.E2E Status Summary
fe69dee842da5a26Root Cause of Deploy Failure (PR branch E2E)
The PR's E2E run (#25450002165) failed at step "Deploy E2E Headlamp instance" — before any test ran. The subsequent main-branch manual run (#25450721608) deployed successfully but tested the wrong code.
The Fix in PR #69 IS Correct
Based on page snapshot evidence from the artifact:
Storage Classessidebar entry renders asbutton, notlinkgetByRole('button', { name: /storage classes/i })matches the DOMheadlamp-sealed-secrets-plugin/e2e/sealed-secrets.spec.ts:8UAT Verdict: VALIDATION PENDING
Code quality: VERIFIED CORRECT — the
link→buttonchange is semantically correct and matches the DOM.Browser validation: CANNOT COMPLETE — the deploy step is failing on the PR branch, which blocks actual test execution. I cannot confirm the E2E passes with the fix until a run actually executes the test on the PR's code.
Blocking issue: @Hugh_Hackman — the
scripts/deploy-e2e-headlamp.shscript is failing at the deployment step on the PR branch. Please investigate why the deploy step fails before the test can run.Once the deploy step is fixed and E2E runs against PR #69's code, UAT can confirm the selector fix resolves the failure.
cc @cpfarhood @Hugh_Hackman
UAT Final Status — PRI-935 (Pixel Patty)
Summary of Findings
CI: PASSING (run #25450004937)
Code Fix: VERIFIED CORRECT
e2e/rook.spec.ts:47changed fromgetByRole('link')togetByRole('button')Storage Classesrenders asbutton [ref=e145], not a linkheadlamp-sealed-secrets-plugin/e2e/sealed-secrets.spec.ts:8E2E Test Result: FAILING (not due to selector)
getByRole('link')(old code, line 240 of unfixed version)element not found) IS the bug that PR #69 fixesDeploy Step Failure:
scripts/deploy-e2e-headlamp.shfails at "Deploy E2E Headlamp instance" step on the PR branch (run #25450002165). The subsequent main-branch run (which deployed successfully) used the UNFIXED code.Page Snapshot Evidence (from artifact test-failed-1.png context)
The
Storage Classesentry is abutton, NOT alink.getByRole('button')is the correct selector. The original test usedgetByRole('link')and failed — which is exactly what PR #69 fixes.Conclusion
PR #69 contains the correct fix. The selector change from
linktobuttonis justified by the DOM. The E2E has never run the fixed code due to the deploy step failing. This is an infrastructure issue, not a code issue.Recommendation: @Hugh_Hackman to investigate deploy step failure on PR branch. Once fixed, retrigger E2E to validate the selector fix passes.
UAT can approve once E2E actually runs the fixed test code and it passes.
cc @cpfarhood @Hugh_Hackman
UAT Update — PRI-935 — E2E Still Failing at Deploy Step
I triggered E2E against the PR branch again (run #25451539823). Same result: deploy step fails before tests run.
This Run's Step Timeline
Confirmed: PR Fix Cannot Be Tested
The PR #69 code fix (selector
link→button) is correct and verified via DOM snapshot. But the deploy step consistently fails, preventing E2E test execution against the PR's code.This is a consistent infrastructure failure — the deploy step fails 100% of the time on this PR branch. The deploy script changes in this PR may be incomplete or there may be a namespace/RBAC issue specific to the CI runner.
What I Cannot Do
What I CAN Confirm
getByRole('button'): matches the DOM ✅UAT Verdict: CANNOT APPROVE — BLOCKED
Blocking owner: @Hugh_Hackman
The fix in PR #69 is correct, but UAT cannot approve without an E2E run that actually executes the test against the fixed code. The deploy step failure must be resolved before UAT can complete.
No browser session evidence possible — no deployment exists and deploy step fails.
cc @cpfarhood @Hugh_Hackman
UAT Verdict — PRI-935 — CONDITIONAL APPROVAL
Following CTO triage guidance. Posting final UAT verdict based on available evidence.
Code Review: VERIFIED CORRECT ✅
The fix in
e2e/rook.spec.ts:47changesgetByRole('link')→getByRole('button'). This is correct.Evidence:
Storage Classesrenders asbuttonnotlink:headlamp-sealed-secrets-plugin/e2e/sealed-secrets.spec.ts:8which uses the samegetByRole('button')patternE2E Validation: BLOCKED ❌
The E2E workflow fails at the "Deploy E2E Headlamp instance" step on the PR branch. This has failed 3 consecutive times (runs #25450002165, #25451539823, and one earlier attempt). The test code is never executed.
No browser session possible — the deploy step failure means no headlamp-dev instance is available for manual browser testing.
Blocker
Owner: @Hugh_Hackman —
scripts/deploy-e2e-headlamp.shfails at the deploy step on this PR branch. E2E test execution is blocked.Recommendation
Verdict
CONDITIONAL APPROVAL — The code fix is correct. UAT approval is withheld pending E2E execution. Once deploy step is fixed and E2E passes against the PR code, UAT will upgrade to APPROVAL.
cc @cpfarhood @Hugh_Hackman
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Superseded by PR #72 — using Hugh's sidebar expansion approach from a clean main branch
Pull request closed