Skip to content

Commit

Permalink
remove all detox references since it's unused
Browse files Browse the repository at this point in the history
  • Loading branch information
kelset committed Jan 17, 2022
1 parent eba55a6 commit 177dc04
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 851 deletions.
20 changes: 0 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,6 @@ jobs:
description: Specifies whether unit tests should run.
type: boolean
default: false
run_detox_tests:
description: Specifies whether Detox e2e tests should run.
type: boolean
default: false
run_disabled_tests:
description: Specifies whether disabled tests should run. Set this to true to debug failing tests.
type: boolean
Expand Down Expand Up @@ -435,13 +431,6 @@ jobs:
- run:
name: "Run Tests: iOS Unit and Integration Tests"
command: yarn test-ios
# Runs iOS Detox e2e tests
- when:
condition: << parameters.run_detox_tests >>
steps:
- run:
name: "Run Tests: Detox iOS End-to-End Tests"
command: yarn run build-ios-e2e && yarn run test-ios-e2e

# Optionally, run disabled tests
- when:
Expand Down Expand Up @@ -898,15 +887,6 @@ workflows:
# use_hermes: true
# use_frameworks: true
# run_unit_tests: true
# DISABLED: Detox tests need to be fixed
# - test_ios:
# name: test_ios_detox
# run_detox_tests: true
# DISABLED: USE_FRAMEWORKS=1 not supported by Flipper
# - test_ios:
# name: test_ios_detox_frameworks
# use_frameworks: true
# run_detox_tests: true
- test_js:
name: test_js_prev_lts
executor: nodeprevlts
Expand Down
5 changes: 0 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ allprojects {
maven {
url = uri("$rootDir/node_modules/jsc-android/dist")
}
maven {
// https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md
// All of Detox's artifacts are provided via the npm module
url = uri("$rootDir/node_modules/detox/Detox-android")
}
google()
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
Expand Down
39 changes: 0 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@
"test-android-instrumentation": "yarn run docker-build-android && yarn run test-android-run-instrumentation",
"test-android-unit": "yarn run docker-build-android && yarn run test-android-run-unit",
"test-android-e2e": "yarn run docker-build-android && yarn run test-android-run-e2e",
"build-ios-e2e": "detox build -c ios.sim.release",
"test-ios-e2e": "detox test -c ios.sim.release packages/rn-tester/e2e",
"test-ios": "./scripts/objc-test.sh test"
},
"workspaces": [
Expand Down Expand Up @@ -129,43 +127,6 @@
"flow-bin": "^0.168.0",
"react": "17.0.2"
},
"detox": {
"test-runner": "jest",
"runner-config": "packages/rn-tester/e2e/config.json",
"specs": "",
"configurations": {
"android.emu.release": {
"binaryPath": "packages/rn-tester/android/app/build/outputs/apk/hermes/release/app-hermes-x86-release.apk",
"testBinaryPath": "packages/rn-tester/android/app/build/outputs/apk/androidTest/hermes/release/app-hermes-release-androidTest.apk",
"build": "./gradlew :packages:rn-tester:android:app:assembleRelease :packages:rn-tester:android:app:assembleAndroidTest -DtestBuildType=release",
"type": "android.emulator",
"device": {
"avdName": "Nexus_6_API_29"
}
},
"android.emu.debug": {
"binaryPath": "packages/rn-tester/android/app/build/outputs/apk/hermes/debug/app-hermes-x86-debug.apk",
"testBinaryPath": "packages/rn-tester/android/app/build/outputs/apk/androidTest/hermes/debug/app-hermes-debug-androidTest.apk",
"build": "./gradlew :packages:rn-tester:android:app:assembleDebug :packages:rn-tester:android:app:assembleAndroidTest -DtestBuildType=debug",
"type": "android.emulator",
"device": {
"avdName": "Nexus_6_API_29"
}
},
"ios.sim.release": {
"binaryPath": "packages/rn-tester/build/Build/Products/Release-iphonesimulator/RNTester.app/",
"build": "xcodebuild -workspace packages/rn-tester/RNTesterPods.xcworkspace -scheme RNTester -configuration Release -sdk iphonesimulator -derivedDataPath packages/rn-tester/build -UseModernBuildSystem=NO -quiet",
"type": "ios.simulator",
"name": "iPhone 8"
},
"ios.sim.debug": {
"binaryPath": "packages/rn-tester/build/Build/Products/Debug-iphonesimulator/RNTester.app/",
"build": "xcodebuild -workspace packages/rn-tester/RNTesterPods.xcworkspace -scheme RNTester -configuration Debug -sdk iphonesimulator -derivedDataPath packages/rn-tester/build -UseModernBuildSystem=NO -quiet",
"type": "ios.simulator",
"name": "iPhone 8"
}
}
},
"codegenConfig": {
"libraries": [
{
Expand Down
23 changes: 0 additions & 23 deletions packages/rn-tester/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,6 @@ Run the following commands from the react-native folder:

_Note: The native libs are still built using gradle. Full build with buck is coming soon(tm)._

## Running Detox Tests on iOS

Install Detox from [here](https://github.com/wix/Detox/blob/master/docs/Introduction.GettingStarted.md).

To run the e2e tests locally, run the following commands from the react-native folder:

yarn build-ios-e2e
yarn test-ios-e2e

These are the equivalent of running:

detox build -c ios.sim.release
detox test -c ios.sim.release --cleanup

These build the app in Release mode, so the production code is bundled and included in the built app.

When developing E2E tests, you may want to run in development mode, so that changes to the production code show up immediately. To do this, run:

detox build -c ios.sim.debug
detox test -c ios.sim.debug

You will also need to have Metro running in another terminal. Note that if you've previously run the E2E tests in release mode, you may need to delete the `RNTester/build` folder before rerunning `detox build`.

## Building from source

Building the app on both iOS and Android means building the React Native framework from source. This way you're running the latest native and JS code the way you see it in your clone of the github repo.
Expand Down
4 changes: 0 additions & 4 deletions packages/rn-tester/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ android {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
// Detox-specific additions to pro-guard
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
}
}
sourceSets.main {
Expand Down Expand Up @@ -250,8 +248,6 @@ dependencies {
jscImplementation 'org.webkit:android-jsc:+'
}

// Use detox test library
androidTestImplementation('com.wix:detox:+') { transitive = true }
androidTestImplementation 'junit:junit:4.12'
}

Expand Down

This file was deleted.

51 changes: 0 additions & 51 deletions packages/rn-tester/e2e/__tests__/Alert-test.js

This file was deleted.

97 changes: 0 additions & 97 deletions packages/rn-tester/e2e/__tests__/Button-test.js

This file was deleted.

Loading

0 comments on commit 177dc04

Please sign in to comment.