forked from input-output-hk/nami
-
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) · 1.17 KB
/
Copy pathplaywright.config.js
File metadata and controls
40 lines (38 loc) · 1.17 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
// @ts-check
const path = require('path');
const { defineConfig, devices } = require('@playwright/test');
const e2eServeConfig = path.join(__dirname, 'e2e', 'serve-e2e.json');
/**
* Layout regression tests for the popup UI. They need a production build and an unlocked wallet.
*
* Typical local run:
* npm run build:webpack
* npm run test:e2e
*
* Or serve `build/` yourself on 4179 and:
* LUCEM_E2E_SKIP_SERVE=1 npm run test:e2e
*/
module.exports = defineConfig({
testDir: './e2e',
timeout: 60_000,
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: 0,
workers: 1,
reporter: 'list',
projects: [{ name: 'chromium', use: { ...devices['Pixel 5'] } }],
use: {
baseURL: process.env.LUCEM_E2E_BASE_URL || 'http://127.0.0.1:4179',
trace: 'off',
},
webServer:
process.env.LUCEM_E2E_SKIP_SERVE === '1'
? undefined
: {
// cleanUrls: false — default serve 301 from *.html drops ?query (breaks createWalletTab bootstrap).
command: `npx serve build -l 4179 -c ${e2eServeConfig}`,
url: 'http://127.0.0.1:4179',
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});