The playwright.config.ts had `reuseExistingServer: !!process.env.CI` which meant CI would reuse (expect) an existing server while local dev would start one. This is backwards — in CI Playwright should manage the server, and in local dev you likely already have one running. Flip to `!process.env.CI` and remove the `CI: ""` env override from the workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
36 lines
934 B
TypeScript
36 lines
934 B
TypeScript
import { defineConfig } from "@playwright/test";
|
|
|
|
const PORT = Number(process.env.PAPERCLIP_E2E_PORT ?? 3100);
|
|
const BASE_URL = `http://127.0.0.1:${PORT}`;
|
|
|
|
export default defineConfig({
|
|
testDir: ".",
|
|
testMatch: "**/*.spec.ts",
|
|
timeout: 60_000,
|
|
retries: 0,
|
|
use: {
|
|
baseURL: BASE_URL,
|
|
headless: true,
|
|
screenshot: "only-on-failure",
|
|
trace: "on-first-retry",
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { browserName: "chromium" },
|
|
},
|
|
],
|
|
// The webServer directive starts `paperclipai run` before tests.
|
|
// Expects `pnpm paperclipai` to be runnable from repo root.
|
|
webServer: {
|
|
command: `pnpm paperclipai run`,
|
|
url: `${BASE_URL}/api/health`,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120_000,
|
|
stdout: "pipe",
|
|
stderr: "pipe",
|
|
},
|
|
outputDir: "./test-results",
|
|
reporter: [["list"], ["html", { open: "never", outputFolder: "./playwright-report" }]],
|
|
});
|