Skip to content

Commit

Permalink
Fixed espresso (ui) tests with solution mentioned in android/android-…
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfmast committed Dec 12, 2022
1 parent 0ee6623 commit b6799fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ android {
viewBinding true
}
namespace 'com.example.forage'

}

dependencies {
Expand Down Expand Up @@ -89,5 +90,8 @@ dependencies {
androidTestImplementation "androidx.navigation:navigation-testing:$nav_version"
androidTestImplementation 'androidx.test:runner:1.5.1'
androidTestUtil 'androidx.test:orchestrator:1.4.2'
debugImplementation "androidx.fragment:fragment-testing:1.5.4"
debugImplementation "androidx.fragment:fragment-testing:1.5.5"
// without this espresso tests 'hangs' with Logcat message, see:
// https://github.com/android/android-test/issues/1589
debugImplementation "androidx.test:monitor:1.6.0"
}
12 changes: 12 additions & 0 deletions app/src/androidTest/java/com/example/forage/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.forage">

<!-- This Manifest will only apply changes to androidTest builds -->

<queries>
<package android:name="androidx.test.orchestrator.OrchestratorService" />
</queries>

<application android:forceQueryable="true" />
</manifest>

0 comments on commit b6799fd

Please sign in to comment.