[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecyclerVIewActions.actionOnItem incorrect PerformExceprionCause when matched 0 or more than 1 item #1218

Open
almaz010891 opened this issue Nov 25, 2021 · 0 comments

Comments

@almaz010891
Copy link
almaz010891 commented Nov 25, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant