RecyclerVIewActions.actionOnItem incorrect PerformExceprionCause when matched 0 or more than 1 item
Description
RecyclerVIewActions.actionOnItem incorrect PerformExceprionCause when matched 0 or more than 1 item
Steps to Reproduce
RecyclerView have more than 1 item with matcher, for example:
onView(withId(R.id.recycler_view).perform(RecyclerViewActions.actionOnItem(isDisplayed(), click()))
If RecyclerView have 2 or more items, this code throws PerformException, but PerformException.cause is RuntimeException instead of AmbiguousViewMatcherException
Same situation when RecyclerView does not have any item with matcher, for example (all RecyclerView items is displayed):
onView(withId(R.id.recycler_view).perform(RecyclerViewActions.actionOnItem(not(isDisplayed()), click()))
this code throws PerformException, but PerformException.cause is RuntimeException instead of NoMatchingViewException
AndroidX Test and Android OS Versions
androidx.test.espresso:espresso-core:3.4.0