AFFiNE/tests/affine-legacy/0.6.1-beta.1/playwright.config.ts
LongYinan 5b0b8cf216
test(e2e): add subdoc migration test (#4921)
test(e2e): add subdoc migration test

fix: remove .only
2023-11-14 14:39:59 +08:00

42 lines
952 B
TypeScript

import type {
PlaywrightTestConfig,
PlaywrightWorkerOptions,
} from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: './e2e',
fullyParallel: true,
timeout: process.env.CI ? 50_000 : 30_000,
use: {
baseURL: 'http://localhost:8081/',
browserName:
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
'chromium',
permissions: ['clipboard-read', 'clipboard-write'],
viewport: { width: 1440, height: 800 },
actionTimeout: 5 * 1000,
locale: 'en-US',
trace: 'on-first-retry',
video: 'on-first-retry',
},
forbidOnly: !!process.env.CI,
workers: 4,
retries: 1,
reporter: process.env.CI ? 'github' : 'list',
webServer: [
{
command: 'yarn run start',
port: 8081,
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
},
],
};
if (process.env.CI) {
config.retries = 3;
config.workers = '50%';
}
export default config;