Package-level declarations

Types

Link copied to clipboard
typealias AllByAttribute = (attribute: String, container: HTMLElement, id: Matcher, options: MatcherOptions?) -> ReadonlyArray<HTMLElement>
Link copied to clipboard
typealias AllByBoundAttribute = (container: HTMLElement, id: Matcher, options: MatcherOptions?) -> ReadonlyArray<HTMLElement>
Link copied to clipboard
typealias AllByRole = (container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions?) -> ReadonlyArray<HTMLElement>
Link copied to clipboard
typealias AllByText = (container: HTMLElement, id: Matcher, options: SelectorMatcherOptions?) -> ReadonlyArray<HTMLElement>
Link copied to clipboard
typealias BoundFunction<T> = Any
Link copied to clipboard
external interface BoundFunctions
Link copied to clipboard
typealias ByRoleMatcher = Any
Link copied to clipboard
external interface ByRoleOptions
Link copied to clipboard
external interface ByRoleOptionsValue
Link copied to clipboard
external interface Config
Link copied to clipboard
external interface ConfigFn
Link copied to clipboard
Link copied to clipboard
external interface CreateFunction
Link copied to clipboard
external interface CreateFunctionOptions
Link copied to clipboard
external interface CreateObject
Link copied to clipboard
external interface DefaultNormalizerOptions
Link copied to clipboard
sealed external interface EventType
Link copied to clipboard
typealias FindAllByBoundAttribute = (container: HTMLElement, id: Matcher, options: MatcherOptions?, waitForElementOptions: waitForOptions?) -> Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
typealias FindAllByRole = (container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions?, waitForElementOptions: waitForOptions?) -> Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
typealias FindAllByText = (container: HTMLElement, id: Matcher, options: SelectorMatcherOptions?, waitForElementOptions: waitForOptions?) -> Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
Link copied to clipboard
typealias FindByBoundAttribute = (container: HTMLElement, id: Matcher, options: MatcherOptions?, waitForElementOptions: waitForOptions?) -> Promise<HTMLElement>
Link copied to clipboard
typealias FindByRole = (container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions?, waitForElementOptions: waitForOptions?) -> Promise<HTMLElement>
Link copied to clipboard
typealias FindByText = (container: HTMLElement, id: Matcher, options: SelectorMatcherOptions?, waitForElementOptions: waitForOptions?) -> Promise<HTMLElement>
Link copied to clipboard
external interface FireEvent : FireFunction, FireObject
Link copied to clipboard
external interface FireFunction
Link copied to clipboard
external interface FireObject
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias GetByBoundAttribute = (container: HTMLElement, id: Matcher, options: MatcherOptions?) -> HTMLElement
Link copied to clipboard
typealias GetByRole = (container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions?) -> HTMLElement
Link copied to clipboard
typealias GetByText = (container: HTMLElement, id: Matcher, options: SelectorMatcherOptions?) -> HTMLElement
Link copied to clipboard
Link copied to clipboard
external interface GetRolesResult
Link copied to clipboard
external interface LogRolesOptions
Link copied to clipboard
typealias Match = (textToMatch: String, node: HTMLElement?, matcher: Matcher, options: MatcherOptions?) -> Boolean
Link copied to clipboard
typealias Matcher = Any
Link copied to clipboard
typealias MatcherFunction = (content: String, element: Element?) -> Boolean
Link copied to clipboard
external interface MatcherOptions
Link copied to clipboard
sealed external interface Method
Link copied to clipboard
typealias NormalizerFn = (text: String) -> String
Link copied to clipboard
Link copied to clipboard
external interface PrettyDOMOptions
Link copied to clipboard
external interface Queries
Link copied to clipboard
typealias Query = Function<Any?>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias QueryByAttribute = (attribute: String, container: HTMLElement, id: Matcher, options: MatcherOptions?) -> HTMLElement?
Link copied to clipboard
typealias QueryByBoundAttribute = (container: HTMLElement, id: Matcher, options: MatcherOptions?) -> HTMLElement?
Link copied to clipboard
typealias QueryByRole = (container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions?) -> HTMLElement?
Link copied to clipboard
typealias QueryByText = (container: HTMLElement, id: Matcher, options: SelectorMatcherOptions?) -> HTMLElement?
Link copied to clipboard

query methods have a common call signature. Only the return type differs.

Link copied to clipboard
external interface QueryOptions
Link copied to clipboard
external interface Screen : BoundFunctions
Link copied to clipboard
Link copied to clipboard
external interface Suggestion
Link copied to clipboard
sealed external interface Variant
Link copied to clipboard
external interface waitForOptions
Link copied to clipboard
external interface WithSuggest

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
external val createEvent: CreateEvent
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
external val fireEvent: FireEvent
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
external val screen: Screen
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
external fun computeHeadingLevel(element: Element): Double?
Link copied to clipboard
external fun configure(configDelta: Config)
external fun configure(configDelta: ConfigFn)
Link copied to clipboard
suspend external fun findAllByAltText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun findAllByAltTextAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
suspend external fun findAllByDisplayValue(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun findAllByDisplayValueAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
suspend external fun findAllByLabelText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun findAllByLabelTextAsync(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
suspend external fun findAllByPlaceholderText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun findAllByPlaceholderTextAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
suspend external fun findAllByRole(container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun findAllByRoleAsync(container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
suspend external fun findAllByTestId(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun findAllByTestIdAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
suspend external fun findAllByText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun findAllByTextAsync(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
suspend external fun findAllByTitle(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun findAllByTitleAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<ReadonlyArray<HTMLElement>>
Link copied to clipboard
suspend external fun findByAltText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun findByAltTextAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<HTMLElement>
Link copied to clipboard
suspend external fun findByDisplayValue(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun findByDisplayValueAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<HTMLElement>
Link copied to clipboard
suspend external fun findByLabelText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun findByLabelTextAsync(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<HTMLElement>
Link copied to clipboard
suspend external fun findByPlaceholderText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun findByPlaceholderTextAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<HTMLElement>
Link copied to clipboard
suspend external fun findByRole(container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun findByRoleAsync(container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<HTMLElement>
Link copied to clipboard
suspend external fun findByTestId(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun findByTestIdAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<HTMLElement>
Link copied to clipboard
suspend external fun findByText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun findByTextAsync(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<HTMLElement>
Link copied to clipboard
suspend external fun findByTitle(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun findByTitleAsync(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally, waitForElementOptions: waitForOptions = definedExternally): Promise<HTMLElement>
Link copied to clipboard
inline fun <E : Event> fireEvent(instance: EventInstance<E, Node, *>): Boolean
inline fun <E : Event> fireEvent(instance: EventInstance<E, Window, *>): Boolean
Link copied to clipboard
external fun getAllByAltText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun getAllByDisplayValue(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun getAllByLabelText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun getAllByPlaceholderText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun getAllByRole(container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun getAllByTestId(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun getAllByText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun getAllByTitle(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun getByAltText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun getByDisplayValue(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun getByLabelText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun getByPlaceholderText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun getByRole(container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun getByTestId(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun getByText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun getByTitle(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement
Link copied to clipboard
external fun getConfig(): Config
Link copied to clipboard
external fun getDefaultNormalizer(options: DefaultNormalizerOptions = definedExternally): NormalizerFn
Link copied to clipboard
external fun getElementError(message: String?, container: HTMLElement): JsError
Link copied to clipboard
external fun getNodeText(node: HTMLElement): String
Link copied to clipboard
external fun getQueriesForElement(element: HTMLElement, queriesToBind: Queries = definedExternally): BoundFunctions
Link copied to clipboard
external fun getRoles(container: HTMLElement): GetRolesResult
Link copied to clipboard
external fun getSuggestedQuery(element: HTMLElement, variant: Variant = definedExternally, method: Method = definedExternally): Suggestion?
Link copied to clipboard
external fun isInaccessible(element: Element): Boolean

https://testing-library.com/docs/dom-testing-library/api-helpers#isinaccessible

Link copied to clipboard
external fun logDOM()
external fun logDOM(dom: Element = definedExternally, maxLength: Double = definedExternally, options: PrettyDOMOptions = definedExternally)
external fun logDOM(dom: HTMLDocument = definedExternally, maxLength: Double = definedExternally, options: PrettyDOMOptions = definedExternally)
Link copied to clipboard
external fun logRoles(container: HTMLElement, options: LogRolesOptions = definedExternally): String
Link copied to clipboard
external fun prettyDOM(): Any
external fun prettyDOM(dom: Element = definedExternally, maxLength: Double = definedExternally, options: PrettyDOMOptions = definedExternally): Any
external fun prettyDOM(dom: HTMLDocument = definedExternally, maxLength: Double = definedExternally, options: PrettyDOMOptions = definedExternally): Any
Link copied to clipboard
external fun queryAllByAltText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun queryAllByDisplayValue(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun queryAllByLabelText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun queryAllByPlaceholderText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun queryAllByRole(container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun queryAllByTestId(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun queryAllByText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun queryAllByTitle(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): ReadonlyArray<HTMLElement>
Link copied to clipboard
external fun queryByAltText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement?
Link copied to clipboard
external fun queryByDisplayValue(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement?
Link copied to clipboard
external fun queryByLabelText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally): HTMLElement?
Link copied to clipboard
external fun queryByPlaceholderText(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement?
Link copied to clipboard
external fun queryByRole(container: HTMLElement, role: ByRoleMatcher, options: ByRoleOptions = definedExternally): HTMLElement?
Link copied to clipboard
external fun queryByTestId(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement?
Link copied to clipboard
external fun queryByText(container: HTMLElement, id: Matcher, options: SelectorMatcherOptions = definedExternally): HTMLElement?
Link copied to clipboard
external fun queryByTitle(container: HTMLElement, id: Matcher, options: MatcherOptions = definedExternally): HTMLElement?
Link copied to clipboard
suspend fun <T> waitFor(options: waitForOptions = undefined.unsafeCast<Nothing>(), block: suspend CoroutineScope.() -> T): T
Link copied to clipboard
external fun <T> waitForAsync(callback: () -> PromiseResult<T>, options: waitForOptions = definedExternally): Promise<T>
Link copied to clipboard
suspend external fun <T> waitForElementToBeRemoved(callback: T, options: waitForOptions = definedExternally): Void
suspend external fun <T> waitForElementToBeRemoved(callback: () -> T, options: waitForOptions = definedExternally): Void
Link copied to clipboard
external fun <T> waitForElementToBeRemovedAsync(callback: T, options: waitForOptions = definedExternally): Promise<Void>
external fun <T> waitForElementToBeRemovedAsync(callback: () -> T, options: waitForOptions = definedExternally): Promise<Void>
Link copied to clipboard
external fun within(element: HTMLElement, queriesToBind: Queries = definedExternally): BoundFunctions