adding helper to fetch text from resources

This commit is contained in:
Adam Brown 2021-11-09 08:46:53 +00:00
parent 474e2aadbe
commit 2a66efb733

View file

@ -54,6 +54,10 @@ object EspressoHelper {
}
}
fun getString(@StringRes id: Int): String {
return EspressoHelper.getCurrentActivity()!!.resources.getString(id)
}
fun waitForView(viewMatcher: Matcher<View>, timeout: Long = 10_000, waitForDisplayed: Boolean = true): ViewAction {
return object : ViewAction {
override fun getConstraints(): Matcher<View> {