import type { Page } from '@playwright/test'; /** * Wait for React hydration of below-fold streaming components. * * React 19 prioritises above-fold hydration; components scrolled out of * view receive lower-priority MessageChannel callbacks. The idle/animation * probe is a bounded readiness heuristic, not proof that every client handler * is attached. A control that cannot accept an early interaction must expose * its own disabled-until-hydrated state; tests then wait for that state. * * Use this when navigateTo() alone is insufficient because the element you * need to interact with lives inside a below-fold streaming boundary. Prefer * scrolling the element into view first (element.scrollIntoViewIfNeeded()) * so React has a chance to bump its hydration priority before you call this. * * Tolerates a client-side redirect arriving mid-wait: the document the * readiness probe started in can be replaced before the probe resolves, which * destroys its execution context. Rather than failing, the wait restarts * against the document that replaced it, so hydration is always measured * against the document the caller ends up on. `waitUntil` is the load state to * settle that replacement document to; callers that navigated under a stricter * state should pass their own so a redirect does not silently weaken it. * * If you find yourself calling this frequently, consider fixing navigate-to.mts * to use a more deterministic hydration signal instead. */ export declare function waitForBelowFoldHydration(page: Page, { waitUntil }?: { waitUntil?: "load" | "networkidle" | undefined; }): Promise;