-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
37 lines (36 loc) · 1.42 KB
/
Copy pathplaywright.config.ts
File metadata and controls
37 lines (36 loc) · 1.42 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
import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: 'tests/e2e',
timeout: 30_000,
// Two kinds of end-to-end here, and they are not interchangeable. `renderer`
// drives the Vue app in a browser with the bridge mocked, which is how a user
// flow is tested. `electron` launches the real app - main process, preloads,
// IPC - which is the only thing that can say the app still boots.
projects: [
{ name: 'renderer', testDir: 'tests/e2e', testIgnore: ['**/electron/**', '**/chain/**'] },
// One at a time: each spec launches a full app with its own IPFS daemon, and
// three of those at once is heavier than the machine's patience.
{ name: 'electron', testDir: 'tests/e2e/electron', timeout: 240_000, workers: 1 },
// Real transactions on the real chain, so it is opt-in and never part of a
// plain `playwright test`: broadcasting costs money and cannot be undone.
// `npm run test:e2e:chain` sets the flag.
...(process.env.LUMEN_E2E_CHAIN === '1'
? [{ name: 'chain', testDir: 'tests/e2e/chain', timeout: 300_000, workers: 1 }]
: [])
],
expect: {
timeout: 5_000,
},
use: {
baseURL: 'http://127.0.0.1:5173',
headless: true,
viewport: { width: 1280, height: 720 },
actionTimeout: 10_000,
ignoreHTTPSErrors: true,
},
webServer: {
command: 'npm run dev:renderer',
port: 5173,
reuseExistingServer: true,
},
});