|
|
@ -28,6 +28,7 @@ import kotlinx.coroutines.runBlocking
|
|
|
|
import org.hamcrest.CoreMatchers
|
|
|
|
import org.hamcrest.CoreMatchers
|
|
|
|
import org.hamcrest.CoreMatchers.allOf
|
|
|
|
import org.hamcrest.CoreMatchers.allOf
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
|
|
|
import org.mozilla.fenix.helpers.ext.waitNotNull
|
|
|
|
import org.mozilla.fenix.helpers.ext.waitNotNull
|
|
|
|
import org.mozilla.fenix.helpers.idlingresource.NetworkConnectionIdlingResource
|
|
|
|
import org.mozilla.fenix.helpers.idlingresource.NetworkConnectionIdlingResource
|
|
|
|
import org.mozilla.fenix.ui.robots.mDevice
|
|
|
|
import org.mozilla.fenix.ui.robots.mDevice
|
|
|
@ -88,6 +89,7 @@ object TestHelper {
|
|
|
|
|
|
|
|
|
|
|
|
fun verifyUrl(urlSubstring: String, resourceName: String, resId: Int) {
|
|
|
|
fun verifyUrl(urlSubstring: String, resourceName: String, resId: Int) {
|
|
|
|
waitUntilObjectIsFound(resourceName)
|
|
|
|
waitUntilObjectIsFound(resourceName)
|
|
|
|
|
|
|
|
mDevice.findObject(UiSelector().text(urlSubstring)).waitForExists(waitingTime)
|
|
|
|
onView(withId(resId)).check(ViewAssertions.matches(withText(CoreMatchers.containsString(urlSubstring))))
|
|
|
|
onView(withId(resId)).check(ViewAssertions.matches(withText(CoreMatchers.containsString(urlSubstring))))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|