Last active
January 13, 2019 22:07
-
-
Save igor-brishkoski/fa13565aefcf75cbf9552c6bab88e872 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() = | |
postButton().click() | |
fun matchResultText(expectedText: String) = | |
postSubmitResultText().isTextDisplayed(expectedText) | |
companion object { | |
fun postText(): ViewInteraction = | |
onView(withId(R.id.post_text)) | |
fun postButton(): ViewInteraction = | |
onView(withId(R.id.post_button)) | |
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