-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
56 lines (54 loc) · 1.25 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
46
47
48
49
50
51
52
53
54
55
56
import { defineConfig, devices } from '@playwright/test';
import dotenv from 'dotenv';
dotenv.config();
const isPlaywrightOnCI = !!process.env.CI;
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './tests',
fullyParallel: false, // need to design dataFactory with admin users for parallel run
forbidOnly: isPlaywrightOnCI,
retries: isPlaywrightOnCI ? 2 : 0,
workers: isPlaywrightOnCI ? 1 : undefined,
reporter: [
['line'],
['junit', { outputFile: 'test-results/junit-results.xml' }],
[
'html',
{
open: 'never',
outputFolder: 'test-html-report/',
},
],
],
expect: {
timeout: 30 * 1000,
},
timeout: 2 * 60 * 1000,
globalTimeout: 10 * 60 * 1000,
use: {
headless: isPlaywrightOnCI,
baseURL: 'https://admin.moralis.io/',
testIdAttribute: 'data-testid',
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: {
mode: 'retain-on-failure',
size: { width: 1280, height: 720 },
},
launchOptions: {
slowMo: 50,
},
},
projects: [
{
name: 'auth',
testMatch: /.*.setup.ts/,
},
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
});