-
-
Notifications
You must be signed in to change notification settings - Fork 406
Expand file tree
/
Copy pathplaywright.config.base.ts
More file actions
76 lines (68 loc) · 2.1 KB
/
playwright.config.base.ts
File metadata and controls
76 lines (68 loc) · 2.1 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**
* Playwright base configuration for UX packages, for browser testing.
*
* This file is not intended to be used directly, but to be used by UX packages themselves.
* For example:
* ```typescript
* // src/Autocomplete/assets/playwright.config.ts
*
* import baseConfig from '../../../playwright.config.base';
*
* export default baseConfig;
* ```
*/
import { defineConfig, devices } from '@playwright/test';
import { browsers } from './bin/get_browsers.mjs';
export default defineConfig({
testMatch: ['**/test/browser/**/*.{test,spec}.ts', '**/test/**/*.browser.{test,spec}.ts'],
reporter: [
['list'],
['html', { open: process.env.CI ? 'never' : 'on-failure', outputFolder: '.playwright-report' }],
],
outputDir: '.playwright-output',
use: {
// Base URL to use in actions like `await page.goto('/')`.
baseURL: 'http://localhost:9876',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
trace: 'retain-on-failure',
},
projects: [
{
name: 'chrome-lowest',
use: {
...devices['Desktop Chrome'],
channel: 'chrome',
launchOptions: {
executablePath: browsers['chrome@lowest'].executablePath,
},
},
},
{
name: 'chrome-latest',
use: {
...devices['Desktop Chrome'],
channel: 'chrome',
launchOptions: {
executablePath: browsers['chrome@latest'].executablePath,
},
},
},
// TODO: Until we found a way to run a specific version of Firefox
//{
// name: 'firefox-lowest',
// use: {
// ...devices['Desktop Firefox'],
// launchOptions: {
// executablePath: browsers['firefox@lowest'].executablePath,
// }
// },
//},
{
name: 'firefox-latest',
use: {
...devices['Desktop Firefox'],
},
},
],
});