Skip to content

Commit e2b039c

Browse files
authored
Fixes findByText usage in Cypress example test (testing-library#900)
1 parent c308744 commit e2b039c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/cypress-testing-library/intro.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ cy.findByRole('button', {name: /Button Text/i}).should('exist')
5858
cy.findByRole('button', {name: /Non-existing Button Text/i}).should('not.exist')
5959
cy.findByLabelText(/Label text/i, {timeout: 7000}).should('exist')
6060

61-
// findAllByText _inside_ a form element
61+
// findByRole _inside_ a form element
6262
cy.get('form')
63-
.findByText('button', {name: /Button Text/i})
63+
.findByRole('button', {name: /Button Text/i})
6464
.should('exist')
6565
cy.findByRole('dialog').within(() => {
6666
cy.findByRole('button', {name: /confirm/i})

0 commit comments

Comments
 (0)