The storage classes sidebar entry is rendered as a button, not a link.
Fix the flaky E2E test by changing getByRole('link') to getByRole('button').
Fixes PRI-935
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Fix two bugs from PRI-879 QA review:
- HEADLAMP_URL is now written to .env.e2e unconditionally, before
attempting token generation. Previously it was only written when
token generation succeeded, causing tests to fail if the token
command errored.
- ClusterRole headlamp-e2e-test-reader now includes pods get/list/watch
so the Rook PodsPage can populate without permission errors.
Does not address the popup race in auth.setup.ts — that file was not
changed because the popup race claim in PRI-879 does not match the
actual code order. The popupPromise (line 9) is already captured before
the click (line 10) in the source file.
Fixes: PRI-879
Co-Authored-By: Paperclip <noreply@paperclip.ing>
The headlamp-e2e-test service account needs cluster-wide read permissions
for storageclasses, cephclusters, persistentvolumes, and
persistentvolumeclaims so the Rook plugin sidebar can populate these
resources without errors.
- Add ClusterRole headlamp-e2e-test-reader with get/list/watch on
storageclasses, cephclusters, cephclusters/status, persistentvolumes,
persistentvolumeclaims
- Add ClusterRoleBinding headlamp-e2e-test-crb binding the role to
the headlamp-e2e-test service account
- Update teardown to also clean up the ClusterRole and ClusterRoleBinding
Fixes: PRI-741
Co-Authored-By: Paperclip <noreply@paperclip.ing>