Files
Jordan Ritter 662f757cd6 fix(showcase): un-skip gen-ui-interrupt tests — fix provisional agent race + resolve timing
Wait for CopilotKit runtime POST to complete before interacting so
messages aren't silently dropped by the provisional agent stub.
Defer resolve() via setTimeout so React commits the picked/cancelled
badge before useInterrupt unmounts the card. Add candidateSlots() to
the TS interrupt-agent to match the Python agent. Parse JSON-stringified
interrupt values in interrupt-headless. Default playwright configs to
local aimock.
2026-05-20 09:31:09 -07:00

36 lines
1021 B
TypeScript

import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
testDir: "./tests/e2e",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: "html",
use: {
baseURL: process.env.BASE_URL || "http://localhost:3000",
trace: "on-first-retry",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
webServer: process.env.CI
? undefined
: {
command: "pnpm dev",
url: "http://localhost:3000",
reuseExistingServer: true,
env: {
...process.env,
// Default to local aimock (Docker-exposed) when not set.
// In CI the env is inherited from docker-compose (http://aimock:4010/v1).
OPENAI_BASE_URL:
process.env.OPENAI_BASE_URL || "http://localhost:4010/v1",
OPENAI_API_KEY: process.env.OPENAI_API_KEY || "sk-mock-local-dev",
},
},
});