-
Notifications
You must be signed in to change notification settings - Fork 193
/
playwright.config.ts
45 lines (42 loc) · 1.09 KB
/
playwright.config.ts
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
import { defineConfig, devices } from '@playwright/test';
import baseEnvUrl from './tests/utils/environmentBaseUrl';
require('dotenv').config();
export default defineConfig({
globalSetup: require.resolve('./tests/setup/global-setup'),
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: 0,
workers: undefined,
reporter: 'html',
// timeout: 5000,
use: {
storageState: 'storageState.json',
trace: 'on',
baseURL: process.env.ENV === 'production'
? baseEnvUrl.production.home
: process.env.ENV === 'staging'
? baseEnvUrl.staging.home
: baseEnvUrl.local.home
},
projects: [
{
name: 'auth-setup',
testMatch: /auth-setup\.ts/
},
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
storageState: 'storageState.json',
},
},
{
name: 'chromium-auth',
use: {
...devices['Desktop Chrome'] ,
// storageState: '.auth/admin.json', //use this in case you have multiple projects one per user
},
dependencies: ['auth-setup'],
},
],
});