- Add Auth Context route role guards so doctors cannot directly enter template management, user management, or audit logs. - Add Audit Logs page, sidebar entry, frontend audit API client, and API client test. - Add backend audit log query endpoint with super/admin visibility rules and query filtering. - Extend PostgreSQL integration tests to cover audit log query permissions. - Move Playwright E2E away from localStorage seed data to real backend API login and seed helpers. - Add E2E coverage for route guards and audit log visibility. - Run Playwright backend on port 3100 and proxy Vite API requests there to avoid local port conflicts. - Make server:dev use the compiled NestJS server path, avoiding tsx parameter-property injection issues. - Update README, AGENTS, feature, testing, security, deployment, progress, API, backendization, and auth/user module docs.
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: true,
|
|
reporter: [['list']],
|
|
use: {
|
|
baseURL: 'http://localhost:3001',
|
|
trace: 'on-first-retry',
|
|
},
|
|
webServer: [
|
|
{
|
|
command: 'sh -c \'DATABASE_URL="${DATABASE_URL:-postgresql://surclaw:surclaw_dev_password@localhost:5433/surclaw?schema=public}" npx prisma migrate deploy --schema server/prisma/schema.prisma && DATABASE_URL="${DATABASE_URL:-postgresql://surclaw:surclaw_dev_password@localhost:5433/surclaw?schema=public}" npm run prisma:seed && API_PORT=3100 DATABASE_URL="${DATABASE_URL:-postgresql://surclaw:surclaw_dev_password@localhost:5433/surclaw?schema=public}" npm run server:dev\'',
|
|
url: 'http://localhost:3100/api/health',
|
|
reuseExistingServer: true,
|
|
timeout: 120_000,
|
|
},
|
|
{
|
|
command: 'VITE_API_PROXY_TARGET=http://localhost:3100 npm run dev',
|
|
url: 'http://localhost:3001',
|
|
reuseExistingServer: true,
|
|
timeout: 120_000,
|
|
},
|
|
],
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
});
|