Skip to content

Commit

Permalink
Revert D46225747: add RNTester-E2E: tests for iOS and Android via App…
Browse files Browse the repository at this point in the history
…ium, WDIO and Jest

Differential Revision:
D46225747

Original commit changeset: e5428c439afd

Original Phabricator Diff: D46225747

fbshipit-source-id: b2136b5338a38fc52493f5c9a47dcb806d6a5f52
  • Loading branch information
Jiaqi Duan authored and facebook-github-bot committed Jul 25, 2023
1 parent 51a63f4 commit dd1c8a6
Show file tree
Hide file tree
Showing 16 changed files with 897 additions and 3,923 deletions.
134 changes: 0 additions & 134 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version: 2.1

orbs:
win: circleci/windows@2.4.0
android: circleci/android@2.3.0

# -------------------------
# REFERENCES
Expand Down Expand Up @@ -725,136 +724,6 @@ jobs:
path: ./reports/junit

# -------------------------
# JOBS: iOS E2E Tests
# -------------------------
test_e2e_ios:
executor: reactnativeios
parameters:
ruby_version:
default: "2.7.7"
description: The version of ruby that must be used
type: string
steps:
- checkout_code_with_cache
- run_yarn
- attach_workspace:
at: .
- run:
name: Install appium
command: npm install appium@2.0.0 -g
- run:
name: Install appium drivers
command: |
appium driver install uiautomator2
appium driver install xcuitest
- run:
name: Start Appium server
command: appium --base-path /wd/hub
background: true
- run:
name: Start Metro
command: |
cd packages/rn-tester
yarn start
background: true
- brew_install:
package: cmake
- setup_ruby:
ruby_version: << parameters.ruby_version >>
- run:
name: Install Bundler
command: |
cd packages/rn-tester
bundle check || bundle install
bundle exec pod setup
bundle exec pod install --verbose
- run:
name: Boot iOS Simulator
command: source scripts/.tests.env && xcrun simctl boot "$IOS_DEVICE" || true
- run:
name: Build app
command: |
xcodebuild build \
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
-configuration Debug \
-scheme RNTester \
-sdk iphonesimulator \
-derivedDataPath /tmp/e2e/
- run:
name: Move app to correct directory
command: mv /tmp/e2e/Build/Products/Debug-iphonesimulator/RNTester.app packages/rn-tester-e2e/apps/rn-tester.app
- run:
name: Check Appium server status
command: |
if ! nc -z 127.0.0.1 4723; then
echo Could not find Appium server!
exit 1
fi
- run:
name: Run E2E tests
command: |
cd packages/rn-tester-e2e
yarn test-ios-e2e
# -------------------------
# JOBS: Android E2E Tests
# -------------------------
test_e2e_android:
executor:
name: android/android-machine
tag: 2023.07.1
steps:
- checkout_code_with_cache
- run_yarn
- android/create-avd:
avd-name: e2e_emulator
system-image: system-images;android-33;google_apis;x86_64
install: true
- android/start-emulator:
avd-name: e2e_emulator
no-window: true
restore-gradle-cache-prefix: v1a
post-emulator-launch-assemble-command: ""
- run:
name: Install appium
command: npm install appium@2.0.0 -g
- run:
name: Install appium drivers
command: |
appium driver install uiautomator2
appium driver install xcuitest
- run:
name: Start Appium server
command: appium --base-path /wd/hub
background: true
- run:
name: Start Metro
command: |
cd packages/rn-tester
yarn start
background: true
- attach_workspace:
at: .
- run:
name: Build app
command: |
./gradlew :packages:rn-tester:android:app:assembleHermesDebug -PreactNativeArchitectures=x86_64
- run:
name: Move app to correct directory
command: mv packages/rn-tester/android/app/build/outputs/apk/hermes/debug/app-hermes-x86_64-debug.apk packages/rn-tester-e2e/apps/rn-tester.apk
- run:
name: Check Appium server status
command: |
if ! nc -z 127.0.0.1 4723; then
echo Could not find Appium server
exit 1
fi
- run:
name: Run E2E tests
command: |
cd packages/rn-tester-e2e
yarn test-android-e2e
# -------------------------
# JOBS: Test Android
# -------------------------
test_android:
Expand Down Expand Up @@ -1777,9 +1646,6 @@ workflows:
run_disabled_tests: false
- test_android
- test_android_docker_image
- test_e2e_ios:
ruby_version: "2.7.7"
- test_e2e_android
- test_android_template:
requires:
- build_npm_package
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,3 @@ package-lock.json

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# E2E files
/packages/rn-tester-e2e/apps/*.apk
/packages/rn-tester-e2e/apps/*.app
124 changes: 0 additions & 124 deletions packages/rn-tester-e2e/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/rn-tester-e2e/apps/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions packages/rn-tester-e2e/babel.config.js

This file was deleted.

61 changes: 0 additions & 61 deletions packages/rn-tester-e2e/e2e-config.js

This file was deleted.

17 changes: 0 additions & 17 deletions packages/rn-tester-e2e/jest.config.js

This file was deleted.

Loading

0 comments on commit dd1c8a6

Please sign in to comment.