-
-
Notifications
You must be signed in to change notification settings - Fork 262
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (37 loc) · 1.26 KB
/
Copy pathplaywright.config.ts
File metadata and controls
39 lines (37 loc) · 1.26 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
import { defineConfig, devices } from '@playwright/test';
/**
* Playwright configuration for the phpMyFAQ end-to-end test suite.
*
* The application under test is provisioned and served separately (see `bin/e2e`
* for local Docker / php -S runs and `.github/workflows/e2e-nightly.yml` for CI).
* The base URL is provided via the E2E_BASE_URL environment variable so the same
* specs run unchanged against a Dockerized HTTPS stack or a plain php -S server.
*/
const baseURL = process.env.E2E_BASE_URL ?? 'http://localhost:8765';
export default defineConfig({
testDir: './tests/e2e',
// One worker keeps the shared, seeded database deterministic across specs.
workers: 1,
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
timeout: 30_000,
expect: { timeout: 10_000 },
reporter: process.env.CI
? [['list'], ['html', { open: 'never' }], ['github']]
: [['list'], ['html', { open: 'never' }]],
use: {
baseURL,
// The Dockerized stack serves HTTPS with a self-signed dev certificate.
ignoreHTTPSErrors: true,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
});