Last active
January 13, 2019 21:40
-
-
Save igor-brishkoski/5f0ee3c10618c6ca17f9cdc8337ea083 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
class CreatePostActivityTest { | |
@Test | |
fun void createPost_WithText_Success() { | |
// Find the edit text and perform typing text action | |
// close the keyboard after text has been entered | |
onView(withId(R.id.post_text)) | |
.perform(ViewActions.typeText("This is a post"),ViewActions.closeSoftKeyboard)) | |
// Find the submit post button and perform a click | |
onView(withId(R.id.post_button)) | |
.perform(ViewActions.click()) | |
// Find the verification text and verify the result text | |
onView(withId(R.id.post_submit_result_text)) | |
.check(ViewAssertions.matches(ViewMatchers.withText(R.string.post_submitted))) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment