mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Add missing E2E test scripts to frontends/nextjs/package.json
- Added test:unit script for unit tests - Added test:e2e script referencing root Playwright config - Added test:e2e:ui, test:e2e:headed, test:e2e:debug scripts - Added test:e2e:report script - Added test:e2e:dbal-daemon script for daemon-specific tests - Fixed playwright.dbal-daemon.config.ts to use correct paths and health endpoint This resolves the CI blocker where workflows running from frontends/nextjs directory couldn't find these scripts. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e/dbal-daemon',
|
||||
testDir: './dbal-daemon',
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
@@ -19,9 +19,14 @@ export default defineConfig({
|
||||
},
|
||||
],
|
||||
webServer: {
|
||||
command: 'npm run dev',
|
||||
url: 'http://localhost:3000',
|
||||
command: 'npm --prefix ../../frontends/nextjs run db:generate && npm --prefix ../../frontends/nextjs run dev',
|
||||
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',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
"test": "vitest",
|
||||
"test:run": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:unit": "vitest run",
|
||||
"test:e2e": "playwright test --config=../../playwright.config.ts",
|
||||
"test:e2e:ui": "playwright test --config=../../playwright.config.ts --ui",
|
||||
"test:e2e:headed": "playwright test --config=../../playwright.config.ts --headed",
|
||||
"test:e2e:debug": "playwright test --config=../../playwright.config.ts --debug",
|
||||
"test:e2e:report": "playwright show-report",
|
||||
"test:e2e:dbal-daemon": "playwright test --config=../../e2e/playwright.dbal-daemon.config.ts",
|
||||
"db:generate": "prisma generate --schema=../../prisma/schema.prisma",
|
||||
"db:push": "prisma db push --schema=../../prisma/schema.prisma",
|
||||
"db:migrate": "prisma migrate deploy --schema=../../prisma/schema.prisma"
|
||||
|
||||
Reference in New Issue
Block a user