Created
July 12, 2020 06:54
-
-
Save BramYeh/ff2cb027799b63606422450ae2fcd8fe to your computer and use it in GitHub Desktop.
ItemPage extends basic Page
This file contains hidden or 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 ItemPage : Page() { | |
override fun verify(): Page { | |
Espresso.onView(withId(R.id.productitem_product_name)) | |
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))) | |
return this | |
} | |
fun withTitle(keyword: String): ItemPage { | |
Espresso.onView(withId(R.id.productitem_product_name)) | |
.check(matches(ViewMatchers.withText(keyword))) | |
return this | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment