mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
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:
@@ -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',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user