Files
noteflow/client/playwright.config.ts
2026-01-14 23:23:01 -05:00

40 lines
937 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
const baseURL = process.env.NOTEFLOW_E2E_BASE_URL ?? 'http://localhost:1420';
const isCi = Boolean(process.env.CI);
export default defineConfig({
testDir: './e2e',
timeout: 60_000,
expect: {
timeout: 10_000,
},
retries: isCi ? 2 : 0,
workers: isCi ? 1 : undefined,
reporter: isCi ? 'github' : 'list',
use: {
baseURL,
headless: true,
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
actionTimeout: 10_000,
navigationTimeout: 30_000,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
// Web server configuration for running e2e tests
webServer: process.env.NOTEFLOW_E2E_NO_SERVER
? undefined
: {
command: 'npm run dev',
url: baseURL,
reuseExistingServer: !isCi,
timeout: 120_000,
},
});