diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/HomeScreenTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/HomeScreenTest.kt index 7334264bd7..784e45501a 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/HomeScreenTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/HomeScreenTest.kt @@ -140,12 +140,13 @@ class HomeScreenTest { verifyJumpBackInShowAllButton() }.clickJumpBackInShowAllButton { verifyExistingOpenTabs(firstWebPage.title) - }.closeTabDrawer() { + }.closeTabDrawer { } homeScreen { }.clickJumpBackInItemWithTitle(firstWebPage.title) { verifyUrl(firstWebPage.url.toString()) clickLinkMatchingText("Link 1") + verifyPageContent(secondWebPage.content) }.goToHomescreen { verifyJumpBackInSectionIsDisplayed() verifyJumpBackInItemTitle(secondWebPage.title) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt index 2de155b53b..ec886932d8 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/HomeScreenRobot.kt @@ -286,7 +286,10 @@ class HomeScreenRobot { } fun verifyTopSiteContextMenuItems() = assertTopSiteContextMenuItems() - fun verifyJumpBackInSectionIsDisplayed() = assertJumpBackInSectionIsDisplayed() + fun verifyJumpBackInSectionIsDisplayed() { + scrollToElementByText(getStringResource(R.string.recent_tabs_header)) + assertTrue(jumpBackInSection().waitForExists(waitingTime)) + } fun verifyJumpBackInSectionIsNotDisplayed() = assertJumpBackInSectionIsNotDisplayed() fun verifyJumpBackInItemTitle(itemTitle: String) = assertJumpBackInItemTitle(itemTitle) fun verifyJumpBackInItemWithUrl(itemUrl: String) = assertJumpBackInItemWithUrl(itemUrl) @@ -986,8 +989,6 @@ private fun assertTopSiteContextMenuItems() { ) } -private fun assertJumpBackInSectionIsDisplayed() = assertTrue(jumpBackInSection().waitForExists(waitingTime)) - private fun assertJumpBackInSectionIsNotDisplayed() = assertFalse(jumpBackInSection().waitForExists(waitingTimeShort)) private fun assertJumpBackInItemTitle(itemTitle: String) =