[fenix] Bug 1807283 - Fix flakiness in verifyJumpBackInSectionTest

pull/600/head
oana.horvath 2 years ago committed by mergify[bot]
parent 6e5098f746
commit 579bc9f444

@ -140,12 +140,13 @@ class HomeScreenTest {
verifyJumpBackInShowAllButton() verifyJumpBackInShowAllButton()
}.clickJumpBackInShowAllButton { }.clickJumpBackInShowAllButton {
verifyExistingOpenTabs(firstWebPage.title) verifyExistingOpenTabs(firstWebPage.title)
}.closeTabDrawer() { }.closeTabDrawer {
} }
homeScreen { homeScreen {
}.clickJumpBackInItemWithTitle(firstWebPage.title) { }.clickJumpBackInItemWithTitle(firstWebPage.title) {
verifyUrl(firstWebPage.url.toString()) verifyUrl(firstWebPage.url.toString())
clickLinkMatchingText("Link 1") clickLinkMatchingText("Link 1")
verifyPageContent(secondWebPage.content)
}.goToHomescreen { }.goToHomescreen {
verifyJumpBackInSectionIsDisplayed() verifyJumpBackInSectionIsDisplayed()
verifyJumpBackInItemTitle(secondWebPage.title) verifyJumpBackInItemTitle(secondWebPage.title)

@ -286,7 +286,10 @@ class HomeScreenRobot {
} }
fun verifyTopSiteContextMenuItems() = assertTopSiteContextMenuItems() fun verifyTopSiteContextMenuItems() = assertTopSiteContextMenuItems()
fun verifyJumpBackInSectionIsDisplayed() = assertJumpBackInSectionIsDisplayed() fun verifyJumpBackInSectionIsDisplayed() {
scrollToElementByText(getStringResource(R.string.recent_tabs_header))
assertTrue(jumpBackInSection().waitForExists(waitingTime))
}
fun verifyJumpBackInSectionIsNotDisplayed() = assertJumpBackInSectionIsNotDisplayed() fun verifyJumpBackInSectionIsNotDisplayed() = assertJumpBackInSectionIsNotDisplayed()
fun verifyJumpBackInItemTitle(itemTitle: String) = assertJumpBackInItemTitle(itemTitle) fun verifyJumpBackInItemTitle(itemTitle: String) = assertJumpBackInItemTitle(itemTitle)
fun verifyJumpBackInItemWithUrl(itemUrl: String) = assertJumpBackInItemWithUrl(itemUrl) 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 assertJumpBackInSectionIsNotDisplayed() = assertFalse(jumpBackInSection().waitForExists(waitingTimeShort))
private fun assertJumpBackInItemTitle(itemTitle: String) = private fun assertJumpBackInItemTitle(itemTitle: String) =

Loading…
Cancel
Save