mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[@testing-library/cypress] Add extended options for *ByRole queries (#43088)
https://testing-library.com/docs/dom-testing-library/api-queries#byrole
This commit is contained in:
parent
2f23492c1b
commit
4a2d567aea
10
types/testing-library__cypress/index.d.ts
vendored
10
types/testing-library__cypress/index.d.ts
vendored
@ -14,6 +14,7 @@ import {
|
||||
configure,
|
||||
Matcher,
|
||||
MatcherOptions as DTLMatcherOptions,
|
||||
ByRoleOptions as DTLByRoleOptions,
|
||||
SelectorMatcherOptions as DTLSelectorMatcherOptions,
|
||||
} from '@testing-library/dom';
|
||||
|
||||
@ -23,6 +24,7 @@ export interface CTLMatcherOptions {
|
||||
}
|
||||
|
||||
export type MatcherOptions = DTLMatcherOptions | CTLMatcherOptions;
|
||||
export type ByRoleOptions = DTLByRoleOptions | CTLMatcherOptions;
|
||||
export type SelectorMatcherOptions = DTLSelectorMatcherOptions | CTLMatcherOptions;
|
||||
|
||||
declare global {
|
||||
@ -403,7 +405,7 @@ declare global {
|
||||
* @see https://github.com/testing-library/cypress-testing-library#usage
|
||||
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
|
||||
*/
|
||||
queryByRole(id: Matcher, options?: MatcherOptions): Chainable<JQuery>;
|
||||
queryByRole(id: Matcher, options?: ByRoleOptions): Chainable<JQuery>;
|
||||
|
||||
/**
|
||||
* dom-testing-library helpers for Cypress
|
||||
@ -416,7 +418,7 @@ declare global {
|
||||
* @see https://github.com/testing-library/cypress-testing-library#usage
|
||||
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
|
||||
*/
|
||||
queryAllByRole(id: Matcher, options?: MatcherOptions): Chainable<JQuery>;
|
||||
queryAllByRole(id: Matcher, options?: ByRoleOptions): Chainable<JQuery>;
|
||||
|
||||
/**
|
||||
* dom-testing-library helpers for Cypress
|
||||
@ -429,7 +431,7 @@ declare global {
|
||||
* @see https://github.com/testing-library/cypress-testing-library#usage
|
||||
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
|
||||
*/
|
||||
findByRole(id: Matcher, options?: MatcherOptions): Chainable<JQuery>;
|
||||
findByRole(id: Matcher, options?: ByRoleOptions): Chainable<JQuery>;
|
||||
|
||||
/**
|
||||
* dom-testing-library helpers for Cypress
|
||||
@ -442,7 +444,7 @@ declare global {
|
||||
* @see https://github.com/testing-library/cypress-testing-library#usage
|
||||
* @see https://github.com/testing-library/dom-testing-library#table-of-contents
|
||||
*/
|
||||
findAllByRole(id: Matcher, options?: MatcherOptions): Chainable<JQuery>;
|
||||
findAllByRole(id: Matcher, options?: ByRoleOptions): Chainable<JQuery>;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user