fix(e2e): start Basic Auth tests from the Vite build output
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
The Basic Auth Playwright config builds the app with vite build, which writes dist/server/server.js, then starts the app through pnpm start. The package's start script still runs node .output/server/index.mjs, which does not exist after the Vite build.
The package test:e2e script also begins with exit 0;, so Nx reports success without running the browser suite.
Reproduction
cd e2e/react-start/basic-auth
pnpm run prisma-generate
pnpm exec playwright test tests/app.spec.ts --project=chromium --grep "Posts redirects to login when not authenticated"
The Vite build finishes, then Playwright fails to start its web server because .output/server/index.mjs is missing.
Expected behavior
The Basic Auth E2E suite should start the server produced by its Vite build and execute the Playwright tests.
Related Work: #3850, #3949
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in e2e/react-start/basic-auth by inspecting the Basic Auth Playwright configuration and the package's start and test:e2e scripts. Reproduce the failure with the provided pnpm commands, then verify that the server starts from dist/server/server.js and that the Playwright browser suite actually runs successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript, vite
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100