-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
playwright.config.ts
41 lines (39 loc) · 1.04 KB
/
playwright.config.ts
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
39
40
41
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';
const config: PlaywrightTestConfig = {
reporter: 'list',
retries: 3,
fullyParallel: process.env.CI ? false : true,
timeout: process.env.CI ? 10000 : 30000,
use: {
baseURL: 'http://localhost:6006/iframe.html',
viewport: {
height: 720,
width: 1280,
},
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
testMatch: /.*\.spec\.ts$/,
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
testMatch: [/set-theme\.spec\.ts$/],
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
testMatch: [/set-theme\.spec\.ts$/],
},
],
webServer: {
// double-quotes are required for Windows
command: `node -e "import('express').then(({ default: e }) => e().use(e.static('./dist/storybook')).listen(6006))"`,
port: 6006,
reuseExistingServer: process.env.CI ? false : true,
},
};
export default config;