2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-17 15:26:23 +00:00

Bug 1829600 - New no internet connection error page UI test

This commit is contained in:
AndiAJ 2023-04-25 18:38:17 +03:00 committed by mergify[bot]
parent 07bdcbc994
commit 072af09bbc
2 changed files with 27 additions and 0 deletions

View File

@ -127,4 +127,24 @@ class BrowsingErrorPagesTest {
verifyAddressNotFoundErrorMessage()
}
}
@Test
fun noInternetConnectionErrorMessageTest() {
val url = "www.example.com"
setNetworkEnabled(false)
navigationToolbar {
}.enterURLAndEnterToBrowser(url.toUri()) {
verifyNoInternetConnectionErrorMessage()
}
setNetworkEnabled(true)
browserScreen {
clickPageObject(itemWithResId("errorTryAgain"))
waitForPageToLoad()
verifyPageContent("Example Domain")
}
}
}

View File

@ -812,6 +812,13 @@ class BrowserRobot {
assertItemWithResIdExists(itemWithResId("errorTryAgain"))
}
fun verifyNoInternetConnectionErrorMessage() {
assertItemContainingTextExists(
itemContainingText(getStringResource(R.string.mozac_browser_errorpages_no_internet_title)),
)
assertItemWithResIdExists(itemWithResId("errorTryAgain"))
}
class Transition {
fun openThreeDotMenu(interact: ThreeDotMenuMainRobot.() -> Unit): ThreeDotMenuMainRobot.Transition {
mDevice.waitForIdle(waitingTime)