diff --git a/docs/dom-testing-library/api-configuration.mdx b/docs/dom-testing-library/api-configuration.mdx index dbf13eaa2..05213510a 100644 --- a/docs/dom-testing-library/api-configuration.mdx +++ b/docs/dom-testing-library/api-configuration.mdx @@ -99,8 +99,9 @@ to `waitFor`. ### `throwSuggestions` (experimental) -When enabled, if [better queries](queries/about.mdx#priority) are available the -test will fail and provide a suggested query to use instead. Default to `false`. +When enabled, if [better queries](queries/about.mdx#priority) are available, the +test will fail and provide a suggested query to use instead. Defaults to +`false`. To disable a suggestion for a single query just add `{suggest:false}` as an option. diff --git a/docs/queries/byrole.mdx b/docs/queries/byrole.mdx index ef5aef49c..fabb521d5 100644 --- a/docs/queries/byrole.mdx +++ b/docs/queries/byrole.mdx @@ -23,6 +23,7 @@ getByRole( selected?: boolean, checked?: boolean, pressed?: boolean, + suggest?: boolean, current?: boolean | string, expanded?: boolean, queryFallbacks?: boolean, @@ -183,6 +184,13 @@ you can get the "👍" button by calling `getByRole('button', { pressed: true }) To learn more about the pressed state see [ARIA `aria-pressed`](https://www.w3.org/TR/wai-aria-1.2/#aria-pressed). +### `suggest` + +You can disable the ability to +[throw suggestions](../dom-testing-library/api-configuration#throwsuggestions-experimental) +for a specific query by setting this value to `false`. +Setting this value to `true` will throw suggestions for the specific query. + ### `expanded` You can filter the returned elements by their expanded state by setting