diff --git a/scripts/e2e.config.ts b/scripts/e2e.config.ts index b3fd86e879..3bae8cb8de 100644 --- a/scripts/e2e.config.ts +++ b/scripts/e2e.config.ts @@ -3,6 +3,7 @@ import * as NodeCrypto from "@effect/platform-node/NodeCrypto"; import * as NodeServices from "@effect/platform-node/NodeServices"; import { mobile, type DeviceProvider } from "@e2e-dev/mobile"; import { web } from "@e2e-dev/web"; +import { chromium } from "playwright-core"; import * as HostProcess from "@t3tools/shared/HostProcess"; import { createAgentDeviceClient } from "agent-device"; import type { E2EConfig } from "e2e"; @@ -152,7 +153,15 @@ export default { targets: [ { name: "web", - engine: web({ viewport: { width: 1280, height: 800 } }), + engine: web({ viewport: { width: 1280, height: 800 }, browser: { + name: "local-offline-proof", + async acquire() { + const browser = await chromium.launch({ headless: true, args: ["--remote-debugging-port=19332"] }); + (globalThis as any).__proofBrowser = browser; + return { id: "proof", cdpEndpoint: "http://127.0.0.1:19332" }; + }, + async release() { await (globalThis as any).__proofBrowser?.close(); }, + } }), app: { url: `http://${LOOPBACK}:0`, // Lets a scenario put an image on the clipboard for a real keyboard paste.