Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e, android): forward-port test app to targetSdkVersion 31 #5835

Merged
merged 1 commit into from
Nov 5, 2021
Merged
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
5 changes: 4 additions & 1 deletion tests/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity
android:name="com.facebook.react.devsupport.DevSettingsActivity"
android:exported="true"
/>
</application>
</manifest>
1 change: 1 addition & 0 deletions tests/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:exported="true"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
Expand Down
4 changes: 2 additions & 2 deletions tests/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
ext.buildToolsVersion = '31.0.0'
ext.minSdkVersion = 21
ext.compileSdkVersion = 30
ext.targetSdkVersion = 30
ext.compileSdkVersion = 31
ext.targetSdkVersion = 31
ext.ndkVersion = '21.4.7075529'

ext.kotlinVersion = '1.5.31' // https://kotlinlang.org/releases.html
Expand Down
21 changes: 21 additions & 0 deletions tests/patches/detox+18.23.1.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
diff --git a/node_modules/detox/android/detox/build.gradle b/node_modules/detox/android/detox/build.gradle
index 8bef864..3689459 100644
--- a/node_modules/detox/android/detox/build.gradle
+++ b/node_modules/detox/android/detox/build.gradle
@@ -86,12 +86,12 @@ dependencies {
// Versions are in-sync with the 'androidx-test-1.2.0' release/tag of the android-test github repo,
// used by the Detox generator. See https://github.com/android/android-test/releases/tag/androidx-test-1.2.0
// Important: Should remain so when generator tag is replaced!
- api('androidx.test.espresso:espresso-core:3.3.0') { // Needed all across Detox but also makes Espresso seamlessly provided to Detox users with hybrid apps/E2E-tests.
+ api('androidx.test.espresso:espresso-core:3.4.0') { // Needed all across Detox but also makes Espresso seamlessly provided to Detox users with hybrid apps/E2E-tests.
exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
- api 'androidx.test.espresso:espresso-web:3.3.0' // Web-View testing
- api 'androidx.test:rules:1.2.0' // Needed because of ActivityTestRule. Needed by users *and* internally used by Detox.
- api 'androidx.test.ext:junit:1.1.1' // Needed so as to seamlessly provide AndroidJUnit4 to Detox users. Depends on junit core.
+ api 'androidx.test.espresso:espresso-web:3.4.0' // Web-View testing
+ api 'androidx.test:rules:1.4.0' // Needed because of ActivityTestRule. Needed by users *and* internally used by Detox.
+ api 'androidx.test.ext:junit:1.1.3' // Needed so as to seamlessly provide AndroidJUnit4 to Detox users. Depends on junit core.

// Version is the latest; Cannot sync with the Github repo (e.g. android/android-test) because the androidx
// packaging version of associated classes is simply not there...
diff --git a/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/UIModuleIdlingResource.java b/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/UIModuleIdlingResource.java
index 2407926..65d17d8 100644
--- a/node_modules/detox/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/UIModuleIdlingResource.java
Expand Down