forked from testing-library/cypress-testing-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ts
25 lines (22 loc) · 1.34 KB
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/// <reference types="Cypress" />
import { configure } from '@testing-library/cypress'
import '@testing-library/cypress/add-commands'
configure({ testIdAttribute: 'data-myown-testid' })
// findBy*
cy.findByPlaceholderText('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findByText('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findByLabelText('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findByAltText('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findByTestId('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findByTitle('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findByDisplayValue('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findByRole('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
// findAllBy*
cy.findAllByPlaceholderText('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findAllByText('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findAllByLabelText('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findAllByAltText('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findAllByTestId('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findAllByTitle('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findAllByDisplayValue('foo') // $ExpectType Chainable<JQuery<HTMLElement>>
cy.findAllByRole('foo') // $ExpectType Chainable<JQuery<HTMLElement>>