diff --git a/types/testing-library__cypress/index.d.ts b/types/testing-library__cypress/index.d.ts index 5f79f8b3bf..56ecd4c726 100644 --- a/types/testing-library__cypress/index.d.ts +++ b/types/testing-library__cypress/index.d.ts @@ -1,7 +1,7 @@ -// Type definitions for @testing-library/cypress 4.2 +// Type definitions for @testing-library/cypress 5.0 // Project: https://github.com/testing-library/cypress-testing-library // Definitions by: Aaron Mc Adam -// Basti Buck +// Basti Buck // Stefano Magni // Justin Hall // Brian Ng @@ -21,6 +21,7 @@ import * as JQuery from 'jquery'; export interface CTLMatcherOptions { timeout?: number; + container?: JQuery; } export type MatcherOptions = DTLMatcherOptions | CTLMatcherOptions; @@ -32,8 +33,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -52,8 +53,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -72,19 +73,19 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getByPlaceholderText( + findByPlaceholderText( id: Matcher, options?: MatcherOptions, ): Chainable>; - getByPlaceholderText( + findByPlaceholderText( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -92,19 +93,19 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getAllByPlaceholderText( + findAllByPlaceholderText( id: Matcher, options?: MatcherOptions, ): Chainable>; - getAllByPlaceholderText( + findAllByPlaceholderText( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -112,82 +113,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found - * `queryBy*` APIs search for an element and returns null if nothing found - * `queryAllBy*` APIs search for all elements and return empty array if nothing found - * - * @see https://github.com/testing-library/cypress-testing-library#usage - * @see https://github.com/testing-library/dom-testing-library#table-of-contents - */ - queryBySelectText( - id: Matcher, - options?: MatcherOptions, - ): Chainable>; - queryBySelectText( - id: Matcher, - options?: MatcherOptions, - ): Chainable>; - - /** - * dom-testing-library helpers for Cypress - * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found - * `queryBy*` APIs search for an element and returns null if nothing found - * `queryAllBy*` APIs search for all elements and return empty array if nothing found - * - * @see https://github.com/testing-library/cypress-testing-library#usage - * @see https://github.com/testing-library/dom-testing-library#table-of-contents - */ - queryAllBySelectText( - id: Matcher, - options?: MatcherOptions, - ): Chainable>; - queryAllBySelectText( - id: Matcher, - options?: MatcherOptions, - ): Chainable>; - - /** - * dom-testing-library helpers for Cypress - * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found - * `queryBy*` APIs search for an element and returns null if nothing found - * `queryAllBy*` APIs search for all elements and return empty array if nothing found - * - * @see https://github.com/testing-library/cypress-testing-library#usage - * @see https://github.com/testing-library/dom-testing-library#table-of-contents - */ - getBySelectText(id: Matcher, options?: MatcherOptions): Chainable>; - getBySelectText( - id: Matcher, - options?: MatcherOptions, - ): Chainable>; - - /** - * dom-testing-library helpers for Cypress - * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found - * `queryBy*` APIs search for an element and returns null if nothing found - * `queryAllBy*` APIs search for all elements and return empty array if nothing found - * - * @see https://github.com/testing-library/cypress-testing-library#usage - * @see https://github.com/testing-library/dom-testing-library#table-of-contents - */ - getAllBySelectText(id: Matcher, options?: MatcherOptions): Chainable; - getAllBySelectText( - id: Matcher, - options?: MatcherOptions, - ): Chainable>; - - /** - * dom-testing-library helpers for Cypress - * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -206,8 +133,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -226,19 +153,19 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getByText( + findByText( id: Matcher, options?: SelectorMatcherOptions, ): Chainable>; - getByText( + findByText( id: Matcher, options?: SelectorMatcherOptions, ): Chainable>; @@ -246,16 +173,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getAllByText(id: Matcher, options?: SelectorMatcherOptions): Chainable; - getAllByText( + findAllByText(id: Matcher, options?: SelectorMatcherOptions): Chainable; + findAllByText( id: Matcher, options?: SelectorMatcherOptions, ): Chainable>; @@ -263,8 +190,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -283,8 +210,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -303,19 +230,19 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getByLabelText( + findByLabelText( id: Matcher, options?: SelectorMatcherOptions, ): Chainable>; - getByLabelText( + findByLabelText( id: Matcher, options?: SelectorMatcherOptions, ): Chainable>; @@ -323,19 +250,19 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getAllByLabelText( + findAllByLabelText( id: Matcher, options?: SelectorMatcherOptions, ): Chainable; - getAllByLabelText( + findAllByLabelText( id: Matcher, options?: SelectorMatcherOptions, ): Chainable>; @@ -343,8 +270,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -360,8 +287,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -380,16 +307,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getByAltText(id: Matcher, options?: MatcherOptions): Chainable>; - getByAltText( + findByAltText(id: Matcher, options?: MatcherOptions): Chainable>; + findByAltText( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -397,16 +324,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getAllByAltText(id: Matcher, options?: MatcherOptions): Chainable; - getAllByAltText( + findAllByAltText(id: Matcher, options?: MatcherOptions): Chainable; + findAllByAltText( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -414,8 +341,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -431,8 +358,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -448,16 +375,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getByTestId(id: Matcher, options?: MatcherOptions): Chainable>; - getByTestId( + findByTestId(id: Matcher, options?: MatcherOptions): Chainable>; + findByTestId( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -465,16 +392,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getAllByTestId(id: Matcher, options?: MatcherOptions): Chainable; - getAllByTestId( + findAllByTestId(id: Matcher, options?: MatcherOptions): Chainable; + findAllByTestId( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -482,8 +409,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -499,8 +426,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -516,16 +443,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getByTitle(id: Matcher, options?: MatcherOptions): Chainable>; - getByTitle( + findByTitle(id: Matcher, options?: MatcherOptions): Chainable>; + findByTitle( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -533,16 +460,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getAllByTitle(id: Matcher, options?: MatcherOptions): Chainable; - getAllByTitle( + findAllByTitle(id: Matcher, options?: MatcherOptions): Chainable; + findAllByTitle( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -550,8 +477,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -570,8 +497,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -590,19 +517,19 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getByDisplayValue( + findByDisplayValue( id: Matcher, options?: MatcherOptions, ): Chainable>; - getByDisplayValue( + findByDisplayValue( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -610,16 +537,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getAllByDisplayValue(id: Matcher, options?: MatcherOptions): Chainable; - getAllByDisplayValue( + findAllByDisplayValue(id: Matcher, options?: MatcherOptions): Chainable; + findAllByDisplayValue( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -627,8 +554,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -644,8 +571,8 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * @@ -661,16 +588,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getByRole(id: Matcher, options?: MatcherOptions): Chainable>; - getByRole( + findByRole(id: Matcher, options?: MatcherOptions): Chainable>; + findByRole( id: Matcher, options?: MatcherOptions, ): Chainable>; @@ -678,16 +605,16 @@ declare global { /** * dom-testing-library helpers for Cypress * - * `getBy*` APIs search for an element and throw an error if nothing found - * `getAllBy*` APIs search for all elements and an error if nothing found + * `findBy*` APIs search for an element and throw an error if nothing found + * `findAllBy*` APIs search for all elements and an error if nothing found * `queryBy*` APIs search for an element and returns null if nothing found * `queryAllBy*` APIs search for all elements and return empty array if nothing found * * @see https://github.com/testing-library/cypress-testing-library#usage * @see https://github.com/testing-library/dom-testing-library#table-of-contents */ - getAllByRole(id: Matcher, options?: MatcherOptions): Chainable; - getAllByRole( + findAllByRole(id: Matcher, options?: MatcherOptions): Chainable; + findAllByRole( id: Matcher, options?: MatcherOptions, ): Chainable>; diff --git a/types/testing-library__cypress/testing-library__cypress-tests.ts b/types/testing-library__cypress/testing-library__cypress-tests.ts index b3d4c7f41c..09231b5057 100644 --- a/types/testing-library__cypress/testing-library__cypress-tests.ts +++ b/types/testing-library__cypress/testing-library__cypress-tests.ts @@ -2,31 +2,28 @@ import Cypress, { configure } from '@testing-library/cypress'; configure({ testIdAttribute: 'data-myown-testid' }); -// getBy* -Cypress.getByPlaceholderText('foo'); -Cypress.getBySelectText('foo'); -Cypress.getByText('foo'); -Cypress.getByLabelText('foo'); -Cypress.getByAltText('foo'); -Cypress.getByTestId('foo'); -Cypress.getByTitle('foo'); -Cypress.getByDisplayValue('foo'); -Cypress.getByRole('foo'); +// findBy* +Cypress.findByPlaceholderText('foo'); +Cypress.findByText('foo'); +Cypress.findByLabelText('foo'); +Cypress.findByAltText('foo'); +Cypress.findByTestId('foo'); +Cypress.findByTitle('foo'); +Cypress.findByDisplayValue('foo'); +Cypress.findByRole('foo'); -// getAllBy* -Cypress.getAllByPlaceholderText('foo'); -Cypress.getAllBySelectText('foo'); -Cypress.getAllByText('foo'); -Cypress.getAllByLabelText('foo'); -Cypress.getAllByAltText('foo'); -Cypress.getAllByTestId('foo'); -Cypress.getAllByTitle('foo'); -Cypress.getAllByDisplayValue('foo'); -Cypress.getAllByRole('foo'); +// findAllBy* +Cypress.findAllByPlaceholderText('foo'); +Cypress.findAllByText('foo'); +Cypress.findAllByLabelText('foo'); +Cypress.findAllByAltText('foo'); +Cypress.findAllByTestId('foo'); +Cypress.findAllByTitle('foo'); +Cypress.findAllByDisplayValue('foo'); +Cypress.findAllByRole('foo'); // queryBy* Cypress.queryByPlaceholderText('foo'); -Cypress.queryBySelectText('foo'); Cypress.queryByText('foo'); Cypress.queryByLabelText('foo'); Cypress.queryByAltText('foo'); @@ -37,7 +34,6 @@ Cypress.queryByRole('foo'); // queryAllBy* Cypress.queryAllByPlaceholderText('foo'); -Cypress.queryAllBySelectText('foo'); Cypress.queryAllByText('foo'); Cypress.queryAllByLabelText('foo'); Cypress.queryAllByAltText('foo');