Files
thu-maic--openmaic/playwright.config.ts
wehub-resource-sync c48612c494
CI / E2E Tests (push) Has been cancelled
CI / Lint, Typecheck & Unit Tests (push) Has been cancelled
Docs Build / Build docs site (push) Has been cancelled
Publish @openmaic packages / Build, validate & publish (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:03:23 +08:00

32 lines
979 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './e2e/tests',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: process.env.CI ? 'html' : 'list',
use: {
baseURL: 'http://localhost:3002',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: process.env.CI ? 'pnpm build && pnpm start' : 'pnpm dev',
url: 'http://localhost:3002',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
// Enable the MAIC Editor (Pro mode) so editor e2e can reach it. This is a
// build-time NEXT_PUBLIC_* flag, so it must be set when the webServer runs
// `pnpm build` (CI) or `pnpm dev` (local).
env: { PORT: '3002', NEXT_PUBLIC_MAIC_EDITOR_ENABLED: 'true' },
},
});