import * as React from 'react'; import { BaseDriver } from '../driver-factory'; import { MountRendererProps, ReactWrapper } from 'enzyme'; import { UniDriver } from '@wix/unidriver-core'; import { BaseUniDriver } from '../base-driver'; export interface WrapperData { wrapper: ReactWrapper; dataHook: string; } export type MountFunctionType = (node: React.ReactElement, options?: MountRendererProps) => ReactWrapper; export type EnzymeDriverFactory = (data: { element: Element | undefined; wrapper: ReactWrapper; eventTrigger: any; dataHook: string; }) => T; export declare function enzymeTestkitFactoryCreator(driverFactory: EnzymeDriverFactory): (obj: WrapperData) => T; export declare function enzymeUniTestkitFactoryCreator(driverFactory: (base: UniDriver, body: UniDriver, data: { dataHook: string; }) => T): (obj: WrapperData) => T; export interface Options { withoutDataHook?: boolean; /** The dataHookPropName exists in order to support legacy CamelCase `dataHook` * which is used in Wix-Style-React, while the current prop name used in * `wix-ui-core` is snake-case `data-hook`. * */ dataHookPropName?: 'data-hook' | 'dataHook'; } /** * Checks if the given Element accepts a data hook, and that the testkit factory finds the component's root element using that data hook. * * This method supports both new snake-case and legacy camelCase data hook prop name (e.g `data-hook` and `dataHook`). * The default is to check by both prop name options. */ export declare function isEnzymeTestkitExists(Element: React.ReactElement, testkitFactory: (obj: WrapperData) => T, mount: MountFunctionType, options?: Options): boolean; export declare function isUniEnzymeTestkitExists(Element: React.ReactElement, testkitFactory: (obj: WrapperData) => T, mount: MountFunctionType, { withoutDataHook, dataHookPropName }?: Options): Promise; //# sourceMappingURL=enzyme.d.ts.map