Skip to content
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
13 changes: 13 additions & 0 deletions website/docs/Queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ const element3 = screen.getByRole('button', { name: "Hello", disabled: true });

### `ByA11yState`, `ByAccessibilityState`

:::caution
This query uses a predicate that is typically too general to give meaningful results. Therefore, it's better to use one of the following options:
* use one of [`ByRole`](#byrole) queries with relevant state options: `disabled`, `selected`, `checked`, `expanded` and `busy`
* use [`toHaveAccessibilityState()`](https://github.com/testing-library/jest-native#tohaveaccessibilitystate) matcher to check the state of element found using some other query
:::

> getByA11yState, getAllByA11yState, queryByA11yState, queryAllByA11yState, findByA11yState, findAllByA11yState
> getByAccessibilityState, getAllByAccessibilityState, queryByAccessibilityState, queryAllByAccessibilityState, findByAccessibilityState, findAllByAccessibilityState

Expand Down Expand Up @@ -362,6 +368,13 @@ The difference in handling default values is made to reflect observed accessibil

### `ByA11Value`, `ByAccessibilityValue`

:::caution
This query uses a predicate that is typically too general to give meaningful results. Therefore, it's better to use one of the following options:
* use one of [`ByRole`](#byrole) queries with `value` option
* use [`toHaveAccessibilityValue()`](https://github.com/testing-library/jest-native#tohaveaccessibilityvalue) matcher to check the state of element found using some other query
:::


> getByA11yValue, getAllByA11yValue, queryByA11yValue, queryAllByA11yValue, findByA11yValue, findAllByA11yValue
> getByAccessibilityValue, getAllByAccessibilityValue, queryByAccessibilityValue, queryAllByAccessibilityValue, findByAccessibilityValue, findAllByAccessibilityValue

Expand Down