export declare function clickElement(element: HTMLElement): Promise; export declare function sendKeyDownEvent(target: HTMLElement, key: string, init?: KeyboardEventInit): Promise; export declare function sendKeyDownEvents(target: HTMLElement, keySequence: string[], init?: KeyboardEventInit[]): Promise; /** A helper function to abstract turning waiting for an event to fire into a promise. * The returned promise should be resolved prior to completing a test. */ export declare function waitForEvent(element: HTMLElement, eventName: string, callback?: (evt: T) => void): Promise; /** * Waits for a requested animation frame to occur. */ export declare function waitAnimationFrame(): Promise; /** * Races the promises created by the callback and aborts the provided signal once the race settles, * so that the remaining waits (e.g. observers, timers, and polling loops) are cleaned up. * @example * await abortableRace(signal => [ * waitForResizeObserverAsync({ signal, element }), * waitAbortTimer({ signal, message: 'ResizeObserver notification was not received' }) * ]); */ export declare function abortableRace(createRacers: (signal: AbortSignal) => readonly Promise[]): Promise; /** * Waits for the next ResizeObserver notification for the element. * ResizeObservers are notified in creation order within a frame, so any observer created before * calling this function (e.g. a component's own observer of the element) has handled pending size * changes when this resolves. Rejects if the signal is aborted first. */ export declare function waitForResizeObserverAsync({ signal, element }: { signal: AbortSignal; element: Element; }): Promise; /** * Waits for the next IntersectionObserver notification for the elements within the root. * IntersectionObserver notifications for all observers are delivered together in a single task * after layout, so any observer of the elements created before calling this function * (e.g. a component's own observer) has handled pending intersection changes when this resolves. * Resolves immediately if there are no elements, as no notification would be delivered. * Rejects if the signal is aborted first. */ export declare function waitForIntersectionObserverAsync({ signal, elements, root }: { signal: AbortSignal; elements: readonly Element[]; root: Element; }): Promise; /** * Timeout for use in async tets. */ export declare function waitTimeout(ms?: number): Promise; /** * Rejects with the given message after the timeout. Use with `abortableRace` to bound another wait, e.g. an * observer notification that normally arrives within a frame or two but that browsers (notably WebKit) can defer, * so the current test fails with a clear message rather than hanging until the jasmine timeout. * The timer is cleared when the signal is aborted. */ export declare function waitAbortTimer({ signal, message, ms }: { signal: AbortSignal; message: string; ms?: number; }): Promise;