forked from DFXswiss/services
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.synpress.config.ts
More file actions
68 lines (60 loc) · 1.84 KB
/
playwright.synpress.config.ts
File metadata and controls
68 lines (60 loc) · 1.84 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
/**
* Playwright Configuration for MetaMask E2E Tests
*
* This config uses custom fixtures that:
* 1. Launch Chrome 126 (last version with Manifest V2 support)
* 2. Manually load MetaMask 11.9.1 extension
* 3. Use Synpress's MetaMask class for wallet interactions
*
* Run with: npx playwright test --config=playwright.synpress.config.ts
*
* Prerequisites:
* 1. npm run synpress:setup (installs Chrome 126 + downloads MetaMask)
*/
import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: './e2e/synpress',
// Run custom spec files that use our custom fixtures
testMatch: [
'eip5792-custom.spec.ts',
'sepolia-usdt-sell.spec.ts',
'sepolia-full-metamask.spec.ts',
'sepolia-real-tx.spec.ts',
'sell-complete.spec.ts',
'sepolia-sell-e2e.spec.ts', // New complete E2E test
],
snapshotDir: './e2e/screenshots',
snapshotPathTemplate: '{snapshotDir}/{testFileName}-{arg}-{projectName}-{platform}{ext}',
outputDir: './e2e/synpress-results',
// Tests must run sequentially (shared wallet state)
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
workers: 1,
reporter: process.env.CI ? 'html' : [['list'], ['html', { open: 'never', outputFolder: 'synpress-report' }]],
// Longer timeout for wallet interactions
timeout: 120000,
use: {
baseURL: 'http://localhost:3001',
trace: 'on',
screenshot: 'on',
video: 'on',
// Must be headed mode for extension loading
headless: false,
},
// No projects needed - our custom fixtures handle browser launch
projects: [
{
name: 'chromium-metamask',
use: {
// Custom fixtures override the browser launch
},
},
],
webServer: {
command: 'npm start',
url: 'http://localhost:3001',
reuseExistingServer: !process.env.CI,
timeout: 120000,
},
});