|
|
|
@ -37,6 +37,14 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun verifySyncedTabsButtonIsSelected(isSelected: Boolean = true) {
|
|
|
|
|
if (isSelected) {
|
|
|
|
|
composeTestRule.syncedTabsButton().assertIsSelected()
|
|
|
|
|
} else {
|
|
|
|
|
composeTestRule.syncedTabsButton().assertIsNotSelected()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun verifyExistingOpenTabs(vararg titles: String) {
|
|
|
|
|
titles.forEach { title ->
|
|
|
|
|
tabItem(title).assertExists()
|
|
|
|
@ -87,6 +95,14 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
|
|
|
|
|
composeTestRule.dropdownMenuItemTabSettings().assertExists()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun verifyThreeDotButton() {
|
|
|
|
|
composeTestRule.threeDotButton().assertExists()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun verifyFab() {
|
|
|
|
|
composeTestRule.tabsTrayFab().assertExists()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Closes a tab when there is only one tab open.
|
|
|
|
|
*/
|
|
|
|
@ -155,6 +171,11 @@ private fun ComposeTestRule.normalBrowsingButton() = onNodeWithTag(TabsTrayTestT
|
|
|
|
|
*/
|
|
|
|
|
private fun ComposeTestRule.privateBrowsingButton() = onNodeWithTag(TabsTrayTestTag.privateTabsPageButton)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Obtains the synced tabs page button of the Tabs Tray banner.
|
|
|
|
|
*/
|
|
|
|
|
private fun ComposeTestRule.syncedTabsButton() = onNodeWithTag(TabsTrayTestTag.syncedTabsPageButton)
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Obtains the normal tabs list.
|
|
|
|
|
*/
|
|
|
|
|