/
web-test-runner.pw.config.mjs
29 lines (27 loc) · 1.07 KB
/
web-test-runner.pw.config.mjs
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
import { playwrightLauncher } from '@web/test-runner-playwright';
import { defaultReporter } from '@web/test-runner';
import { junitReporter } from '@web/test-runner-junit-reporter';
import localConfig from './web-test-runner.config.mjs';
export default {
...localConfig,
name: 'playwright',
watch: false,
reporters: [
// use the default reporter only for reporting test progress
defaultReporter({ reportTestResults: true, reportTestProgress: true }),
// use another reporter to report test results
junitReporter({
outputPath: './playwright-result.xml',
reportLogs: true, // default `false`
}),
],
concurrentBrowsers: 1,
// amount of test files to execute concurrently in a browser. the default value is based
// on amount of available CPUs locally which is irrelevant when testing remotely
concurrency: 1,
browsers: [
playwrightLauncher({ product: 'chromium' }),
playwrightLauncher({ product: 'firefox' }),
playwrightLauncher({ product: 'webkit' }),
].filter(b => !process.env.BROWSER || b.name.startsWith(process.env.BROWSER)),
};