From 203216481e4bd96ed6470e63f72190335f041714 Mon Sep 17 00:00:00 2001 From: wixmobile Date: Thu, 11 Jan 2024 03:20:19 -0800 Subject: [PATCH] Publish docs version 20.x --- website/versioned_docs/version-20.x/api/actions.md | 8 +++++--- .../code/setting-up-the-dev-environment.md | 14 +++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/website/versioned_docs/version-20.x/api/actions.md b/website/versioned_docs/version-20.x/api/actions.md index c249c0aa67..4c6d9f2891 100644 --- a/website/versioned_docs/version-20.x/api/actions.md +++ b/website/versioned_docs/version-20.x/api/actions.md @@ -144,15 +144,17 @@ Continuously scrolls the scroll element until the specified expectation is resol await waitFor(element(by.text('Text5'))).toBeVisible().whileElement(by.id('ScrollView630')).scroll(50, 'down'); ``` -### `scrollTo(edge)` +### `scrollTo(edge[, startPositionX, startPositionY])` Simulates a scroll to the specified edge. -`edge`—the edge to scroll to (valid input: `"left"`/`"right"`/`"top"`/`"bottom"`) +`edge`—the edge to scroll to (valid input: `"left"`/`"right"`/`"top"`/`"bottom"`)
+`startPositionX`—the normalized x percentage of the element to use as scroll start point (optional, valid input: \[0.0, 1.0], `NaN`—choose an optimal value automatically, default is `NaN`)
+`startPositionY`—the normalized y percentage of the element to use as scroll start point (optional, valid input: \[0.0, 1.0], `NaN`—choose an optimal value automatically, default is `NaN`) ```js await element(by.id('scrollView')).scrollTo('bottom'); -await element(by.id('scrollView')).scrollTo('top'); +await element(by.id('scrollView')).scrollTo('top', NaN, 0.2); ``` ### `typeText(text)` diff --git a/website/versioned_docs/version-20.x/contributing/code/setting-up-the-dev-environment.md b/website/versioned_docs/version-20.x/contributing/code/setting-up-the-dev-environment.md index 6db7592904..935d10aea3 100644 --- a/website/versioned_docs/version-20.x/contributing/code/setting-up-the-dev-environment.md +++ b/website/versioned_docs/version-20.x/contributing/code/setting-up-the-dev-environment.md @@ -8,6 +8,18 @@ Please complete our [Introductory environment setup](introduction/environment-se ::: +## Node.js + +We recommend using [`nvm`](https://github.com/nvm-sh/nvm) or [`nvm-windows`](https://github.com/coreybutler/nvm-windows) to manage your Node.js versions. However, you can find our required Node.js version in the [`.nvmrc`](https://github.com/wix/Detox/blob/master/.nvmrc) file and install it using your preferred method or from the [official download page](https://nodejs.org/en/download/). + +Currently, we require `lts/iron` (Node.js 20.x) for our development environment. + +:::tip + +The exhaustive list of LTS codenames (e.g. `lts/iron`) can be found at [CODENAMES.md](https://github.com/nodejs/Release/blob/main/CODENAMES.md) in the Node.js repository. + +::: + ## Setting Up The Monorepo Management Our repository is a monorepo, which means it contains multiple Detox-related projects and packages. [Read more about our repository structure](../code/overview.md#repository-structure). @@ -17,7 +29,7 @@ To set up the monorepo locally, follow these steps: Install the monorepo management tool, `lerna`: ```bash npm2yarn -npm install lerna@3.x.x --global +npm install lerna@6.x.x --global ``` Clone the repository and navigate to the project directory: