Created
October 20, 2017 11:29
-
-
Save kozmi55/64682710eacc7c167685c93470679248 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun testOpenDetailsOnItemClick() { | |
mockRepoUsers(1) | |
activityRule.launchActivity(Intent()) | |
Espresso.onView(ViewMatchers.withId(R.id.recyclerView)) | |
.perform(RecyclerViewActions.actionOnItemAtPosition<RecyclerView.ViewHolder>(0, ViewActions.click())) | |
val expectedText = "User 1: 100 pts" | |
Espresso.onView(Matchers.allOf(ViewMatchers.withId(android.support.design.R.id.snackbar_text), ViewMatchers.withText(expectedText))) | |
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment