Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

1.1 KB
Raw Blame
/**
 * Browser checks against the component library: layout that only a real engine can measure.
 *
 *   pnpm --filter @adelie/ui-gallery test:e2e
 *
 * Starts the gallery's dev server, or reuses one already answering on the port outside CI.
 * `GALLERY_PORT` moves it off the gallery's fixed 7372, for a machine where another checkout's
 * gallery may already hold that port (a reused server would be testing the other checkout).
 * Needs Playwright's Chromium: `pnpm --filter @adelie/ui-gallery exec playwright
 * install chromium`.
 */
import { defineConfig } from "@playwright/test";
import { fileURLToPath } from "node:url";

const PORT = Number(process.env.GALLERY_PORT ?? 7372);
const BASE = `http://localhost:${PORT}`;

export default defineConfig({
  testDir: ".",
  timeout: 60_000,
  expect: { timeout: 10_000 },
  reporter: [["list"]],
  use: { baseURL: BASE, headless: true, trace: "retain-on-failure" },
  webServer: {
    command: `pnpm exec vite --port ${PORT}`,
    cwd: fileURLToPath(new URL("..", import.meta.url)),
    url: `${BASE}/lib.html`,
    reuseExistingServer: !process.env.CI,
    timeout: 120_000,
  },
});