chore: isolate E2E tests on port 3015 to avoid dev server conflicts#131
Merged
chore: isolate E2E tests on port 3015 to avoid dev server conflicts#131
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Playwright E2E configuration to run the app server on port 3015 instead of 3000, preventing Playwright’s reuseExistingServer: true behavior from accidentally reusing a developer’s local dev server (and therefore the wrong database/env).
Changes:
- Switch Playwright
baseURLandwebServer.urltohttp://localhost:3015. - Set
PORT=3015in PlaywrightwebServer.envso the app actually binds to that port. - Update E2E auth helper
TEST_ORIGINto match the new port.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| playwright.config.ts | Moves E2E server URL/baseURL to 3015 and sets PORT in the spawned server env. |
| e2e/auth-helpers.ts | Aligns the Origin header used by helper requests with the new E2E port. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reuseExistingServer: true(the local default) would silently reuse a dev server on port 3000, which connects to the wrong database (postgresinstead oftest) and may lackNODE_ENV=development— causing test data leaks or auth failures.Changes
playwright.config.ts: UpdatedbaseURL,webServer.urltolocalhost:3015, and addedPORT: "3015"towebServer.env.e2e/auth-helpers.ts: UpdatedTEST_ORIGINtohttp://localhost:3015.