Skip to content

Commit 117019a

Browse files
committed
Update README.md to coincide with 5.0 release
1 parent e463ac2 commit 117019a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ This allows you to use all the useful
5757
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
5858
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5959

60-
6160
- [Installation](#installation)
6261
- [With TypeScript](#with-typescript)
6362
- [Usage](#usage)
@@ -78,7 +77,8 @@ npm install --save-dev @testing-library/cypress
7877

7978
### With TypeScript
8079

81-
Typings are defined in `@types/testing-library__cypress` at [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__cypress),
80+
Typings are defined in `@types/testing-library__cypress` at
81+
[DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__cypress),
8282
and should be added as follows in `tsconfig.json`:
8383

8484
```json
@@ -99,25 +99,26 @@ Add this line to your project's `cypress/support/commands.js`:
9999
import '@testing-library/cypress/add-commands'
100100
```
101101

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`
103103
and `queryAllBy` commands.
104104
[See the `DOM Testing Library` docs for reference](https://testing-library.com)
105105

106-
You can find [all Library definitions here](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__cypress/index.d.ts).
106+
You can find
107+
[all Library definitions here](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__cypress/index.d.ts).
107108

108109
To show some simple examples (from
109110
[cypress/integration/commands.spec.js](cypress/integration/commands.spec.js)):
110111

111112
```javascript
112-
cy.getAllByText('Jackie Chan').click()
113+
cy.findAllByText('Jackie Chan').click()
113114
cy.queryByText('Button Text').should('exist')
114115
cy.queryByText('Non-existing Button Text').should('not.exist')
115116
cy.queryByLabelText('Label text', {timeout: 7000}).should('exist')
116117
cy.get('form').within(() => {
117-
cy.getByText('Button Text').should('exist')
118+
cy.findByText('Button Text').should('exist')
118119
})
119120
cy.get('form').then(subject => {
120-
cy.getByText('Button Text', {container: subject}).should('exist')
121+
cy.findByText('Button Text', {container: subject}).should('exist')
121122
})
122123
```
123124

0 commit comments

Comments
 (0)