Barista icon indicating copy to clipboard operation
Barista copied to clipboard

Provide methods that receive any custom Matcher

Open Sloy opened this issue 6 years ago • 3 comments

The changes proposed in https://github.com/SchibstedSpain/Barista/pull/223 raised the discussion of just having simple methods for searching views by id and text, or having more combinations for special cases.

Allowing a third variant to search by any Matcher<View> would allow users to use their own custom rules for any special case.

For example:

clickOn(R.id.button)

clickOn("Button")

val customMatcher = allOf(withId(R.id.button), isEnabled()))
clickOn(customMatcher)

This would apply to Interactions and Assertions.

Opinions?

Sloy avatar Jun 28 '18 07:06 Sloy

Go for it!

alorma avatar Jun 28 '18 08:06 alorma

That's nice! And easy with Kotlin! 💃

SmasSive avatar Jul 05 '18 08:07 SmasSive

Hey @SmasSive, any progress with this issue?

EsteveAguilera avatar Jul 12 '19 07:07 EsteveAguilera