Skip to content

fix(e2e): start Basic Auth tests from the Vite build output #7798

Description

@LadyBluenotes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions