2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-11 13:11:01 +00:00

Attempt at fixing openAllTabsInCollectionTest test

This commit is contained in:
Jonathan Almeida 2021-04-16 01:03:22 -04:00 committed by Jonathan Almeida
parent 8b1752dd9e
commit b6f9bbf560

View File

@ -162,7 +162,14 @@ class TabDrawerRobot {
fun clickSelectTabs() { fun clickSelectTabs() {
threeDotMenu().click() threeDotMenu().click()
onView(withText("Select tabs")).click()
mDevice.waitNotNull(
Until.findObject(text("Select tabs")),
waitingTime
)
val selectTabsButton = mDevice.findObject(text("Select tabs"))
selectTabsButton.click()
} }
fun clickAddNewCollection() = addNewCollectionButton().click() fun clickAddNewCollection() = addNewCollectionButton().click()
@ -201,13 +208,13 @@ class TabDrawerRobot {
} }
fun openTabDrawer(interact: TabDrawerRobot.() -> Unit): TabDrawerRobot.Transition { fun openTabDrawer(interact: TabDrawerRobot.() -> Unit): TabDrawerRobot.Transition {
mDevice.findObject(UiSelector().resourceId("org.mozilla.fenix.debug:id/tab_button")) mDevice.findObject(UiSelector().resourceId("$packageName:id/tab_button"))
.waitForExists(waitingTime) .waitForExists(waitingTime)
tabsCounter().click() tabsCounter().click()
org.mozilla.fenix.ui.robots.mDevice.waitNotNull( org.mozilla.fenix.ui.robots.mDevice.waitNotNull(
Until.findObject(By.res("org.mozilla.fenix.debug:id/tab_layout")), Until.findObject(By.res("$packageName:id/tab_layout")),
waitingTime waitingTime
) )