-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
40 lines (38 loc) · 1022 Bytes
/
Copy pathplaywright.config.js
File metadata and controls
40 lines (38 loc) · 1022 Bytes
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
import { defineConfig } from '@playwright/test';
import { menuOrder } from './src/lib/site/sites.js';
const family = ['menu', ...menuOrder];
const firstPort = 4173;
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: true,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 1 : 0,
workers: process.env.CI ? 2 : undefined,
reporter: process.env.CI ? [['line'], ['html', { open: 'never' }]] : 'line',
use: {
colorScheme: 'dark',
reducedMotion: 'reduce',
screenshot: 'only-on-failure',
trace: 'retain-on-failure'
},
projects: [
{
name: 'chromium',
testMatch: /experience-contracts\.spec\.js/,
use: { browserName: 'chromium' }
},
{
name: 'webkit-core',
testMatch: /webkit-core\.spec\.js/,
use: { browserName: 'webkit' }
}
],
webServer: family.map((site, index) => {
const port = firstPort + index;
return {
command: `node scripts/serve-build.js ${site} ${port}`,
url: `http://127.0.0.1:${port}/`,
reuseExistingServer: false
};
})
});