From df795327f81ec5b5e094c5da4aef2e3e688241a3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 14:40:53 +0000 Subject: [PATCH] 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> --- e2e/playwright.dbal-daemon.config.ts | 11 ++++++++--- frontends/nextjs/package.json | 7 +++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/e2e/playwright.dbal-daemon.config.ts b/e2e/playwright.dbal-daemon.config.ts index 652a0f579..784acbe39 100644 --- a/e2e/playwright.dbal-daemon.config.ts +++ b/e2e/playwright.dbal-daemon.config.ts @@ -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', + }, }, }); diff --git a/frontends/nextjs/package.json b/frontends/nextjs/package.json index 4c77e8096..dcd5acfac 100644 --- a/frontends/nextjs/package.json +++ b/frontends/nextjs/package.json @@ -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"