-
Notifications
You must be signed in to change notification settings - Fork 153
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
30 lines (28 loc) · 949 Bytes
/
playwright.config.ts
File metadata and controls
30 lines (28 loc) · 949 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
import {defineConfig, devices} from "@playwright/test";
const port = 4173;
const baseURL = `http://127.0.0.1:${port}`;
/**
* E2E tests run against a production build (`vite preview`).
* Set the same Aptos API Gateway key for both `VITE_APTOS_*` (client bundle)
* and `APTOS_*` (SSR) in CI so browser and server share one identity and
* avoid extra rate-limit pressure from mismatched keys.
*/
export default defineConfig({
testDir: "./e2e",
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: process.env.CI ? "github" : "list",
use: {
baseURL,
trace: "on-first-retry",
},
projects: [{name: "chromium", use: {...devices["Desktop Chrome"]}}],
webServer: {
command: `pnpm exec vite preview --host 127.0.0.1 --port ${port} --strictPort`,
url: baseURL,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});