File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ Add this line to your project's `cypress/support/commands.js`:
99
99
import '@testing-library/cypress/add-commands'
100
100
```
101
101
102
- You can now use all of ` DOM Testing Library ` 's ` getBy ` , ` getAllBy ` , ` queryBy `
102
+ You can now use all of ` DOM Testing Library ` 's ` findBy ` , ` findAllBy ` , ` queryBy `
103
103
and ` queryAllBy ` commands.
104
104
[ See the ` DOM Testing Library ` docs for reference] ( https://testing-library.com )
105
105
@@ -109,15 +109,15 @@ To show some simple examples (from
109
109
[ cypress/integration/commands.spec.js] ( cypress/integration/commands.spec.js ) ):
110
110
111
111
``` javascript
112
- cy .getAllByText (' Jackie Chan' ).click ()
112
+ cy .findAllByText (' Jackie Chan' ).click ()
113
113
cy .queryByText (' Button Text' ).should (' exist' )
114
114
cy .queryByText (' Non-existing Button Text' ).should (' not.exist' )
115
115
cy .queryByLabelText (' Label text' , {timeout: 7000 }).should (' exist' )
116
116
cy .get (' form' ).within (() => {
117
- cy .getByText (' Button Text' ).should (' exist' )
117
+ cy .findByText (' Button Text' ).should (' exist' )
118
118
})
119
119
cy .get (' form' ).then (subject => {
120
- cy .getByText (' Button Text' , {container: subject}).should (' exist' )
120
+ cy .findByText (' Button Text' , {container: subject}).should (' exist' )
121
121
})
122
122
```
123
123
You can’t perform that action at this time.
0 commit comments