-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
70 lines (68 loc) · 2.29 KB
/
Copy pathplaywright.config.ts
File metadata and controls
70 lines (68 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { defineConfig, devices } from '@playwright/test'
import { OWNER, STORAGE_STATE } from './e2e/auth'
// Dedicated port so the suite never reuses a running `pnpm dev` (3000).
const PORT = 3210
const baseURL = `http://localhost:${PORT}`
const FAKE_AGENT_PORT = 3211
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI ? [['html', { open: 'never' }], ['github']] : 'list',
globalSetup: './e2e/global-setup.ts',
use: {
baseURL,
trace: 'on-first-retry',
storageState: STORAGE_STATE,
},
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
webServer: [
{
command: 'node e2e/fake-agent.mjs',
url: `http://localhost:${FAKE_AGENT_PORT}`,
reuseExistingServer: !process.env.CI,
env: { FAKE_AGENT_PORT: String(FAKE_AGENT_PORT) },
},
{
// Real production build (Nitro output), not the dev server.
command: 'pnpm db:migrate && pnpm build && node .output/server/index.mjs',
url: baseURL,
reuseExistingServer: !process.env.CI,
timeout: 180_000,
env: {
DATABASE_URL: 'e2e.db',
TELEMETRY_PROVIDER: 'fixtures',
JUDGE_PROVIDER: 'fixtures',
PORT: String(PORT),
BETTER_AUTH_URL: baseURL,
BETTER_AUTH_SECRET: 'e2e-better-auth-secret-do-not-use-in-prod',
LOUPE_OWNER_EMAIL: OWNER.email,
LOUPE_OWNER_PASSWORD: OWNER.password,
DATASET_RUN_ENDPOINT: `http://localhost:${FAKE_AGENT_PORT}/v1/responses`,
MCP_REGISTRY_REFS_JSON: JSON.stringify([
{
id: 'weather',
name: 'Weather Service',
endpoint: `http://localhost:${FAKE_AGENT_PORT}/mcp/weather`,
transport: 'streamable-http',
ownerTeam: 'platform',
},
{
id: 'search',
name: 'Search API',
endpoint: `http://localhost:${FAKE_AGENT_PORT}/mcp/search`,
transport: 'streamable-http',
},
{
id: 'notes',
name: 'Notes Service',
endpoint: `http://localhost:${FAKE_AGENT_PORT}/mcp/notes`,
transport: 'streamable-http',
ownerContact: 'notes@team',
},
]),
},
},
],
})