import { type PartialWithUndefined } from '@augment-vir/common'; import { type Locator } from '@playwright/test'; import { type UniversalTestContext } from '../augments/universal-testing-suite/universal-test-context.js'; /** This is used for type extraction because Playwright does not export the types we need. */ declare function extractScreenshotMethod(): { (name: string | ReadonlyArray, options?: { animations?: "disabled" | "allow"; caret?: "hide" | "initial"; mask?: Array; maskColor?: string; maxDiffPixelRatio?: number; maxDiffPixels?: number; omitBackground?: boolean; scale?: "css" | "device"; stylePath?: string | Array; threshold?: number; timeout?: number; }): Promise; (options?: { animations?: "disabled" | "allow"; caret?: "hide" | "initial"; mask?: Array; maskColor?: string; maxDiffPixelRatio?: number; maxDiffPixels?: number; omitBackground?: boolean; scale?: "css" | "device"; stylePath?: string | Array; threshold?: number; timeout?: number; }): Promise; }; /** * Correct options for `locator.screenshot`. (Playwright's `LocatorScreenshotOptions` export is * wrong.) * * @category Internal * @default defaultScreenshotOptions */ export type LocatorScreenshotOptions = NonNullable>[0]>; /** * Default internal options for {@link LocatorScreenshotOptions}, used in {@link expectScreenshot} * * @category Internal */ export declare const defaultScreenshotOptions: { animations: "disabled"; caret: "hide"; timeout: number; scale: "css"; threshold: number; maxDiffPixelRatio: number; }; /** @category Internal */ export type TakeScreenshotOptions = PartialWithUndefined<{ /** If no locator is provided then the whole page is use. */ locator: Readonly; }> & Partial; /** * Get the path to save the given screenshot file name to. * * @category Internal */ export declare function getScreenshotPath(testContext: Readonly, screenshotBaseName: string): string; /** * Options for taking _and_ saving a screenshot. * * @category Internal */ export type SaveScreenshotOptions = TakeScreenshotOptions & { screenshotBaseName: string; }; /** * Take and immediately save a screenshot. * * @category Internal * @returns The path that the screenshot was saved to. */ export declare function takeScreenshot(testContext: Readonly, options: Readonly): Promise; /** * Similar to Playwright's `expect().toHaveScreenshot` but allows images to have different sizes and * has default comparison threshold options that are wide enough to allow testing between different * operating systems without failure (usually). * * @category Internal */ export declare function expectPlaywrightScreenshot(testContext: Readonly, options: Readonly): Promise; export {};