import { ArgosAttachment, ArgosScreenshotOptions } from "@snapvisor/playwright"; import "@snapvisor/util/browser"; import { BrowserCommandContext } from "vitest/node"; import { ViewportSize } from "@snapvisor/browser"; //#region src/iframe.d.ts /** * Selector of the iframe Vitest renders the test into on the orchestrator page. */ export declare const VITEST_IFRAME_SELECTOR = "iframe[data-vitest=\"true\"]"; /** * ID of the Vitest "tester" element wrapping the iframe. */ export declare const VITEST_TESTER_ID = "vitest-tester"; /** * Undo the scale Vitest applies to the `#vitest-tester` element, so the * screenshot is captured at full size instead of shrunk. * * Only some Vitest versions scale the tester. Up to Vitest 4 a viewport larger * than the browser window is emulated by sizing the tester to the requested * viewport and shrinking it with a CSS `transform: scale(...)`. From Vitest 5 * the real browser viewport is resized instead, so the tester carries no * transform and there is nothing to undo — which is why an unscaled tester is * a no-op rather than an error. * * Detection reads the *computed* transform, so a scale set from a stylesheet * counts too, while the override goes on the inline style, which is the only * layer guaranteed to win. * * @returns A function restoring the transform after the screenshot. */ export declare function resetTesterScale(ctx: BrowserCommandContext): Promise<() => Promise>; /** * Resize the Vitest iframe. * * The story/test renders inside an `