android-test
android-test copied to clipboard
RecyclerVIewActions.actionOnItem do not throw PerformException with cause AmbiguousViewMatcherException in case when unique recycler item have more than one matched view
Preconditions:
- RecyclerView.itemsCount = 1
- Recyclerview have item with 2 TextViews and each TextView have text "Test"
Steps to Reproduce
run code
onView(withId(R.id.recyclerView)).perform(RecyclerVIewActions.actionOnItem(hasDescendant(withText("Test")), click()))
Expected Results
code throw PerformException with cause AmbiguousViewMatcherException, becouse matcher hasDescendant(withText("Test")) matches 2 TextViews
Actual Results
code not throw PerformException with cause AmbiguousViewMatcherException, test passed without any errors
AndroidX Test and Android OS Versions
androidx.test.espresso:espresso-core:3.4.0