import type { Page } from '@playwright/test'; /** * Trigger pagination with a real scroll gesture. * * The pagination control gates `onLoadMore` behind a one-shot window `scroll` * listener plus IntersectionObserver, so this wheels a viewport at a time * until the sentinel is on screen. Do not use `scrollIntoViewIfNeeded()`: * it is a no-op on an already-visible element and emits no `scroll` event * (`playwright-no-scroll-into-view-sentinel`). * * After the sentinel is in view, wait for below-fold hydration and issue a * net-zero extra scroll so a deferred listener still sees a live event. * * Probe `count()` before `boundingBox()` and bound `boundingBox()` to * {@link BOUNDING_BOX_TIMEOUT_MS} so a detached sentinel cannot consume the * action timeout. The loop is also bounded by * {@link SCROLL_LOOP_BUDGET_MS}; a detached attempt waits up to * {@link DETACHED_REMOUNT_WAIT_MS} for remount. * * The pagination control unmounts the sentinel when `hasNextPage` becomes false. * If this helper already saw the sentinel attached (typically below the fold) * and it stays gone after that remount wait, pagination already loaded the * last page. Treating that as failure flakes the scroll-gated specs. */ export declare function scrollToLoadMore(page: Page, { sentinelTestId }?: { sentinelTestId?: string; }): Promise; /** * Force `main` to exceed the viewport height before hydration, so * the pagination control's short-page escape hatch (which auto-loads when * `document.documentElement.scrollHeight <= window.innerHeight`) cannot open * the pagination gate on its own. Use this alongside `scrollToLoadMore(page)` * so a scroll-triggered pagination test exercises the scroll-gated path * deterministically rather than depending on whichever seeded content happens * to render. */ export declare function forceMainScrollableBeforeHydration(page: Page): Promise;