forked from Celo-HaiTi/celoht-siteweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
32 lines (31 loc) · 1007 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
32 lines (31 loc) · 1007 Bytes
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
import { defineConfig, devices } from "@playwright/test";
/**
* End-to-end tests. Run `npx playwright install` once to fetch browser
* binaries before `npm run test:e2e` - see docs/TESTING.md. These are
* NOT run as part of `npm test` (that's Vitest, for unit tests) since
* e2e tests need a real browser and a running server.
*/
export default defineConfig({
testDir: "./e2e",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 1,
reporter: "html",
use: {
baseURL: "http://localhost:3000",
trace: "on-first-retry",
},
projects: [
{ name: "chromium", use: { ...devices["Desktop Chrome"] } },
{ name: "webkit", use: { ...devices["Desktop Safari"] } },
{ name: "mobile-chrome", use: { ...devices["Pixel 7"] } },
],
webServer: {
command: process.env.CI
? "npx --yes serve@14.2.6 out -l 3000"
: "npm run dev",
url: "http://localhost:3000",
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});