Skip to content

Commit 37dc794

Browse files
committed
docs: update docs for breaking changes
1 parent 2104763 commit 37dc794

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,18 @@ const $form = await queries.getByTestId($document, 'my-form')
4949

5050
## API
5151

52-
See [dom-testing-libary](https://github.com/kentcdodds/dom-testing-library#usage) API for more. All `get*`/`query*` methods are supported.
52+
Puppeteer-specific methods
5353

5454
- `getDocument(page: puppeteer.Page): ElementHandle` - get an ElementHandle for the document
55-
- `extendObjectWithTestingUtils(handle: ElementHandle): ElementHandle & TestingUtils` - extend the input object with
56-
- `queries: TestingUtils` - the query subset of `dom-testing-library` exports
55+
56+
---
57+
58+
[dom-testing-libary API](https://github.com/kentcdodds/dom-testing-library#usage). All `get*`/`query*` methods are supported.
59+
60+
- `getQueriesForElement(handle: ElementHandle): ElementHandle & QueryUtils` - extend the input object with the query API and return it
61+
- `wait(conditionFn: () => {}): Promise<{}>` - wait for the condition to not throw
62+
- `getNodeText(handle: ElementHandle): Promise<string>` - get the text content of the element
63+
- `queries: QueryUtils` - the query subset of `dom-testing-library` exports
5764
- `queryByPlaceholderText`
5865
- `queryAllByPlaceholderText`
5966
- `getByPlaceholderText`
@@ -79,6 +86,11 @@ See [dom-testing-libary](https://github.com/kentcdodds/dom-testing-library#usage
7986
- `getByTitle`
8087
- `getAllByTitle`
8188

89+
## Known Limitations
90+
91+
- `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 [issue](https://github.com/patrickhulce/pptr-testing-library/issues/3).
92+
- `fireEvent` method is not exposed, use puppeteer's built-ins instead.
93+
8294
## Special Thanks
8395

8496
[dom-testing-library](https://github.com/kentcdodds/dom-testing-library) of course!

0 commit comments

Comments
 (0)