1
0
Fork 0

fix TabbedBrowsingTest.kt failure where Share Tabs element was not found (#5282)

master
No-Jun Park 2019-09-12 18:56:36 -04:00 committed by Richard Pappalardo
parent 3fda14015c
commit 3cdcbe4af6
2 changed files with 6 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class TabbedBrowsingTest {
}.openTabsListThreeDotMenu {
verifyCloseAllTabsButton()
verifyShareButton()
verifyShareTabButton()
verifySaveCollection()
}
}
@ -130,7 +130,7 @@ class TabbedBrowsingTest {
verifyExistingTabList()
}.openTabsListThreeDotMenu {
verifyCloseAllTabsButton()
verifyShareButton()
verifyShareTabButton()
verifySaveCollection()
}.closeAllTabs {
verifyNoCollectionsHeader()

View File

@ -39,6 +39,7 @@ class ThreeDotMenuRobot {
shareButton().click()
mDevice.wait(Until.findObject(By.text("SHARE A LINK")), waitingTime)
}
fun verifyShareTabButton() = assertShareTabButton()
fun verifySaveCollection() = assertSaveCollectionButton()
fun verifyFindInPageButton() = assertFindInPageButton()
fun verifyShareDialogTitle() = assertShareDialogTitle()
@ -155,6 +156,9 @@ private fun closeAllTabsButton() = onView(allOf(withText("Close all tabs")))
private fun assertCloseAllTabsButton() = closeAllTabsButton()
.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 assertShareButton() = shareButton()
.check(matches(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))