Skip to content

Commit 5d23ae3

Browse files
author
EBAM006
committed
doc: minimize doc about hidden option
1 parent d0592ad commit 5d23ae3

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

website/docs/API.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ title: API
5050
- [Configuration](#configuration)
5151
- [`configure`](#configure)
5252
- [`asyncUtilTimeout` option](#asyncutiltimeout-option)
53-
- [`defaultIncludeHiddenElements` option](#defaultincludehidden-option)
54-
- [`defaultHidden` option](#defaulthidden-option)
53+
- [`defaultIncludeHiddenElements` option](#defaultincludehiddenelements-option)
5554
- [`defaultDebugOptions` option](#defaultdebugoptions-option)
5655
- [`resetToDefaults()`](#resettodefaults)
5756
- [Environment variables](#environment-variables)
@@ -796,9 +795,7 @@ Default timeout, in ms, for async helper functions (`waitFor`, `waitForElementTo
796795

797796
Default [includeHiddenElements](Queries.md#includehidden-option) query option for all queries. This default option will be overridden by the one you specify directly when using your query.
798797

799-
#### `defaultHidden` option
800-
801-
This is just an alias to the `defaultIncludeHiddenElements` option. It only exists to match react-testing-library naming used in the [configuration options](https://testing-library.com/docs/dom-testing-library/api-configuration/#defaulthidden). Prefer the use of `defaultIncludeHiddenElements` if possible as `defaultIncludeHiddenElements: true` is clearer than `defaultHidden: true`.
798+
There is an alias to this option named `defaultHidden` that exists only for compatibility with [react-testing-library](https://testing-library.com/docs/dom-testing-library/api-configuration/#defaulthidden).
802799

803800
#### `defaultDebugOptions` option
804801

website/docs/Queries.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ title: Queries
2727
- [Default state for: `checked` and `expanded` keys](#default-state-for-checked-and-expanded-keys)
2828
- [`ByA11Value`, `ByAccessibilityValue`](#bya11value-byaccessibilityvalue)
2929
- [Common options](#common-options)
30-
- [`includeHiddenElements` option](#includehidden-option)
31-
- [`hidden` option](#hidden-option)
30+
- [`includeHiddenElements` option](#includehiddenelements-option)
3231
- [TextMatch](#textmatch)
3332
- [Examples](#examples)
3433
- [Precision](#precision)
@@ -385,6 +384,8 @@ You can configure the default value with the [`configure` function](API.md#confi
385384

386385
An element is considered to be hidden from accessibility based on [`isHiddenFromAccessibility()`](./API.md#ishiddenfromaccessibility) function.
387386

387+
There is an alias to this option named `hidden` that exists only for compatibility with [react-testing-library](https://testing-library.com/docs/dom-testing-library/api-configuration/#defaulthidden).
388+
388389
**Examples**
389390

390391
```tsx
@@ -402,10 +403,6 @@ expect(
402403
).toBeTruthy();
403404
```
404405

405-
### `hidden` option
406-
407-
This is just an alias to the `includeHiddenElements` option. It only exists to match react-testing-library naming used in [byRole](https://testing-library.com/docs/queries/byrole/#hidden). Prefer the use of `includeHiddenElements` if possible as `includeHiddenElements: true` is clearer than `hidden: true`.
408-
409406
## TextMatch
410407

411408
```ts

0 commit comments

Comments
 (0)