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:
copilot-swe-agent[bot]
2026-01-08 14:40:53 +00:00
parent 20e9472bb3
commit df795327f8
2 changed files with 15 additions and 3 deletions

View File

@@ -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',
},
},
});

View File

@@ -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"