Splitties icon indicating copy to clipboard operation
Splitties copied to clipboard

Add Espresso Split

Open AdamMc331 opened this issue 6 years ago • 1 comments

I think it would be useful to have a split for Espresso testing. I'll follow up on this ticket with more specific ideas, but one off the top of my head would be to replace this:

onView(withId(R.id.someInput)).perform(clearText(), typeText("Adam"), closeSoftKeyboard())

With something like:

enterText(R.id.someInput, "Adam")

Which reduce even more Espresso boilerplate. I will think about this, though, because the above example isn't really flexible and may not be exactly what the user wants to do. In any case, I think it's a worthy discussion.

AdamMc331 avatar May 21 '18 14:05 AdamMc331

I think your enterText example is nice. For cases where you would not want to clear the text, there may be an addText extension, and both may have a closeSoftKeyboard parameter that would default to true. I'm interested in seeing other examples like this as you come across Espresso boilerplate in codebases.

LouisCAD avatar May 21 '18 14:05 LouisCAD