Skip to content

Commit 0789f4e

Browse files
Publish docs version 19.x
1 parent 5fd7bee commit 0789f4e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

website/versioned_docs/version-19.x/Guide.Jest.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ For its part, Detox supports only one Jest’s concrete runner, which is [`jest-
3030

3131
Before starting with Jest setup, be sure to complete the preliminary sections of the [Getting Started](Introduction.GettingStarted.md) guide.
3232

33-
Afterward, install the respective npm packages:
33+
Afterward, install the respective npm package:
3434

3535
```sh
36-
npm install -D jest
36+
npm install -D "jest@>=27.2.5"
3737
```
3838

39+
**NOTE:** The command will install the _latest Jest version_. However, `@>=27.2.5` addendum is recommended just to be on the safe side in a common scenario, when a `package-lock.json`
40+
generated by an official React Native project template limits Jest version to a very old `26.x`, maybe due to some optimization mechanism.
41+
Generally we recommend not to stay on outdated Jest versions for too long, e.g. `[email protected]` will be the minimal version supported by Detox 20.
42+
3943
#### 2. Set up Test-code Scaffolds
4044

4145
Run the automated init script:

website/versioned_docs/version-19.x/Introduction.Android.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,15 @@ A special thanks to [@GEllickson-Hover](https://github.com/GEllickson-Hover) for
285285

286286
If, when [setting up your work environment](Introduction.AndroidDevEnv.md), you’ve selected Google emulators with an AOSP image as the test target - as recommended, **we strongly encourage** you would also integrate [Test Butler](https://github.com/linkedin/test-butler): in the very least - in order to suppress crash and ANR dialogs. They are a soft spot in UI testing on Android, all around, as - when displayed, they make the UI entirely inaccessible (and thus cause tests to fail in bulks).
287287

288-
Setting Test Butler up for working with Detox is a bit different from explained in their guides. The process, as a whole, is twofold:
288+
Setting Test Butler up for working with Detox is a bit different than explained in their guides. The process, as a whole, is twofold:
289289

290290
1. Preinstalling the test-butler-app APK onto the test device.
291291
1. Integrating the test-butler-lib into your own test APK, and initializing it in a custom test-runner (as explained).
292292

293293
The library part can be easily achieved as explained there (i.e. by using Gradle’s `androidTestImplementation`). Same goes for initialization. As for the APK, the suggested usage of Gradle’s `androidTestUtil` is scarce when running with Detox (i.e. non-native instrumentation tests). Here’s what to do instead.
294294

295+
> _For a complete and thorough coverage of the Test Bulter integration with Detox, consider going over our [blogpost on CI execution](https://medium.com/wix-engineering/how-to-execute-android-ui-tests-on-ci-and-stay-alive-eb9089d88c1f) on medium_.
296+
295297
##### Solution 1: Prebaked Images
296298

297299
If you have control over the emulators' snapshots, simply download (see test-butler’s guide) and install the test-butler APK once (e.g. use `adb install -r -t path/to/test-butler-app.apk`), and save an updated version of the snapshot. This is the best solution.

0 commit comments

Comments
 (0)