Files
PacketStation/tests/e2e/playwright.config.ts
T

30 lines
1.1 KiB
TypeScript
Raw Normal View History

import { defineConfig, devices } from "@playwright/test";
// Runs inside the playwright service of deploy/compose.ci.yaml.
// E2E_BASE_URL points at the app on the backend network. The scenarios share state
// (a registered device, a PIN), so they run in order on one worker.
export default defineConfig({
testDir: "./tests",
timeout: 60_000,
expect: { timeout: 10_000 },
retries: 0,
workers: 1,
fullyParallel: false,
forbidOnly: !!process.env.CI,
reporter: [["list"], ["html", { outputFolder: "playwright-report", open: "never" }]],
use: {
baseURL: process.env.E2E_BASE_URL ?? "http://ps-app:8000",
trace: "on-first-retry",
screenshot: "only-on-failure",
},
projects: [
{ name: "chromium", use: { ...devices["Desktop Chrome"] } },
// Phase 8: the PM, find bar and presence scenarios again at iPad landscape size, with touch.
{
name: "ipad",
testMatch: /(pm|findbar|presence)\.spec\.ts/,
use: { ...devices["Desktop Chrome"], viewport: { width: 1024, height: 768 }, isMobile: false, hasTouch: true },
},
],
});