From f538029201ac37d82d61bc0f80cb02fcab5136e0 Mon Sep 17 00:00:00 2001 From: Andrew <35735666+meatnordrink@users.noreply.github.com> Date: Mon, 18 Sep 2023 16:13:55 -0400 Subject: [PATCH] docs: note required RNTL version for user-event in user-event.md (#1494) * docs: note required RNTL version for user-event in user-event.md * chore: tweak wording * chore: tweak * chore: tweaks --------- Co-authored-by: Maciej Jastrzebski --- website/docs/UserEvent.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/website/docs/UserEvent.md b/website/docs/UserEvent.md index 26695123..005021d0 100644 --- a/website/docs/UserEvent.md +++ b/website/docs/UserEvent.md @@ -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. @@ -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,