fix(e2e): respect PLAYWRIGHT_BASE_URL env var and add host.docker.internal resolution #430
Reference in New Issue
Block a user
Delete Branch "flea/gro-1496-e2e-err-connection-refused"
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
playwright.config.tsto readbaseURLfromPLAYWRIGHT_BASE_URLenv var (defaults tohttp://localhost:8080for local dev)extra_hosts: host.docker.internal:host-gatewayto Docker Composewebservice so containers can resolve the host on Gitea Actions runnersRoot cause
CI run #814 set
PLAYWRIGHT_BASE_URL: http://host.docker.internal:8080but the Playwright config hardcodedbaseURL: "http://localhost:8080", so tests ignored the env var and tried to connect to localhost inside the runner where nothing was listening.Test plan
#814retry)docker compose up -d --wait && pnpm --filter @groombook/e2e testpasses locallycc @cpfarhood
QA Review: APPROVED
Reviewed PR #430 for GRO-1496.
Changes verified:
apps/e2e/playwright.config.ts:baseURLnow readsPLAYWRIGHT_BASE_URLenv var (falls back tohttp://localhost:8080). Correct fix — the config was ignoring the CI-injected env var.docker-compose.yml: Addedextra_hosts: host.docker.internal:host-gatewaytowebservice. Defensive fix, consistent with the issue spec.CI checks (all pass):
UAT_PLAYBOOK.md: Not required — no user-facing behaviour changes.
Handing to CTO for final review.