From a3c6b43110ab9f52d75f7d0cbf73ff21184b7b4d Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Tue, 31 Jan 2023 16:31:21 -0300 Subject: [PATCH] Debug working on local, but not release --- .detoxrc.js | 11 ++++++----- .../java/chat/rocket/reactnative/DetoxTest.java | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.detoxrc.js b/.detoxrc.js index 7217631d0..75f00ad6e 100644 --- a/.detoxrc.js +++ b/.detoxrc.js @@ -25,14 +25,15 @@ module.exports = { 'android.debug': { type: 'android.apk', binaryPath: 'android/app/build/outputs/apk/experimentalPlay/debug/app-experimental-play-debug.apk', - build: 'cd android ; ./gradlew assembleExperimentalPlayDebugAndroidTest -DtestBuildType=debug ; cd -', + build: + 'cd android ; ./gradlew assembleExperimentalPlayDebug assembleExperimentalPlayDebugAndroidTest -DtestBuildType=debug ; cd -', reversePorts: [8081] }, 'android.release': { type: 'android.apk', - binaryPath: - 'android/app/build/outputs/apk/androidTest/experimentalPlay/release/app-experimental-play-release-androidTest.apk', - build: 'cd android ; ./gradlew assembleExperimentalPlayReleaseAndroidTest -DtestBuildType=release ; cd -' + binaryPath: 'android/app/build/outputs/apk/experimentalPlay/release/app-experimental-play-release.apk', + build: + 'cd android ; ./gradlew assembleExperimentalPlayRelease assembleExperimentalPlayReleaseAndroidTest -DtestBuildType=release ; cd -' } }, devices: { @@ -51,7 +52,7 @@ module.exports = { emulator: { type: 'android.emulator', device: { - avdName: 'myavd' + avdName: 'Pixel_4_XL_API_31' } } }, diff --git a/android/app/src/androidTest/java/chat/rocket/reactnative/DetoxTest.java b/android/app/src/androidTest/java/chat/rocket/reactnative/DetoxTest.java index 1ab897cd0..2c848e9a6 100644 --- a/android/app/src/androidTest/java/chat/rocket/reactnative/DetoxTest.java +++ b/android/app/src/androidTest/java/chat/rocket/reactnative/DetoxTest.java @@ -18,7 +18,7 @@ public class DetoxTest { @Rule // Replace 'MainActivity' with the value of android:name entry in // in AndroidManifest.xml - public ActivityTestRule mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false); + public ActivityTestRule mActivityRule = new ActivityTestRule<>(chat.rocket.reactnative.MainActivity.class, false, false); @Test public void runDetoxTests() {