Files
mnote/wolai-frontend/playwright.config.ts
T

35 lines
760 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
const STORYBOOK_PORT = 7007;
const STORYBOOK_URL = `http://127.0.0.1:${STORYBOOK_PORT}`;
export default defineConfig({
testDir: './tests/e2e',
timeout: 120_000,
expect: {
timeout: 5_000,
},
fullyParallel: false,
retries: process.env.CI ? 1 : 0,
use: {
baseURL: STORYBOOK_URL,
trace: 'retain-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: { width: 1440, height: 900 },
},
},
],
webServer: {
command: `pnpm storybook --ci -p ${STORYBOOK_PORT} --quiet`,
port: STORYBOOK_PORT,
reuseExistingServer: false,
timeout: 180_000,
},
});