diff --git a/scripts/e2e.config.ts b/scripts/e2e.config.ts index 4f96f6a518..c0080fbb09 100644 --- a/scripts/e2e.config.ts +++ b/scripts/e2e.config.ts @@ -156,7 +156,7 @@ export default { app: { url: `http://${LOOPBACK}:0`, // Lets a scenario put an image on the clipboard for a real keyboard paste. - permissions: { "clipboard-write": "grant" }, + permissions: { "clipboard-write": "grant", "clipboard-read": "grant" }, // Vite answers before the server does; this path is proxied to the server. readyUrl: `http://${LOOPBACK}:{port}/.well-known/t3/environment`, command: { diff --git a/scripts/scenarios/t3.ts b/scripts/scenarios/t3.ts index 7855d6398e..81875e1264 100644 --- a/scripts/scenarios/t3.ts +++ b/scripts/scenarios/t3.ts @@ -331,6 +331,14 @@ export const rpcClient = Effect.fn("scenario.rpcClient")(function* (home: string export const test = base.extend<{ t3: T3 }>({ t3: async ({ app, browser }, use) => { const { state, cleanup, trackProject } = makeState(T3_HOME); + const screenshot = app.screenshot.bind(app); + app.screenshot = async (label) => { + await browser.evaluate(async () => { + await Promise.allSettled(document.getAnimations().filter((animation) => animation.effect?.getComputedTiming().iterations !== Infinity).map((animation) => animation.finished)); + return null; + }); + return screenshot(label); + }; await use({ ...state, trackProject,