I had an issue to cover UI screen with shimmer by espresso integration test
Describe the solution you'd like:
onView(allOf(withClassName(endsWith("RecyclerView")), isDisplayed()))
.check(matches(CustomMatchers().recyclerViewSizeMatch(count)))
or
onView(CustomMatchers().isThisRequiredListInShimmer(tagToMatch))
fun isThisRequiredListInShimmer(tagToMatch: String): BoundedMatcher<View, RecyclerView> {
return object : BoundedMatcher<View, RecyclerView>(RecyclerView::class.java) {
override fun describeTo(description: Description) {
description.appendText("RecyclerView in shimmer component should have defined tag $tagToMatch")
}
override fun matchesSafely(item: RecyclerView): Boolean {
return item.tag != null && item.tag.equals(tagToMatch)
}
}
}
Describe alternatives you've considered:
This a solution I implemented for my use case, but it would be good to have more elegant way to do this.
Is your feature request related to a problem?
I had an issue to cover UI screen with shimmer by espresso integration test
Describe the solution you'd like:
Describe alternatives you've considered:
This a solution I implemented for my use case, but it would be good to have more elegant way to do this.