forked from graphql-hive/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
49 lines (46 loc) · 1.28 KB
/
playwright.config.ts
File metadata and controls
49 lines (46 loc) · 1.28 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
// eslint-disable-next-line import/no-extraneous-dependencies -- required before loading e2e seed helpers
import 'reflect-metadata';
import { defineConfig, devices } from '@playwright/test';
if (process.env.RUN_AGAINST_LOCAL_SERVICES === '1') {
const dotenv = await import('dotenv');
dotenv.config({ path: import.meta.dirname + '/packages/services/server/.env.template' });
} else {
const dotenv = await import('dotenv');
dotenv.config({ path: import.meta.dirname + '/integration-tests/.env' });
}
const isCI = !!process.env.CI;
export default defineConfig({
testDir: './e2e/specs',
tsconfig: './e2e/tsconfig.json',
timeout: 60_000,
expect: {
timeout: 15_000,
},
fullyParallel: true,
forbidOnly: isCI,
retries: 0,
workers: isCI ? 4 : undefined,
reporter: isCI
? [['list'], ['github'], ['html', { open: 'never' }]]
: [['list'], ['html', { open: 'never' }]],
use: {
...devices['Desktop Chrome'],
baseURL: process.env.HIVE_APP_BASE_URL,
viewport: {
width: 1280,
height: 720,
},
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: isCI ? 'retain-on-failure' : 'off',
},
projects: [
{
name: 'chromium',
use: {
browserName: 'chromium',
channel: 'chrome',
},
},
],
});