Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Othinn committed Oct 30, 2023
1 parent 3f89c86 commit b642e9c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/rn-tester-e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ The first step you need to do is to ensure to install the tooling:

```bash
npm install appium@2.0.0 -g
appium driver install uiautomator2
appium driver install xcuitest
appium driver install uiautomator2@2.29.0
appium driver install xcuitest@5.6.0
```

> More details about drivers in Appium [here](https://appium.github.io/appium/docs/en/2.0/guides/managing-exts/) and [here](https://appium.github.io/appium/docs/en/2.0/quickstart/uiauto2-driver/)
Expand Down Expand Up @@ -113,6 +113,6 @@ This project has 2 main folders:
- `tests`, where the tests and referencing files all live. The substructure is as follows:
- `screens` -> in this folder, you will find `*.screen.js` files, where each file represents a navigation screen for RNTester. So there are 3 root ones (`apis`, `bookmarks`, `components`) and then for subscreens, there's a folder with the same name - currently, that's only `components` that contains `buttonComponent.screen.js`. The content of these files is what was earlier mentioned as "references": they provide an easy way to define all elements present in said screen, so that they can be used for tests.
- `specs` -> this folder follows a similar 1:1 mapping to the RNTester screens, but for the tests: for each screen (or subscreen) there's a dedicated `*.test.js` file (such as `buttonComponentScreen.test.js`). Ideally, in this file the Jest tests are standard, leveraging the `*.screen.js` counterpart for the details of defining how Appium/WDIO can reach those elements on screen.
- `specs` -> this folder follows a similar 1:1 mapping to the RNTester screens, but for the tests: for each screen (or subscreen) there's a dedicated folder file and within it theres test file (such as `invertedFlatList.test.js`).

When adding a new test, please ensure that you follow this pattern and add the relevant test in the right screen file / screen test file. Use the files mentioned above as examples.
2 changes: 1 addition & 1 deletion packages/rn-tester-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@wdio/local-runner": "^7.32.0",
"@wdio/mocha-framework": "^7.32.0",
"@wdio/spec-reporter": "^7.32.0",
"appium": "2.0.0",
"appium": "^2.0.0",
"appium-uiautomator2-driver": "^2.29.0",
"appium-xcuitest-driver": "^5.6.0"
}
Expand Down
14 changes: 12 additions & 2 deletions packages/rn-tester-e2e/wdio.conf.android.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/

const path = require('path');

exports.config = {
Expand Down Expand Up @@ -28,6 +38,7 @@ exports.config = {
connectionRetryTimeout: 120000,

connectionRetryCount: 3,
specFileRetries: 2,
services: [
[
'appium',
Expand All @@ -36,11 +47,10 @@ exports.config = {
address: 'localhost',
port: 4723
},
// logPath: './'
logPath: './reports',
}
]
],

framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
Expand Down
14 changes: 12 additions & 2 deletions packages/rn-tester-e2e/wdio.conf.ios.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/

const path = require('path');

exports.config = {
Expand Down Expand Up @@ -25,6 +35,7 @@ exports.config = {
connectionRetryTimeout: 120000,

connectionRetryCount: 3,
specFileRetries: 2,
services: [
[
'appium',
Expand All @@ -33,14 +44,13 @@ exports.config = {
address: 'localhost',
port: 4723
},
logPath: './reports',
}
]
],

reporters: ['spec'],
framework: 'mocha',
mochaOpts: {
retries: 4,
ui: 'bdd',
timeout: 60000,
require: ['@babel/register']
Expand Down

0 comments on commit b642e9c

Please sign in to comment.