From ba71f087b111dd3ffad32bdf92d349cbc165e2db Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 8 Apr 2026 21:29:50 -0700 Subject: [PATCH] =?UTF-8?q?chore(e2e):=20=F0=9F=94=A7=20Update=20Playwrigh?= =?UTF-8?q?t=20test=20config=20and=20report=20template=20for=20parallel=20?= =?UTF-8?q?execution=20and=20structured=20HTML=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- @tooling/e2e/playwright-report/index.html | 2 +- @tooling/e2e/playwright.config.ts | 25 +++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/@tooling/e2e/playwright-report/index.html b/@tooling/e2e/playwright-report/index.html index 4eb7a93..819edc8 100644 --- a/@tooling/e2e/playwright-report/index.html +++ b/@tooling/e2e/playwright-report/index.html @@ -87,4 +87,4 @@ Error generating stack: `+l.message+`
- \ No newline at end of file + \ No newline at end of file diff --git a/@tooling/e2e/playwright.config.ts b/@tooling/e2e/playwright.config.ts index aa200c1..31647cb 100644 --- a/@tooling/e2e/playwright.config.ts +++ b/@tooling/e2e/playwright.config.ts @@ -1,17 +1,26 @@ import { createPlaywrightConfig } from '@lilith/playwright-e2e-docker'; +// In Docker e2e, PLAYWRIGHT_BASE_URL is set externally (companion-web container). +// In local dev, fall back to the dev server started via webServer. +const isDockerE2E = Boolean(process.env.PLAYWRIGHT_BASE_URL); +const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? 'http://localhost:5850'; + export default createPlaywrightConfig({ testDir: './e2e', appName: 'companion-web', devicePreset: 'mobile-chrome-only', fullyParallel: true, retries: 1, - baseURL: 'http://localhost:5850', - webServer: { - // Run from monorepo root (two levels up from @tooling/e2e) - command: 'pnpm -C ../.. --filter @companion/web dev', - port: 5850, - reuseExistingServer: true, - timeout: 60000, - }, + baseURL, + ...(isDockerE2E + ? {} + : { + webServer: { + // Run from monorepo root (two levels up from @tooling/e2e) + command: 'pnpm -C ../.. --filter @companion/web dev', + port: 5850, + reuseExistingServer: true, + timeout: 60000, + }, + }), });