mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
Bug 1829600 - New address not found error page UI test
This commit is contained in:
parent
250e8ef04e
commit
07bdcbc994
@ -11,10 +11,12 @@ import org.junit.Test
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.customannotations.SmokeTest
|
||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
||||
import org.mozilla.fenix.helpers.RetryTestRule
|
||||
import org.mozilla.fenix.helpers.TestHelper.getStringResource
|
||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
||||
import org.mozilla.fenix.ui.robots.browserScreen
|
||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||
|
||||
/**
|
||||
@ -112,4 +114,17 @@ class BrowsingErrorPagesTest {
|
||||
verifyPageContent("Example Domain")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun addressNotFoundErrorMessageTest() {
|
||||
val url = "ww.example.com"
|
||||
|
||||
navigationToolbar {
|
||||
}.enterURLAndEnterToBrowser(url.toUri()) {
|
||||
waitForPageToLoad()
|
||||
verifyAddressNotFoundErrorMessage()
|
||||
clickPageObject(itemWithResId("errorTryAgain"))
|
||||
verifyAddressNotFoundErrorMessage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -805,6 +805,13 @@ class BrowserRobot {
|
||||
assertItemWithResIdExists(itemWithResId("errorTryAgain"))
|
||||
}
|
||||
|
||||
fun verifyAddressNotFoundErrorMessage() {
|
||||
assertItemContainingTextExists(
|
||||
itemContainingText(getStringResource(R.string.mozac_browser_errorpages_unknown_host_title)),
|
||||
)
|
||||
assertItemWithResIdExists(itemWithResId("errorTryAgain"))
|
||||
}
|
||||
|
||||
class Transition {
|
||||
fun openThreeDotMenu(interact: ThreeDotMenuMainRobot.() -> Unit): ThreeDotMenuMainRobot.Transition {
|
||||
mDevice.waitForIdle(waitingTime)
|
||||
|
Loading…
Reference in New Issue
Block a user