feat(e2e): consolidate E2E infra + add waitForSidebar (PRI-700) #57

Closed
privilegedescalation-engineer[bot] wants to merge 10 commits from gandalf/e2e-fix-kube-vip into main

10 Commits

Author SHA1 Message Date
Chris Farhood d202ca42d6 fix(e2e): reference @main workflow after .github merge
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-05 17:43:44 +00:00
Chris Farhood 019366ff01 fix(e2e): use LoadBalancer IP for HEADLAMP_URL
Previous approaches (port-forward to Service/Pod) failed with 'connection
refused' — the runner cannot tunnel to pod IPs through the API server.

Switch to LoadBalancer service type:
- After rollout, poll kubectl get svc for status.loadBalancer.ingress[0].ip
- Once assigned, poll http://<lb-ip>:80 until reachable
- Write HEADLAMP_URL=http://<lb-ip>:80 to .env.e2e

The runner pod (in the cluster) can reach LoadBalancer IPs assigned
by the cloud controller or metallb.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-05 17:15:33 +00:00
Chris Farhood 9cc1ca7b91 fix(e2e): use NodePort instead of cluster-internal DNS for HEADLAMP_URL
Previous attempt used kubectl port-forward to a Service, which failed
with 'connection refused' — the API server could not reach pod IPs.

Switch to NodePort (30080) service type and use the node's InternalIP
for HEADLAMP_URL, reachable from the GitHub Actions runner pod.

- Change Service type from ClusterIP to NodePort with nodePort: 30080
- After rollout, get node InternalIP via kubectl get nodes
- Poll http://<node-ip>:30080 until reachable
- Write HEADLAMP_URL=http://<node-ip>:30080 to .env.e2e
- Remove port-forward leftover cleanup from teardown script

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-05 17:10:54 +00:00
Chris Farhood f1dd09c155 fix(e2e): use localhost via kubectl port-forward for HEADLAMP_URL
The browser runs outside the cluster and cannot resolve
headlamp-e2e.${E2E_NAMESPACE}.svc.cluster.local DNS names.

- Start kubectl port-forward in background after service rollout
- Poll until localhost:4466 is reachable before writing .env.e2e
- Write HEADLAMP_URL=http://localhost:4466 so Playwright browser can connect
- teardown: kill port-forward processes with pkill

Fixes PRI-752.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-05 17:03:13 +00:00
Chris Farhood 8b90535ec7 Merge branch 'gandalf/e2e-fix-kube-vip' into gandalf/e2e-fix-kube-vip-local 2026-05-05 14:07:33 +00:00
Chris Farhood 00df4a829f fix(e2e): add e2e script to package.json
Missing script caused ERR_PNPM_NO_SCRIPT in CI E2E step.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-05 14:06:49 +00:00
Chris Farhood 869d1c7225 fix(e2e): use .first() to handle strict mode violations with multiple headings (PRI-700)
The kube-vip page has both 'kube-vip — Overview' (h1) and 'kube-vip Not Detected' (h2) headings.
getByRole('heading', { name: /kube.vip/i }) resolves to both in strict mode. Using .first()
to match the first one (the overview heading) instead.
2026-05-05 13:55:54 +00:00
Chris Farhood 87798ecbe1 fix(e2e): add e2e npm script for reusable workflow (PRI-700)
The plugin-e2e.yaml reusable workflow runs 'npm run e2e' to execute
Playwright tests. This script was missing from the kube-vip plugin.
2026-05-05 13:49:56 +00:00
Chris Farhood 097ac48ecf feat(e2e): add @playwright/test to devDependencies
Required by PRI-700 / PRI-699: E2E test infra needs @playwright/test
as a direct devDependency.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-05 13:33:10 +00:00
Chris Farhood ced7d57895 feat(e2e): consolidate E2E test infrastructure + add waitForSidebar (PRI-700)
- Adds e2e/auth.setup.ts, e2e/kube-vip.spec.ts with waitForSidebar helper
- Adds playwright.config.ts, scripts/deploy-e2e-headlamp.sh, scripts/teardown-e2e-headlamp.sh
- Adds .github/workflows/e2e.yaml
- Fixes plugin settings test to wait for list before searching
2026-05-05 13:07:55 +00:00