diff --git a/scripts/e2e.config.ts b/scripts/e2e.config.ts index dc10e32f7a..e8ea62f4bd 100644 --- a/scripts/e2e.config.ts +++ b/scripts/e2e.config.ts @@ -2,7 +2,8 @@ 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 { defineEngine } from "e2e/engine"; import * as HostProcess from "@t3tools/shared/HostProcess"; import { createAgentDeviceClient } from "agent-device"; import type { E2EConfig } from "e2e"; @@ -147,12 +148,22 @@ const simlock = (device: string): DeviceProvider => { }; }; +const webEngine = web({ viewport: { width: 1280, height: 800 } }); +const { capabilities, ...webDefinition } = webEngine; +const imeEngine = defineEngine({ + ...webDefinition, + fixtures: { + ...webEngine.fixtures, + nativeInput: (context) => context.fixture("nativeInput", surfaceOf(webEngine)!, {}), + }, +}); + export default { tests: "scenarios/**/*.e2e.ts", targets: [ { name: "web", - engine: web({ viewport: { width: 1280, height: 800 } }), + engine: imeEngine, app: { url: `http://${LOOPBACK}:0`, // Vite answers before the server does; this path is proxied to the server.