Switch Playwright tests to preview webServer — prod-URL deadlocks CI #112
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-app#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Bug
Lineage
Discovered during CI run of PR #111 (pipeline #125). DNS resolution was restored by reverting the rename, but 3 tests failed against the live prod URL because prod serves stale code (frontend is stuck on PR #95). Any PR that adds UI features can never pass e2e tests against prod — classic deadlock: tests gate deploys, deploys update the prod tests test against.
Repo
forgejo_admin/pal-e-appWhat Broke
playwright.config.tsruns tests againstprocess.env.PLAYWRIGHT_BASE_URL ?? 'https://pal-e-app.tail5b443a.ts.net'. That's the LIVE PROD URL. Which means:This was masked for weeks by the
pal-e-docs-apprename breaking DNS before tests even ran. With DNS fixed, we now see the underlying design flaw.Repro Steps
mainbut NOT in prod.Expected Behavior
Playwright builds the PR's own frontend via
npm run previewand runs tests againsthttp://localhost:4173. UI matches the branch's code. API calls still go topal-e-docs.tail5b443a.ts.net(depends on siblingpal-e-deploymentsCORS expansion issue).Environment
forgejo_admin/pal-e-apppal-e-deploymentsCORS allow_origins must include the preview origin (separate ticket)playwright.config.tslines 14-35 (webServer block exists but commented)Acceptance Criteria
webServerblock inplaywright.config.ts(builds + serves preview onlocalhost:4173)baseURLchanged tohttp://localhost:4173(remove prod URL default).woodpecker.yamlteststep no longer setsPLAYWRIGHT_BASE_URLenv var (or sets it explicitly to localhost:4173)update-kustomize-tagstep runs on green pipeline (siblingpal-e-deploymentsCORS ticket resolved by then)npm run build && npm run previewthennpx playwright testpasses against localhost:4173Out of Scope (follow-ups)
Related
forgejo_admin/pal-e-app#110— rename revert (prereq for this, will bundle into same PR #111)forgejo_admin/pal-e-deployments#{TBD}— CORS expansion for preview originfeedback_validate_before_done.md— tests must actually validate, not just run