26 lines
837 B
TypeScript
26 lines
837 B
TypeScript
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,
|
|
...(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,
|
|
},
|
|
}),
|
|
});
|