diff --git a/scripts/e2e.config.ts b/scripts/e2e.config.ts index 4f96f6a518..1ae673f827 100644 --- a/scripts/e2e.config.ts +++ b/scripts/e2e.config.ts @@ -2,10 +2,11 @@ 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 { web, surfaceOf } from "@e2e-dev/web"; import * as HostProcess from "@t3tools/shared/HostProcess"; import { createAgentDeviceClient } from "agent-device"; import type { E2EConfig } from "e2e"; +import { defineEngine } from "e2e/engine"; import * as Effect from "effect/Effect"; import * as Path from "effect/Path"; import * as SecureRandom from "effect/crypto/SecureRandom"; @@ -147,12 +148,16 @@ const simlock = (device: string): DeviceProvider => { }; }; +const proofEngine = web({ viewport: { width: 1280, height: 800 } }); +const originalBrowser = proofEngine.fixtures!.browser!; +const bridgedEngine = defineEngine({ ...Object.fromEntries(Object.entries(proofEngine).filter(([key]) => key !== "capabilities")), fixtures: { browser: (context) => Object.assign(originalBrowser(context), { proofLive: surfaceOf(proofEngine) }) } }); + export default { tests: "scenarios/**/*.e2e.ts", targets: [ { name: "web", - engine: web({ viewport: { width: 1280, height: 800 } }), + engine: bridgedEngine, app: { url: `http://${LOOPBACK}:0`, // Lets a scenario put an image on the clipboard for a real keyboard paste.