/** * Pixels made by the browser the suite already pinned. * * The deferred path renders a document somewhere reproducible; this one asks the * page under test for its own screenshot, which is the only way to capture a * state a document cannot restate — and pays for it by having to declare the * launch that produced the pixels, because nothing else here can say which * machine, which flags, which scale. */ import type { Locator, Page } from '@playwright/test'; import { documentDigest } from '@variance-authority/core/format'; import type { PageRegion, Raster, RenderIdentity, SemanticSnapshot } from '@variance-authority/core/format'; import { acquireFrom } from './acquire.js'; import type { AcquireRequest } from './page-agent.js'; import type { InPlaceCaptureOptions } from './options.js'; export declare function stableRaster(page: Page, locator: Locator, document: Parameters[0], fonts: readonly string[], stabilization: RenderIdentity['stabilization'], region: Pick, options: InPlaceCaptureOptions, snapshot: SemanticSnapshot): Promise; /** * The timezone and locale the page under test runs in. * * Asked of the page, because it is the page's own: a suite that set * `timezoneId` or `locale` gets those, and a page the fixtures handed a suite * that set neither runs in `UTC`, pinned by `varianceRendererFixtures`, and * `en-US`, Playwright Test's default. A page handed to `createVariance` runs in * whatever its caller's context opened it in, the host's timezone when that * context set none. Either way the text it lays out was formatted in them, so * both keys and the render that paints it carry them. * * Source, not a function, for the reason {@link PROBE_FONTS} gives. */ export declare function regionOf(page: Page): Promise>; /** * One held reading of the subject and the raster taken of it. * * `held` is the acquisition the raster belongs to -- not necessarily the first * one, because a subject that was still moving is read again. */ export interface SettledCapture { readonly held: Awaited>; readonly snapshot: SemanticSnapshot; readonly raster: Raster; } /** * Photograph a live subject, letting it come to rest first. * * A subject captured in place is captured while the application is still * running, so "the page moved between the two reads that prove it held still" * describes the ordinary case as often as the pathological one: a menu that just * opened, a snackbar sliding in, a grid that has just been given its rows. * Refusing on the first disagreement made every one of those a failed test. * * So the cycle is retried. The confirming read of a failed attempt is already a * fresh acquisition, which is what the next attempt starts from -- a retry costs * a screenshot pair and no extra round-trip. A subject that repaints on every * screenshot still exhausts the budget and is still refused, and the message * says how many attempts bought nothing. */ export declare function settledCapture(where: { readonly page: Page; readonly locator: Locator; readonly request: AcquireRequest; readonly materialization: InPlaceCaptureOptions; }, first: { readonly acquired: SettledCapture['held']; readonly snapshot: SemanticSnapshot; }, about: { readonly subjectId: string; readonly fonts: readonly string[]; readonly loading: boolean; }): Promise; //# sourceMappingURL=in-place.d.ts.map