Skip to content

Commit

Permalink
docs: note required RNTL version for user-event in user-event.md (#1494)
Browse files Browse the repository at this point in the history
* docs: note required RNTL version for user-event in user-event.md

* chore: tweak wording

* chore: tweak

* chore: tweaks

---------

Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
  • Loading branch information
meatnordrink and mdjastrzebski committed Sep 18, 2023
1 parent 7a12847 commit f538029
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions website/docs/UserEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ User Event API is in beta stage.
This means that we plan to keep the public API signatures to remain stable, but we might introduce breaking behavioural changes, e.g. changing the ordering or timing of emitted events, without a major version update. Hopefully, well written code should not rely on such specific details.
:::

:::note
User Event interactions require RNTL v12.2.0 or later.
:::


## Comparison with Fire Event API

Fire Event is our original event simulation API. It offers ability to invoke **any event handler** declared on **either host or composite elements**. If the element does not have `onEventName` event handler for passed `eventName` event, or the element is disabled, Fire Event will traverse up the component tree, looking for event handler on both host and composite elements along the way. By default it will **not pass any event data**, but the user might provide it in the last argument.
Expand Down Expand Up @@ -179,10 +184,14 @@ The `textInput` event is sent only for mutliline text inputs.
- `endEditing`
- `blur`
## `scroll()`
## `scrollTo()`
:::note
`scrollTo` interaction has been introduced in RNTL v12.4.0.
:::
```ts
type(
scrollTo(
element: ReactTestInstance,
options: {
y: number,
Expand Down

0 comments on commit f538029

Please sign in to comment.