android-test icon indicating copy to clipboard operation
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

Open almaz010891 opened this issue 4 years ago • 0 comments

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

almaz010891 avatar Nov 25 '21 08:11 almaz010891