Skip to content

Instantly share code, notes, and snippets.

@testableapple
Created January 26, 2020 15:08
Show Gist options
  • Save testableapple/e11cd87703fbfaaba52a336f439739aa to your computer and use it in GitHub Desktop.
Save testableapple/e11cd87703fbfaaba52a336f439739aa to your computer and use it in GitHub Desktop.
@Test
fun sample() {
recyclerViewCounter(R.id.recyclerViewId) {
val fab = withId(R.id.fab)
val firstFabPosition = getFirstMatchingPosition(fab)
onView(getView(firstFabPosition)).perform(click())
val lastFabPosition = getLastMatchingPosition(fab)
onView(getView(lastFabPosition)).perform(click())
val actualFabCount = getCount(fab)
assertEquals(3, actualFabCount)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment