-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathplaywright.config.js
More file actions
34 lines (32 loc) · 1.06 KB
/
Copy pathplaywright.config.js
File metadata and controls
34 lines (32 loc) · 1.06 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
// SPDX-FileCopyrightText: 2017 - 2026 Badge.Team contributors
// SPDX-License-Identifier: MIT
import { defineConfig, devices } from '@playwright/test';
/**
* Browser tests for the CodeMirror editor.
*
* These need a running Hatchery, so they are not part of `npm test`. Point
* APP_BASE_URL at a server that has been seeded with `php artisan db:seed
* --class=E2eSeeder`, or let the webServer block below start one.
*/
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: false,
workers: 1,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 1 : 0,
reporter: process.env.CI ? [['github'], ['list']] : 'list',
use: {
baseURL: process.env.APP_BASE_URL || 'http://127.0.0.1:8000',
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
],
webServer: process.env.APP_BASE_URL ? undefined : {
command: 'php artisan serve --host=127.0.0.1 --port=8000',
url: 'http://127.0.0.1:8000/up',
reuseExistingServer: !process.env.CI,
timeout: 60_000,
},
});