Issue
I am following Google's example to test my fragment with a mock navControllor. I'm doing everything the same and I am getting this error from Espresso when using assertThat.Error message I got
It appears that i need to pass in an additional matcher which is not in the example Google provide. I don't know why this matcher is needed.
My dependency versions:
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Any help is appreciated! Thanks!
Solution
The assertThat
from the documentation comes from Truth, which you'd add to your project via that Gradle dependency:
androidTestImplementation "com.google.truth:truth:1.0.1"
Answered By - ianhanniballake
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.