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

startOnLastTab UI smoke test

This commit is contained in:
AndiAJ 2021-11-17 09:29:07 +02:00 committed by mergify[bot]
parent 4ff64ad7ca
commit e265da0cb4
2 changed files with 36 additions and 0 deletions

View File

@ -20,6 +20,7 @@ import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
import org.mozilla.fenix.helpers.TestAssetHelper.getLoremIpsumAsset
import org.mozilla.fenix.helpers.TestHelper.restartApp
import org.mozilla.fenix.ui.robots.browserScreen
import org.mozilla.fenix.ui.robots.checkTextSizeOnWebsite
import org.mozilla.fenix.ui.robots.homeScreen
import org.mozilla.fenix.ui.robots.navigationToolbar
@ -245,4 +246,38 @@ class SettingsBasicsTest {
verifyHomeScreen()
}
}
@SmokeTest
@Test
fun startOnLastTabTest() {
val firstWebPage = getGenericAsset(mockWebServer, 1)
homeScreen {
}.openThreeDotMenu {
}.openSettings {
}.openHomepageSubMenu {
clickStartOnHomepageButton()
}
restartApp(activityIntentTestRule)
homeScreen {
verifyHomeScreen()
}
navigationToolbar {
}.enterURLAndEnterToBrowser(firstWebPage.url) {
mDevice.waitForIdle()
}.goToHomescreen {
}.openThreeDotMenu {
}.openCustomizeHome {
clickStartOnLastTabButton()
}
restartApp(activityIntentTestRule)
browserScreen {
verifyUrl(firstWebPage.url.toString())
}
}
}

View File

@ -32,6 +32,7 @@ class SettingsSubMenuHomepageRobot {
fun clickJumpBackInButton() = jumpBackInButton().click()
fun clickRecentBookmarksButton() = recentBookmarksButton().click()
fun clickStartOnHomepageButton() = homepageButton().click()
fun clickStartOnLastTabButton() = lastTabButton().click()
class Transition {