1
1
<div align =" center " >
2
- <h1 >cypress-testing-library </h1 >
2
+ <h1 >Cypress Testing Library </h1 >
3
3
4
4
<a href =" https://www.emojione.com/emoji/1f405 " >
5
5
<img
@@ -44,13 +44,13 @@ testing practices.</p>
44
44
45
45
## The problem
46
46
47
- You want to use [ ` dom-testing-library ` ] [ dom-testing-library ] methods in your
47
+ You want to use [ ` DOM Testing Library ` ] [ dom-testing-library ] methods in your
48
48
[ Cypress] [ cypress ] tests.
49
49
50
50
## This solution
51
51
52
52
This allows you to use all the useful
53
- [ ` dom-testing-library ` ] [ dom-testing-library ] methods in your tests.
53
+ [ ` DOM Testing Library ` ] [ dom-testing-library ] methods in your tests.
54
54
55
55
## Table of Contents
56
56
@@ -91,17 +91,17 @@ and should be added as follows in `tsconfig.json`:
91
91
92
92
## Usage
93
93
94
- ` cypress-testing-library ` extends Cypress' ` cy ` command.
94
+ ` Cypress Testing Library ` extends Cypress' ` cy ` command.
95
95
96
96
Add this line to your project's ` cypress/support/commands.js ` :
97
97
98
98
```
99
- import '@testing-library/cypress/add-commands';
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 ` getBy ` , ` getAllBy ` , ` queryBy `
103
103
and ` queryAllBy ` commands.
104
- [ See the ` dom-testing-library ` docs for reference] ( https://testing-library.com )
104
+ [ See the ` DOM Testing Library ` docs for reference] ( https://testing-library.com )
105
105
106
106
You can find [ all Library definitions here] ( https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__cypress/index.d.ts ) .
107
107
@@ -121,11 +121,11 @@ cy.get('form').then(subject => {
121
121
})
122
122
```
123
123
124
- ` cypress-testing-library ` supports both jQuery elements and DOM nodes. This is
125
- necessary because Cypress uses jQuery elements, while ` dom-testing-library `
124
+ ` Cypress Testing Library ` supports both jQuery elements and DOM nodes. This is
125
+ necessary because Cypress uses jQuery elements, while ` DOM Testing Library `
126
126
expects DOM nodes. When you pass a jQuery element as ` container ` , it will get
127
127
the first DOM node from the collection and use that as the ` container ` parameter
128
- for the ` dom-testing-library ` functions.
128
+ for the ` DOM Testing Library ` functions.
129
129
130
130
## Other Solutions
131
131
215
215
[ twitter-badge] :
216
216
https://img.shields.io/twitter/url/https/github.com/testing-library/cypress-testing-library.svg?style=social
217
217
[ emojis ] : https://github.com/kentcdodds/all-contributors#emoji-key
218
- [ all-contributors ] : https://github.com/kentcdodds /all-contributors
218
+ [ all-contributors ] : https://github.com/all-contributors /all-contributors
219
219
[ dom-testing-library ] : https://github.com/testing-library/dom-testing-library
220
220
[ cypress ] : https://www.cypress.io/
0 commit comments