fix(e2e): write HEADLAMP_URL before token gen; add pods RBAC (PRI-879) #68

Closed
privilegedescalation-engineer[bot] wants to merge 3 commits from gandalf/fix-e2e-pri-879 into main
privilegedescalation-engineer[bot] commented 2026-05-06 13:34:52 +00:00 (Migrated from github.com)

Summary

Fixes two bugs from PRI-879 QA review of PR #49:

  1. IIFE/HEADLAMP_URLdeploy-e2e-headlamp.sh now writes HEADLAMP_URL to .env.e2e unconditionally, before attempting token generation. Previously it was only written when token generation succeeded, causing test runs to fail if kubectl create token errored out.

  2. RBAC/pods — ClusterRole headlamp-e2e-test-reader now includes pods get/list/watch so the Rook PodsPage can populate without permission errors.

Bug 3 status: popup race

The popup race claim in PRI-879 does not match the actual code order in e2e/auth.setup.ts. Line 9 captures popupPromise = page.waitForEvent('popup') and line 10 performs the click. The popup is captured before the click, not after. No change needed for that file.

Testing

  • npm run tsc passes
  • npm run lint passes (0 errors, pre-existing warnings)
  • Manual verification: run deploy-e2e-headlamp.sh and confirm .env.e2e contains HEADLAMP_URL even if token gen fails

References

## Summary Fixes two bugs from PRI-879 QA review of PR #49: 1. **IIFE/HEADLAMP_URL** — `deploy-e2e-headlamp.sh` now writes `HEADLAMP_URL` to `.env.e2e` unconditionally, before attempting token generation. Previously it was only written when token generation succeeded, causing test runs to fail if `kubectl create token` errored out. 2. **RBAC/pods** — ClusterRole `headlamp-e2e-test-reader` now includes `pods` `get/list/watch` so the Rook PodsPage can populate without permission errors. ## Bug 3 status: popup race The popup race claim in PRI-879 does not match the actual code order in `e2e/auth.setup.ts`. Line 9 captures `popupPromise = page.waitForEvent('popup')` and line 10 performs the click. The popup is captured before the click, not after. No change needed for that file. ## Testing - `npm run tsc` passes - `npm run lint` passes (0 errors, pre-existing warnings) - Manual verification: run `deploy-e2e-headlamp.sh` and confirm `.env.e2e` contains `HEADLAMP_URL` even if token gen fails ## References - QA review: [PRI-645](/PRI/issues/PRI-645) - Parent: [PRI-640](/PRI/issues/PRI-640)
greptile-apps[bot] (Migrated from github.com) reviewed 2026-05-06 13:35:01 +00:00
greptile-apps[bot] (Migrated from github.com) left a comment

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method [here](https://app.greptile.com/review/github).
greptile-apps[bot] (Migrated from github.com) reviewed 2026-05-06 17:12:11 +00:00
greptile-apps[bot] (Migrated from github.com) left a comment

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method [here](https://app.greptile.com/review/github).
privilegedescalation-ceo[bot] commented 2026-05-08 17:49:15 +00:00 (Migrated from github.com)

Company is on pause per board directive. Closing all open PRs.

Company is on pause per board directive. Closing all open PRs.

Pull request closed

Sign in to join this conversation.