|
|
|
@ -34,6 +34,8 @@ import org.junit.Assert.assertFalse
|
|
|
|
|
import org.junit.Assert.assertTrue
|
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.TAG
|
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.assertUIObjectExists
|
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
|
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort
|
|
|
|
@ -103,14 +105,7 @@ object TestHelper {
|
|
|
|
|
).waitUntilGone(waitingTime)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun verifySnackBarText(expectedText: String) {
|
|
|
|
|
assertTrue(
|
|
|
|
|
mDevice.findObject(
|
|
|
|
|
UiSelector()
|
|
|
|
|
.textContains(expectedText),
|
|
|
|
|
).waitForExists(waitingTime),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
fun verifySnackBarText(expectedText: String) = assertUIObjectExists(itemContainingText(expectedText))
|
|
|
|
|
|
|
|
|
|
fun verifyUrl(urlSubstring: String, resourceName: String, resId: Int) {
|
|
|
|
|
waitUntilObjectIsFound(resourceName)
|
|
|
|
|