-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
38 lines (36 loc) · 1.19 KB
/
Copy pathplaywright.config.ts
File metadata and controls
38 lines (36 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { defineConfig, devices } from '@playwright/test';
const GALLERY_PORT = 9876;
const GALLERY_URL = `http://localhost:${GALLERY_PORT}/`;
export default defineConfig({
testDir: '.',
testMatch: [
'packages/main/src/components/**/test/*.spec.tsx',
'packages/charts/src/**/test/*.spec.tsx',
'playwright/test/**/*.spec.tsx',
],
testIgnore: ['**/*.cy.tsx', '**/*.cy.ts', '**/*.stories.tsx', '**/*.mdx'],
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
workers: process.env.CI ? '100%' : undefined,
reporter: process.env.CI ? [['list'], ['github']] : 'html',
timeout: 10_000,
expect: { timeout: 4000 },
webServer: {
command: `yarn vite --config playwright/gallery/vite.config.ts --port ${GALLERY_PORT} --strictPort`,
url: GALLERY_URL,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
use: {
baseURL: GALLERY_URL,
serviceWorkers: 'block',
reuseContext: true,
trace: 'on-first-retry',
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
],
});