Skip to content

modify logTestingPlaygroundURL documentation #1105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions docs/queries/about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,11 @@ const inputNode1 = screen.getByLabelText('Username')
const container = document.querySelector('#app')
const inputNode2 = getByLabelText(container, 'Username')
```

### `queryOptions`

You can pass a `queryOptions` object with the query type. See the docs for each query type to see available options, e.g. [byRole API](queries/byrole.mdx#api).
You can pass a `queryOptions` object with the query type. See the docs for each
query type to see available options, e.g. [byRole API](queries/byrole.mdx#api).

### `screen`

Expand Down Expand Up @@ -240,7 +242,8 @@ cy.findByLabelText('Example').should('exist')
## `TextMatch`

Most of the query APIs take a `TextMatch` as an argument, which means the
argument can be either a _string_, _regex_, or a _function_ of signature `(content?: string, element?: Element | null) => boolean` which returns `true`
argument can be either a _string_, _regex_, or a _function_ of signature
`(content?: string, element?: Element | null) => boolean` which returns `true`
for a match and `false` for a mismatch.

### TextMatch Examples
Expand Down Expand Up @@ -370,7 +373,8 @@ screen.debug(screen.getAllByText('multi-test'))
### `screen.logTestingPlaygroundURL()`

For debugging using [testing-playground](https://testing-playground.com), screen
exposes this convenient method which logs a URL that can be opened in a browser.
exposes this convenient method which logs and returns a URL that can be opened in
a browser.

```javascript
import {screen} from '@testing-library/dom'
Expand Down