Files
metabuilder/frontends/workflowui/test-server/playwright.config.ts
2026-03-09 22:30:41 +00:00

38 lines
941 B
TypeScript

/**
* Playwright Test Configuration
* For WorkflowUI E2E Tests
*/
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './',
testMatch: '**/*.spec.ts',
fullyParallel: false, // Run tests sequentially for database consistency
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1, // Single worker to avoid database conflicts
reporter: [
['list'],
['html', { outputFolder: 'test-results/html' }],
['json', { outputFile: 'test-results/results.json' }],
],
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
outputDir: 'test-results/',
timeout: 30000, // 30 seconds per test
expect: {
timeout: 10000, // 10 seconds for assertions
},
});