fix TabbedBrowsingTest.kt failure where Share Tabs element was not found (#5282)
parent
3fda14015c
commit
3cdcbe4af6
|
@ -76,7 +76,7 @@ class TabbedBrowsingTest {
|
||||||
|
|
||||||
}.openTabsListThreeDotMenu {
|
}.openTabsListThreeDotMenu {
|
||||||
verifyCloseAllTabsButton()
|
verifyCloseAllTabsButton()
|
||||||
verifyShareButton()
|
verifyShareTabButton()
|
||||||
verifySaveCollection()
|
verifySaveCollection()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ class TabbedBrowsingTest {
|
||||||
verifyExistingTabList()
|
verifyExistingTabList()
|
||||||
}.openTabsListThreeDotMenu {
|
}.openTabsListThreeDotMenu {
|
||||||
verifyCloseAllTabsButton()
|
verifyCloseAllTabsButton()
|
||||||
verifyShareButton()
|
verifyShareTabButton()
|
||||||
verifySaveCollection()
|
verifySaveCollection()
|
||||||
}.closeAllTabs {
|
}.closeAllTabs {
|
||||||
verifyNoCollectionsHeader()
|
verifyNoCollectionsHeader()
|
||||||
|
|
|
@ -39,6 +39,7 @@ class ThreeDotMenuRobot {
|
||||||
shareButton().click()
|
shareButton().click()
|
||||||
mDevice.wait(Until.findObject(By.text("SHARE A LINK")), waitingTime)
|
mDevice.wait(Until.findObject(By.text("SHARE A LINK")), waitingTime)
|
||||||
}
|
}
|
||||||
|
fun verifyShareTabButton() = assertShareTabButton()
|
||||||
fun verifySaveCollection() = assertSaveCollectionButton()
|
fun verifySaveCollection() = assertSaveCollectionButton()
|
||||||
fun verifyFindInPageButton() = assertFindInPageButton()
|
fun verifyFindInPageButton() = assertFindInPageButton()
|
||||||
fun verifyShareDialogTitle() = assertShareDialogTitle()
|
fun verifyShareDialogTitle() = assertShareDialogTitle()
|
||||||
|
@ -155,6 +156,9 @@ private fun closeAllTabsButton() = onView(allOf(withText("Close all tabs")))
|
||||||
private fun assertCloseAllTabsButton() = closeAllTabsButton()
|
private fun assertCloseAllTabsButton() = closeAllTabsButton()
|
||||||
.check(matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
|
.check(matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
|
||||||
|
|
||||||
|
private fun shareTabButton() = onView(allOf(withText("Share tabs")))
|
||||||
|
private fun assertShareTabButton() = shareTabButton()
|
||||||
|
.check(matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
|
||||||
private fun shareButton() = onView(allOf(withText("Share")))
|
private fun shareButton() = onView(allOf(withText("Share")))
|
||||||
private fun assertShareButton() = shareButton()
|
private fun assertShareButton() = shareButton()
|
||||||
.check(matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
|
.check(matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
|
||||||
|
|
Loading…
Reference in New Issue