Fix webServer health check URL - Playwright tests now working

- Changed webServer url from http://localhost:3000 to /api/health endpoint
- Root path returns 404 (no configured homepage), causing Playwright to hang
- Health endpoint returns 200 OK, allowing Playwright to detect server readiness
- Added DATABASE_URL env var to webServer configuration
- Added stdout/stderr piping for better debugging

Tests now run successfully:
- 4/5 smoke tests passing
- Server starts and responds correctly
- Prisma connects and queries work
- Only expected failure is test checking for landing page buttons (404 page)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-08 14:16:50 +00:00
parent 73f34d0a9e
commit 84e91569c8

View File

@@ -49,8 +49,13 @@ export default defineConfig({
// Run your local dev server before starting the tests
webServer: {
command: 'npm --prefix frontends/nextjs run db:generate && npm --prefix frontends/nextjs run dev',
url: 'http://localhost:3000',
url: 'http://localhost:3000/api/health',
reuseExistingServer: !process.env.CI,
timeout: 300 * 1000,
stdout: 'pipe',
stderr: 'pipe',
env: {
DATABASE_URL: 'file:../../prisma/prisma/dev.db',
},
},
});