Files
AFFiNE-Mirror/playwright.config.ts
T
2022-12-27 15:53:05 +08:00

38 lines
1.0 KiB
TypeScript

import type { PlaywrightTestConfig } from '@playwright/test';
// import { devices } from '@playwright/test';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './tests',
timeout: 30 * 1000,
use: {
browserName: 'chromium',
viewport: { width: 1440, height: 800 },
actionTimeout: 5 * 1000,
// Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer
// You can open traces locally(`npx playwright show-trace trace.zip`)
// or in your browser on [Playwright Trace Viewer](https://trace.playwright.dev/).
trace: 'on-first-retry',
// Record video only when retrying a test for the first time.
video: 'on-first-retry',
},
retries: process.env.CI ? 3 : 0,
workers: '100%',
webServer: {
command: 'npm run dev',
port: 8080,
reuseExistingServer: true,
},
};
export default config;