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:
parent
07bdcbc994
commit
072af09bbc
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user