Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ jobs:
name: Run E2E tests
command: |
cd packages/rn-tester-e2e
yarn test-ios-e2e
yarn test-e2e ios

# -------------------------
# JOBS: Android E2E Tests
Expand Down Expand Up @@ -853,7 +853,7 @@ jobs:
name: Run E2E tests
command: |
cd packages/rn-tester-e2e
yarn test-android-e2e
yarn test-e2e android
# -------------------------
# JOBS: Test Android
# -------------------------
Expand Down
4 changes: 2 additions & 2 deletions packages/rn-tester-e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ Now, make sure that the iOS simulator/the Android emulator is up and running.
Finally, you can open a third terminal window and run:

```bash
yarn test-android-e2e # for android
yarn test-ios-e2e # for ios
yarn test-e2e android # for android
yarn test-e2e ios # for ios
```

Now you should see the RNTester app being open, and the defined test being run.
Expand Down
4 changes: 1 addition & 3 deletions packages/rn-tester-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"directory": "packages/rn-tester-e2e"
},
"scripts": {
"test": "jest --runInBand",
"test-android-e2e": "E2E_DEVICE=\"android\" yarn test",
"test-ios-e2e": "E2E_DEVICE=\"ios\" yarn test"
"test-e2e": "node ./../../scripts/e2e/run-e2e-tests.js"
},
"devDependencies": {
"appium": "^2.0.0",
Expand Down
9 changes: 9 additions & 0 deletions scripts/e2e/run-e2e-tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const SUPPORTED_PLATFORMS = ['ios', 'android'];

if (process.argv.length !== 3 || !SUPPORTED_PLATFORMS.includes(process.argv[2])) {
throw new Error(`Invalid platform. Supported platforms are: ${SUPPORTED_PLATFORMS.join(', ')}`);
}

const platform = process.argv[2];
const { execSync } = require('child_process');
execSync(`E2E_DEVICE=${platform} jest --runInBand`, { stdio: 'inherit' });