|
5 | 5 | [](https://coveralls.io/github/testing-library/pptr-testing-library?branch=master)
|
6 | 6 | [](https://david-dm.org/testing-library/pptr-testing-library)
|
7 | 7 |
|
8 |
| -[puppeteer](https://github.com/GoogleChrome/puppeteer) + [dom-testing-library](https://github.com/testing-library/dom-testing-library) = 💖 |
| 8 | +[puppeteer](https://github.com/GoogleChrome/puppeteer) + [@testing-library/dom](https://github.com/testing-library/dom-testing-library) = 💖 |
9 | 9 |
|
10 |
| -All your favorite user-centric querying functions from react-testing-library/dom-testing-library available from Puppeteer! |
| 10 | +All your favorite user-centric querying functions from @testing-library/react & @testing-library/library available from Puppeteer! |
11 | 11 |
|
12 | 12 | ## Install
|
13 | 13 |
|
@@ -56,18 +56,18 @@ const {getByText} = $form.getQueriesForElement()
|
56 | 56 |
|
57 | 57 | ## API
|
58 | 58 |
|
59 |
| -Unique methods, not part of `dom-testing-library` |
| 59 | +Unique methods, not part of `@testing-library/dom` |
60 | 60 |
|
61 | 61 | - `getDocument(page: puppeteer.Page): ElementHandle` - get an ElementHandle for the document
|
| 62 | +- `wait(conditionFn: () => {}): Promise<{}>` - wait for the condition to not throw (wrapper around `waitForExpect`) |
62 | 63 |
|
63 | 64 | ---
|
64 | 65 |
|
65 |
| -[dom-testing-libary API](https://github.com/testing-library/dom-testing-library#usage). All `get*`/`query*` methods are supported. |
| 66 | +[@testing-library/dom API](https://github.com/testing-library/dom-testing-library#usage). All `get*`/`query*` methods are supported. |
66 | 67 |
|
67 | 68 | - `getQueriesForElement(handle: ElementHandle): ElementHandle & QueryUtils` - extend the input object with the query API and return it
|
68 |
| -- `wait(conditionFn: () => {}): Promise<{}>` - wait for the condition to not throw |
69 | 69 | - `getNodeText(handle: ElementHandle): Promise<string>` - get the text content of the element
|
70 |
| -- `queries: QueryUtils` - the query subset of `dom-testing-library` exports |
| 70 | +- `queries: QueryUtils` - the query subset of `@testing-library/dom` exports |
71 | 71 | - `queryByPlaceholderText`
|
72 | 72 | - `queryAllByPlaceholderText`
|
73 | 73 | - `getByPlaceholderText`
|
@@ -95,13 +95,13 @@ Unique methods, not part of `dom-testing-library`
|
95 | 95 |
|
96 | 96 | ## Known Limitations
|
97 | 97 |
|
98 |
| -- `waitForElement` method is not exposed. Puppeteer has its own set of wait utilities that somewhat conflict with the style used in `dom-testing-library`. See [#3](https://github.com/testing-library/pptr-testing-library/issues/3). |
| 98 | +- `waitForElement` method is not exposed. Puppeteer has its own set of wait utilities that somewhat conflict with the style used in `@testing-library/dom`. See [#3](https://github.com/testing-library/pptr-testing-library/issues/3). |
99 | 99 | - `fireEvent` method is not exposed, use puppeteer's built-ins instead.
|
100 | 100 | - `expect` assertion extensions are not available.
|
101 | 101 |
|
102 | 102 | ## Special Thanks
|
103 | 103 |
|
104 |
| -[dom-testing-library](https://github.com/testing-library/dom-testing-library) of course! |
| 104 | +[@testing-library/dom](https://github.com/testing-library/dom-testing-library) of course! |
105 | 105 |
|
106 | 106 | ## Related Puppeteer Test Utilities
|
107 | 107 |
|
|
0 commit comments