-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
42 lines (40 loc) · 1.11 KB
/
playwright.config.ts
File metadata and controls
42 lines (40 loc) · 1.11 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
import dotenv from "dotenv";
import { defineConfig, devices } from "@playwright/test";
dotenv.config();
export default defineConfig({
testDir: "./e2e/tests",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 3 : 1,
workers: process.env.CI ? 1 : undefined,
reporter: "html",
timeout: 60000,
use: {
baseURL: "http://localhost:3030",
trace: "on-first-retry",
screenshot: "only-on-failure",
headless: true,
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
// Default project — live RPC. Does not run the mocked suite.
testIgnore: ["**/shared/mocked/**"],
},
{
// Hermetic suite: mocks RPC + worker traffic via `page.route`. Used for
// strategy / fallover / error-path / large-tx tests that must be
// deterministic.
name: "mocked",
use: { ...devices["Desktop Chrome"] },
testMatch: ["**/shared/mocked/**/*.spec.ts"],
},
],
webServer: {
command: "npm run start",
url: "http://localhost:3030",
reuseExistingServer: !process.env.CI,
timeout: 120000,
},
});