-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplaywright.config.ts
48 lines (41 loc) · 1.04 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
import dotenv from 'dotenv';
// Read from default ".env" file.
dotenv.config();
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
// Look for test files in the "tests" directory, relative to this configuration file.
testDir: 'tests',
// Reporter to use
reporter: 'html',
use: {
// Collect trace when retrying the failed test.
trace: 'on-first-retry',
},
// Configure projects for major browsers.
projects: [
{
name: "setup",
testMatch: /.*\.setup\.mjs/
},
{
name: 'block',
testMatch: /block\.auto\.mjs/,
use: {
...devices['Desktop Chrome'],
// Use prepared auth state.
storageState: 'playwright/.auth/user.json',
},
//dependencies: ["setup"],
},
{
name: 'follow',
testMatch: /follow\.auto\.mjs/,
use: {
...devices['Desktop Chrome'],
// Use prepared auth state.
storageState: 'playwright/.auth/user.json',
},
//dependencies: ["setup"],
},
],
});