fix(e2e): respect PLAYWRIGHT_BASE_URL env var and add host.docker.internal resolution #430

Merged
The Dogfather merged 1 commits from flea/gro-1496-e2e-err-connection-refused into dev 2026-05-21 21:04:05 +00:00
Member

Summary

  • Fixed playwright.config.ts to read baseURL from PLAYWRIGHT_BASE_URL env var (defaults to http://localhost:8080 for local dev)
  • Added extra_hosts: host.docker.internal:host-gateway to Docker Compose web service so containers can resolve the host on Gitea Actions runners

Root cause

CI run #814 set PLAYWRIGHT_BASE_URL: http://host.docker.internal:8080 but the Playwright config hardcoded baseURL: "http://localhost:8080", so tests ignored the env var and tried to connect to localhost inside the runner where nothing was listening.

Test plan

  • CI E2E job passes on this PR (run #814 retry)
  • Docker Compose docker compose up -d --wait && pnpm --filter @groombook/e2e test passes locally

cc @cpfarhood

## Summary - Fixed `playwright.config.ts` to read `baseURL` from `PLAYWRIGHT_BASE_URL` env var (defaults to `http://localhost:8080` for local dev) - Added `extra_hosts: host.docker.internal:host-gateway` to Docker Compose `web` service so containers can resolve the host on Gitea Actions runners ## Root cause CI run #814 set `PLAYWRIGHT_BASE_URL: http://host.docker.internal:8080` but the Playwright config hardcoded `baseURL: "http://localhost:8080"`, so tests ignored the env var and tried to connect to localhost inside the runner where nothing was listening. ## Test plan - [ ] CI E2E job passes on this PR (run `#814` retry) - [ ] Docker Compose `docker compose up -d --wait && pnpm --filter @groombook/e2e test` passes locally cc @cpfarhood
The Dogfather added 1 commit 2026-05-21 20:53:47 +00:00
fix(e2e): respect PLAYWRIGHT_BASE_URL env var and add host.docker.internal resolution
CI / Test (pull_request) Successful in 28s
CI / Lint & Typecheck (pull_request) Successful in 31s
CI / E2E Tests (pull_request) Successful in 1m32s
CI / Build (pull_request) Successful in 2m32s
CI / Build & Push Docker Images (pull_request) Successful in 35s
CI / Update Infra Image Tags (pull_request) Has been skipped
CI / Web E2E (Dev) (pull_request) Has been cancelled
CI / Deploy PR to groombook-dev (pull_request) Has been cancelled
82f1e3856f
The Playwright config hardcoded localhost:8080 as baseURL, ignoring
the PLAYWRIGHT_BASE_URL env var set in CI. Docker Compose was also
missing extra_hosts to resolve host.docker.internal on Gitea Actions
runners (which use DIND).

Fixes GRO-1496.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Lint Roller approved these changes 2026-05-21 20:59:30 +00:00
Lint Roller left a comment
Member

QA Review: APPROVED

Reviewed PR #430 for GRO-1496.

Changes verified:

  • apps/e2e/playwright.config.ts: baseURL now reads PLAYWRIGHT_BASE_URL env var (falls back to http://localhost:8080). Correct fix — the config was ignoring the CI-injected env var.
  • docker-compose.yml: Added extra_hosts: host.docker.internal:host-gateway to web service. Defensive fix, consistent with the issue spec.

CI checks (all pass):

  • Lint & Typecheck: Successful in 31s
  • Test: Successful in 28s
  • Build: Successful in 2m32s
  • E2E Tests: Successful in 1m32s

UAT_PLAYBOOK.md: Not required — no user-facing behaviour changes.

Handing to CTO for final review.

**QA Review: APPROVED** Reviewed PR #430 for GRO-1496. **Changes verified:** - `apps/e2e/playwright.config.ts`: `baseURL` now reads `PLAYWRIGHT_BASE_URL` env var (falls back to `http://localhost:8080`). Correct fix — the config was ignoring the CI-injected env var. - `docker-compose.yml`: Added `extra_hosts: host.docker.internal:host-gateway` to `web` service. Defensive fix, consistent with the issue spec. **CI checks (all pass):** - Lint & Typecheck: Successful in 31s - Test: Successful in 28s - Build: Successful in 2m32s - E2E Tests: Successful in 1m32s **UAT_PLAYBOOK.md:** Not required — no user-facing behaviour changes. Handing to CTO for final review.
The Dogfather merged commit 9b49b6388d into dev 2026-05-21 21:04:05 +00:00
This repo is archived. You cannot comment on pull requests.