Last active
January 13, 2019 22:08
-
-
Save igor-brishkoski/14d1c494b765ce450a18ac1cf7d29ba6 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 CreatePostRobot : BaseRobot() { | |
fun enterPostText(text: String) = | |
postText().typeText(text) | |
fun submitPost() = | |
postImageView().click() | |
fun matchResultText(expectedText: String) = | |
postSubmitResultText().isTextDisplayed(expectedText) | |
companion object { | |
fun postText(): ViewInteraction = | |
onView(withId(R.id.post_text)) | |
// Change to ImageView | |
fun postImageButton(): ViewInteraction = | |
onView(withId(R.id.post_image_view)) | |
fun postSubmitResultText(): ViewInteraction = | |
onView(withId(R.id.post_submit_result_text)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment