File size: 974 Bytes
489b6e2 | 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 | import { defineConfig, devices } from "@playwright/test";
const port = Number(process.env.E2E_PORT || 3110);
const host = "localhost";
const baseURL = `http://${host}:${port}`;
export default defineConfig({
testDir: "./tests/e2e",
timeout: 45_000,
expect: { timeout: 10_000 },
fullyParallel: false,
workers: 1,
use: {
baseURL,
trace: "retain-on-failure",
},
webServer: {
command: [
"PERSISTENT_STORE_PATH=.tmp/e2e-store.json",
"SESSION_SECRET=test-only-hipcamp-e2e-session-secret-32-bytes",
"SESSION_COOKIE_SECURE=false",
`npm run dev -- --host ${host} --port ${port}`,
].join(" "),
url: baseURL,
reuseExistingServer: false,
timeout: 120_000,
},
projects: [
{
name: "desktop",
use: { ...devices["Desktop Chrome"], viewport: { width: 1280, height: 900 } },
},
{
name: "mobile",
use: { ...devices["Pixel 5"], viewport: { width: 390, height: 844 } },
},
],
});
|