UNPKG

@testing-library/angular

Version:
35 lines (34 loc) 3.02 kB
import { Type } from '@angular/core'; import type { BoundFunctions, Queries } from '@testing-library/dom'; import { queries as dtlQueries, waitForOptions as dtlWaitForOptions } from '@testing-library/dom'; import { RenderComponentOptions, RenderResult, RenderTemplateOptions } from './models'; import * as i0 from "@angular/core"; export declare function render<ComponentType>(component: Type<ComponentType>, renderOptions?: RenderComponentOptions<ComponentType>): Promise<RenderResult<ComponentType, ComponentType>>; export declare function render<WrapperType = WrapperComponent>(template: string, renderOptions?: RenderTemplateOptions<WrapperType>): Promise<RenderResult<WrapperType>>; declare class WrapperComponent { static ɵfac: i0.ɵɵFactoryDeclaration<WrapperComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<WrapperComponent, "atl-wrapper-component", never, {}, {}, never, never, false, never>; } /** * Re-export screen with patched queries */ declare const screen: import("@testing-library/dom").Screen<typeof dtlQueries>; /** * Re-export within with patched queries */ declare const within: <QueriesToBind extends Queries = typeof dtlQueries, T extends QueriesToBind = QueriesToBind>(element: HTMLElement, queriesToBind?: T) => BoundFunctions<T>; /** * Re-export waitFor with patched waitFor */ declare function waitFor<T>(callback: () => T extends Promise<any> ? never : T, options?: dtlWaitForOptions): Promise<T>; /** * Re-export waitForElementToBeRemoved with patched waitForElementToBeRemoved */ declare function waitForElementToBeRemoved<T>(callback: (() => T) | T, options?: dtlWaitForOptions): Promise<void>; /** * Manually export otherwise we get the following error while running Jest tests * TypeError: Cannot set property fireEvent of [object Object] which has only a getter * exports.fireEvent = fireEvent */ export { fireEvent, buildQueries, getByLabelText, getAllByLabelText, queryByLabelText, queryAllByLabelText, findByLabelText, findAllByLabelText, getByPlaceholderText, getAllByPlaceholderText, queryByPlaceholderText, queryAllByPlaceholderText, findByPlaceholderText, findAllByPlaceholderText, getByText, getAllByText, queryByText, queryAllByText, findByText, findAllByText, getByAltText, getAllByAltText, queryByAltText, queryAllByAltText, findByAltText, findAllByAltText, getByTitle, getAllByTitle, queryByTitle, queryAllByTitle, findByTitle, findAllByTitle, getByDisplayValue, getAllByDisplayValue, queryByDisplayValue, queryAllByDisplayValue, findByDisplayValue, findAllByDisplayValue, getByRole, getAllByRole, queryByRole, queryAllByRole, findByRole, findAllByRole, getByTestId, getAllByTestId, queryByTestId, queryAllByTestId, findByTestId, findAllByTestId, createEvent, getDefaultNormalizer, getElementError, getNodeText, getQueriesForElement, getRoles, isInaccessible, logDOM, logRoles, prettyDOM, queries, queryAllByAttribute, queryByAttribute, queryHelpers, } from '@testing-library/dom'; export { screen, waitFor, waitForElementToBeRemoved, within };