import type { TestInstance } from 'test-renderer'; import type { StringWithAutocomplete } from '../../types'; import type { UserEventInstance } from '../setup'; /** * Standard accessibility action names recognized by React Native (`activate`, * `increment`, `decrement`, `longpress`, `magicTap`, `escape`, `expand`, * `collapse`). Custom action names are supported as well, hence the `string` * fallback. * * @see https://reactnative.dev/docs/accessibility#accessibility-actions */ export type AccessibilityActionName = StringWithAutocomplete<'activate' | 'increment' | 'decrement' | 'longpress' | 'magicTap' | 'escape' | 'expand' | 'collapse'>; /** * Simulate an assistive technology (e.g. screen reader) triggering an * accessibility action on a given element. * * This will call the `onAccessibilityAction` handler with an event carrying the * given `actionName`. * * Like a real assistive technology, the action must be declared in the element's * `accessibilityActions` prop, and the element must not be disabled. Otherwise an * error is thrown. * * @param instance element to trigger the action on * @param actionName name of the accessibility action to trigger */ export declare function accessibilityAction(this: UserEventInstance, instance: TestInstance, actionName: AccessibilityActionName): Promise;