learning_ai_common_plat/dashboards/tracker-web/playwright.config.ts
Saravana Kumar 67104b8ebc
Some checks failed
Publish @bytelyst/* packages / publish (push) Failing after 12s
CI — Common Platform / Build, Test & Typecheck (push) Successful in 48s
test(tracker-web): isolate e2e dev server
2026-05-30 19:36:07 +00:00

34 lines
996 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
baseURL: 'http://127.0.0.1:3103',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'pnpm exec next dev --webpack --hostname 127.0.0.1 --port 3103',
url: 'http://127.0.0.1:3103',
reuseExistingServer: process.env.E2E_REUSE_SERVER === '1',
timeout: 60_000,
// Provide the env vars /api/health requires so the health gate is deterministic.
// These are non-secret placeholders only used to exercise the health handler.
env: {
PLATFORM_API_URL: 'http://localhost:4003',
JWT_SECRET: 'e2e-placeholder-not-a-real-secret',
DEFAULT_PRODUCT_ID: 'tracker-e2e',
},
},
});