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

Feature Request: add clickAny<>() support similar to assertAny<>() #298

Open
kenyee opened this issue May 14, 2019 · 5 comments
Open

Feature Request: add clickAny<>() support similar to assertAny<>() #298

kenyee opened this issue May 14, 2019 · 5 comments

Comments

@kenyee
Copy link

kenyee commented May 14, 2019

assertAny() is a nice feature to let us check any views that are hard to match.

Please add a similar clickAny() method that you can specify a matcher for. Or maybe clickOn() that takes a matcher instead of just an ID or String?

Use case is if a screen has a layout that has a few other layouts included, there are duplicate IDs so you need to reference the parent of the layout you want to clean on...

@Sloy
Copy link
Member

Sloy commented May 16, 2019

Hi Ken! Thanks for the suggestion :)
I remember discussing something like this some time ago. I thought there was an issue already but I can't find one.
Yes, in my opinion this would be a very nice feature. A clickOn(matcher: Matcher<View>) would allow people to take advantage of Barista's magic even for corner cases that aren't supported by the current API.

Would you like to contribute it with a Pull Request? That would help a lot.

@kenyee
Copy link
Author

kenyee commented May 20, 2019

I can try doing a PR...should just able to copy the assertAny code for the most part :-)

@EsteveAguilera
Copy link
Contributor

How's this feature evolving?
I've just faced a test that fits on this feature request! 😅

@sharath2106
Copy link

Is there a PR raised for this issue? If not, i'd like to work on this.

@Sloy
Copy link
Member

Sloy commented Sep 7, 2020

Hi @sharath2106, I don't think anybody is currently working on this. Feel free! :)

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

No branches or pull requests

4 participants