Skip to content

Commit 8e94dc2

Browse files
committed
docs: v14.1.0
1 parent 5a8f4a7 commit 8e94dc2

9 files changed

Lines changed: 35 additions & 17 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ with v14.
1616
element, invoking its `onAccessibilityAction` handler.
1717
- Added `userEvent.pullToRefresh()` to simulate the pull-to-refresh gesture on a host
1818
`ScrollView` element, invoking the `onRefresh` handler of its `refreshControl` prop.
19+
- Added the `eventDiagnostics` configuration option. When enabled, `fireEvent` and `userEvent`
20+
log a warning when no handler is called, e.g. because the target is disabled, blocked by
21+
`pointerEvents`, or has no handler for the event. Off by default. See the
22+
[configuration docs](./website/docs/14.x/docs/api/misc/config.mdx#eventdiagnostics-option).
23+
- Added support for React 19.3 (with `test-renderer@1.3`) and React Native 0.88.
24+
25+
### Bug fixes
26+
27+
- `userEvent.scrollTo()` emits a `scroll` event for the last step of a drag scroll, matching
28+
native behavior, and no longer emits `scroll` events when the scroll offset does not change.
29+
- Fixed the `setImmediate` fallback in environments without it (e.g. jsdom) picking up Jest
30+
fake timers, which could make async utilities hang.
1931

2032
### Deprecations
2133

@@ -25,6 +37,15 @@ with v14.
2537
[`fireEvent` docs](./website/docs/14.x/docs/api/events/fire-event.mdx) for the list of direct
2638
events.
2739

40+
## 14.0.1
41+
42+
### Bug fixes
43+
44+
- `waitFor` cleans up its timers when an error is thrown while printing the `onTimeout`
45+
output.
46+
- `userEvent.type()`, `userEvent.clear()`, and `userEvent.paste()` include `selection` in the
47+
`TextInput` `change` event.
48+
2849
## 14.0.0
2950

3051
### Migration guide

‎docs/api/configuration.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ This option is also available as `defaultHidden` alias for compatibility with [R
3737

3838
### `eventDiagnostics` option
3939

40+
_Added in v14.1.0_
41+
4042
Logs a warning when `fireEvent` or `userEvent` doesn't call any handler, so a test doesn't silently do nothing. Defaults to `false`.
4143

4244
A warning is logged in these cases:

‎docs/api/fire-event.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ await fireEvent.scroll(screen.getByTestId('scroll-view'), eventData);
179179

180180
### `fireEvent.layout`
181181

182-
> [!NOTE]
183-
> Available since React Native Testing Library 14.1.0.
182+
_Added in v14.1.0_
184183

185184
```tsx
186185
fireEvent.layout: (

‎docs/api/user-event.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,7 @@ The sequence of events depends on whether the scroll includes an optional moment
296296

297297
## `pullToRefresh()` \
298298

299-
> [!NOTE]
300-
> Available since React Native Testing Library 14.1.0.
299+
_Added in v14.1.0_
301300

302301
```ts
303302
pullToRefresh(
@@ -320,8 +319,7 @@ If the element has no `refreshControl` prop, or its `RefreshControl` has no `onR
320319

321320
## `accessibilityAction()`
322321

323-
> [!NOTE]
324-
> Available since React Native Testing Library 14.1.0.
322+
_Added in v14.1.0_
325323

326324
```ts
327325
accessibilityAction(

‎docs/guides/migration-v14.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Choose the Test Renderer version that matches your React 19 minor version:
7676

7777
| React version | Recommended Test Renderer version | Notable React features |
7878
| ------------- | --------------------------------- | ------------------------------------------------- |
79+
| `19.3` | `test-renderer@1.3` | `<ViewTransition />`, Fragment Refs |
7980
| `19.2` | `test-renderer@1.2` | `<Activity />`, `useEffectEvent` |
8081
| `19.1` | `test-renderer@1.1` | Owner Stack support, updated `useId()` format |
8182
| `19.0` | `test-renderer@1.0` | Actions, `useActionState`, `useOptimistic`, `use` |
@@ -112,7 +113,7 @@ command={{
112113
}}
113114
/>
114115

115-
The commands above use `test-renderer@1.2` for React 19.2. Use `test-renderer@1.1` for React 19.1, or `test-renderer@1.0` for React 19.0.
116+
The commands above use `test-renderer@1.2` for React 19.2. Use `test-renderer@1.3` for React 19.3, `test-renderer@1.1` for React 19.1, or `test-renderer@1.0` for React 19.0.
116117

117118
#### 2. Update type imports (if needed)
118119

‎website/docs/14.x/docs/api/events/fire-event.mdx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,7 @@ await fireEvent.scroll(screen.getByTestId('scroll-view'), eventData);
184184

185185
### `fireEvent.layout` {#layout}
186186

187-
:::note
188-
Available since React Native Testing Library 14.1.0.
189-
:::
187+
_Added in v14.1.0_
190188

191189
```tsx
192190
fireEvent.layout: (

‎website/docs/14.x/docs/api/events/user-event.mdx‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,7 @@ The sequence of events depends on whether the scroll includes an optional moment
297297

298298
## `pullToRefresh()` \{#pull-to-refresh}
299299

300-
:::note
301-
Available since React Native Testing Library 14.1.0.
302-
:::
300+
_Added in v14.1.0_
303301

304302
```ts
305303
pullToRefresh(
@@ -322,9 +320,7 @@ If the element has no `refreshControl` prop, or its `RefreshControl` has no `onR
322320

323321
## `accessibilityAction()`
324322

325-
:::note
326-
Available since React Native Testing Library 14.1.0.
327-
:::
323+
_Added in v14.1.0_
328324

329325
```ts
330326
accessibilityAction(

‎website/docs/14.x/docs/api/misc/config.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ This option is also available as `defaultHidden` alias for compatibility with [R
3737

3838
### `eventDiagnostics` option
3939

40+
_Added in v14.1.0_
41+
4042
Logs a warning when `fireEvent` or `userEvent` doesn't call any handler, so a test doesn't silently do nothing. Defaults to `false`.
4143

4244
A warning is logged in these cases:

‎website/docs/14.x/docs/start/migration-v14.mdx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Choose the Test Renderer version that matches your React 19 minor version:
7979

8080
| React version | Recommended Test Renderer version | Notable React features |
8181
| ------------- | --------------------------------- | ------------------------------------------------- |
82+
| `19.3` | `test-renderer@1.3` | `<ViewTransition />`, Fragment Refs |
8283
| `19.2` | `test-renderer@1.2` | `<Activity />`, `useEffectEvent` |
8384
| `19.1` | `test-renderer@1.1` | Owner Stack support, updated `useId()` format |
8485
| `19.0` | `test-renderer@1.0` | Actions, `useActionState`, `useOptimistic`, `use` |
@@ -115,7 +116,7 @@ Remove React Test Renderer and its type definitions from your dev dependencies,
115116
}}
116117
/>
117118

118-
The commands above use `test-renderer@1.2` for React 19.2. Use `test-renderer@1.1` for React 19.1, or `test-renderer@1.0` for React 19.0.
119+
The commands above use `test-renderer@1.2` for React 19.2. Use `test-renderer@1.3` for React 19.3, `test-renderer@1.1` for React 19.1, or `test-renderer@1.0` for React 19.0.
119120

120121
#### 2. Update type imports (if needed)
121122

0 commit comments

Comments
 (0)