-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
57 lines (53 loc) · 1.36 KB
/
Copy pathplaywright.config.ts
File metadata and controls
57 lines (53 loc) · 1.36 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
import { defineConfig, devices } from '@playwright/test';
/**
* Playwright configuration for Ledgard E2E tests.
* Tests run against the local Govard dev server at https://ledgard.test/
*
* To run tests:
* 1. Start Govard services: govard up
* 2. Run tests: npx playwright test
*/
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'https://ledgard.test',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
ignoreHTTPSErrors: true, // For local dev with self-signed certs
},
projects: [
{
name: 'mobile',
use: {
...devices['iPhone 13'],
viewport: { width: 390, height: 844 }
},
},
{
name: 'tablet',
use: {
viewport: { width: 768, height: 1024 }
},
},
{
name: 'desktop',
use: {
...devices['Desktop Chrome'],
viewport: { width: 1440, height: 900 }
},
},
],
// Run local dev server if not already running
// Comment this out if using Govard manually
// webServer: {
// command: 'npm run dev',
// url: 'https://ledgard.test',
// reuseExistingServer: !process.env.CI,
// ignoreHTTPSErrors: true,
// },
});