Skip to content

Commit 44bcf43

Browse files
authored
removed out of date docs from testcafe. (#348)
* removed out of date docs from testcafe. * Update intro.md
1 parent a8d339d commit 44bcf43

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

docs/testcafe-testing-library/intro.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,7 @@ npm install --save-dev testcafe @testing-library/testcafe
2323
`testcafe-testing-library` provides custom Selectors allowing you to query the
2424
dom.
2525

26-
### for v2.x:
27-
28-
Add `testcafe-testing-library` to your test fixture's `beforeEach` hook:
29-
30-
```javascript
31-
import {
32-
getByText, //or any other queries you want
33-
addTestcafeTestingLibrary,
34-
} from '@testing-library/testcafe'
35-
36-
fixture`selectors`.beforeEach(addTestcafeTestingLibrary)
37-
.page`http://localhost:13370`
38-
```
39-
40-
### for v3.x+ (requires testcafe 1.4.0 or greater)
41-
42-
`addTestcafeTestingLibrary` was removed in 3.x, instead you can now [inject
43-
clientScripts][inject] as of testcafe 1.4.0. For now, the path has to be used,
44-
but this will hopefully be changed to a module soon (pending a change to
45-
testcafe to support `umd:main` in package.json.
26+
Add the following to your .testcaferc.json file:
4627

4728
```json
4829
"clientScripts": [
@@ -150,9 +131,7 @@ window.TestingLibraryDom.configure({ testIdAttribute: 'data-automation-id' })
150131

151132
By default the selectors come pre-bound to `document.body`, so no need to
152133
provide a container. However, if you want to restrict your query using a
153-
container, you can use `within`. Note similar to using a testcafe
154-
`ClientFunction` so you will need to await `within`, and you can't make
155-
assertions on it like you can using a `Selector`. `within` can take either a
134+
container, you can use `within` which can take either a
156135
string or a query (get[All]By*, query[All]By*, find[All]By\*).
157136

158137
### Examples using `within`

0 commit comments

Comments
 (0)