Bug 1876720 - Add more test logs to ComposeTabDrawerRobot

fenix/124.1.0
AndiAJ 4 months ago committed by mergify[bot]
parent 77adecc2d1
commit feb1001f9e

@ -6,6 +6,7 @@
package org.mozilla.fenix.ui.robots package org.mozilla.fenix.ui.robots
import android.util.Log
import android.view.View import android.view.View
import androidx.compose.ui.semantics.SemanticsActions import androidx.compose.ui.semantics.SemanticsActions
import androidx.compose.ui.test.ExperimentalTestApi import androidx.compose.ui.test.ExperimentalTestApi
@ -42,6 +43,7 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior
import org.hamcrest.Matcher import org.hamcrest.Matcher
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.helpers.Constants import org.mozilla.fenix.helpers.Constants
import org.mozilla.fenix.helpers.Constants.TAG
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
import org.mozilla.fenix.helpers.HomeActivityComposeTestRule import org.mozilla.fenix.helpers.HomeActivityComposeTestRule
import org.mozilla.fenix.helpers.MatcherHelper.assertUIObjectExists import org.mozilla.fenix.helpers.MatcherHelper.assertUIObjectExists
@ -63,24 +65,30 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
fun verifyNormalBrowsingButtonIsSelected(isSelected: Boolean = true) { fun verifyNormalBrowsingButtonIsSelected(isSelected: Boolean = true) {
if (isSelected) { if (isSelected) {
composeTestRule.normalBrowsingButton().assertIsSelected() composeTestRule.normalBrowsingButton().assertIsSelected()
Log.i(TAG, "verifyNormalBrowsingButtonIsSelected: Verified normal browsing button is selected")
} else { } else {
composeTestRule.normalBrowsingButton().assertIsNotSelected() composeTestRule.normalBrowsingButton().assertIsNotSelected()
Log.i(TAG, "verifyNormalBrowsingButtonIsSelected: Verified normal browsing button is not selected")
} }
} }
fun verifyPrivateBrowsingButtonIsSelected(isSelected: Boolean = true) { fun verifyPrivateBrowsingButtonIsSelected(isSelected: Boolean = true) {
if (isSelected) { if (isSelected) {
composeTestRule.privateBrowsingButton().assertIsSelected() composeTestRule.privateBrowsingButton().assertIsSelected()
Log.i(TAG, "verifyPrivateBrowsingButtonIsSelected: Verified private browsing button is selected")
} else { } else {
composeTestRule.privateBrowsingButton().assertIsNotSelected() composeTestRule.privateBrowsingButton().assertIsNotSelected()
Log.i(TAG, "verifyPrivateBrowsingButtonIsSelected: Verified private browsing button is not selected")
} }
} }
fun verifySyncedTabsButtonIsSelected(isSelected: Boolean = true) { fun verifySyncedTabsButtonIsSelected(isSelected: Boolean = true) {
if (isSelected) { if (isSelected) {
composeTestRule.syncedTabsButton().assertIsSelected() composeTestRule.syncedTabsButton().assertIsSelected()
Log.i(TAG, "verifySyncedTabsButtonIsSelected: Verified synced tabs button is selected")
} else { } else {
composeTestRule.syncedTabsButton().assertIsNotSelected() composeTestRule.syncedTabsButton().assertIsNotSelected()
Log.i(TAG, "verifySyncedTabsButtonIsSelected: Verified synced tabs button is not selected")
} }
} }
@ -97,14 +105,17 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
titles.forEach { title -> titles.forEach { title ->
itemContainingText(title).waitForExists(waitingTime) itemContainingText(title).waitForExists(waitingTime)
composeTestRule.tabItem(title).assertExists() composeTestRule.tabItem(title).assertExists()
Log.i(TAG, "verifyExistingOpenTabs: Verified open tab with title: $title exists")
} }
} }
fun verifyOpenTabsOrder(title: String, position: Int) = fun verifyOpenTabsOrder(title: String, position: Int) {
composeTestRule.normalTabsList() composeTestRule.normalTabsList()
.onChildAt(position - 1) .onChildAt(position - 1)
.assert(hasTestTag(TabsTrayTestTag.tabItemRoot)) .assert(hasTestTag(TabsTrayTestTag.tabItemRoot))
.assert(hasAnyChild(hasText(title))) .assert(hasAnyChild(hasText(title)))
Log.i(TAG, "verifyOpenTabsOrder: Verified open tab at position: $position has title: $title")
}
fun verifyNoExistingOpenTabs(vararg titles: String) { fun verifyNoExistingOpenTabs(vararg titles: String) {
titles.forEach { title -> titles.forEach { title ->
@ -117,58 +128,72 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
fun verifyNormalTabsList() { fun verifyNormalTabsList() {
composeTestRule.normalTabsList().assertExists() composeTestRule.normalTabsList().assertExists()
Log.i(TAG, "verifyNormalTabsList: Verified normal tabs list exists")
} }
fun verifyPrivateTabsList() { fun verifyPrivateTabsList() {
composeTestRule.privateTabsList().assertExists() composeTestRule.privateTabsList().assertExists()
Log.i(TAG, "verifyPrivateTabsList: Verified private tabs list exists")
} }
fun verifySyncedTabsList() { fun verifySyncedTabsList() {
composeTestRule.syncedTabsList().assertExists() composeTestRule.syncedTabsList().assertExists()
Log.i(TAG, "verifySyncedTabsList: Verified synced tabs list exists")
} }
fun verifyNoOpenTabsInNormalBrowsing() { fun verifyNoOpenTabsInNormalBrowsing() {
composeTestRule.emptyNormalTabsList().assertExists() composeTestRule.emptyNormalTabsList().assertExists()
Log.i(TAG, "verifyNoOpenTabsInNormalBrowsing: Verified empty normal tabs list exists")
} }
fun verifyNoOpenTabsInPrivateBrowsing() { fun verifyNoOpenTabsInPrivateBrowsing() {
composeTestRule.emptyPrivateTabsList().assertExists() composeTestRule.emptyPrivateTabsList().assertExists()
Log.i(TAG, "verifyNoOpenTabsInPrivateBrowsing: Verified empty private tabs list exists")
} }
fun verifyAccountSettingsButton() { fun verifyAccountSettingsButton() {
composeTestRule.dropdownMenuItemAccountSettings().assertExists() composeTestRule.dropdownMenuItemAccountSettings().assertExists()
Log.i(TAG, "verifyAccountSettingsButton: Verified \"Account settings\" menu button exists")
} }
fun verifyCloseAllTabsButton() { fun verifyCloseAllTabsButton() {
composeTestRule.dropdownMenuItemCloseAllTabs().assertExists() composeTestRule.dropdownMenuItemCloseAllTabs().assertExists()
Log.i(TAG, "verifyCloseAllTabsButton: Verified \"Close all tabs\" menu button exists")
} }
fun verifySelectTabsButton() { fun verifySelectTabsButton() {
composeTestRule.dropdownMenuItemSelectTabs().assertExists() composeTestRule.dropdownMenuItemSelectTabs().assertExists()
Log.i(TAG, "verifySelectTabsButton: Verified \"Select tabs\" menu button exists")
} }
fun verifyShareAllTabsButton() { fun verifyShareAllTabsButton() {
composeTestRule.dropdownMenuItemShareAllTabs().assertExists() composeTestRule.dropdownMenuItemShareAllTabs().assertExists()
Log.i(TAG, "verifyShareAllTabsButton: Verified \"Share all tabs\" menu button exists")
} }
fun verifyRecentlyClosedTabsButton() { fun verifyRecentlyClosedTabsButton() {
composeTestRule.dropdownMenuItemRecentlyClosedTabs().assertExists() composeTestRule.dropdownMenuItemRecentlyClosedTabs().assertExists()
Log.i(TAG, "verifyRecentlyClosedTabsButton: Verified \"Recently closed tabs\" menu button exists")
} }
fun verifyTabSettingsButton() { fun verifyTabSettingsButton() {
composeTestRule.dropdownMenuItemTabSettings().assertExists() composeTestRule.dropdownMenuItemTabSettings().assertExists()
Log.i(TAG, "verifyTabSettingsButton: Verified \"Tab settings\" menu button exists")
} }
fun verifyThreeDotButton() { fun verifyThreeDotButton() {
composeTestRule.threeDotButton().assertExists() composeTestRule.threeDotButton().assertExists()
Log.i(TAG, "verifyThreeDotButton: Verified three dot button exists")
} }
fun verifyFab() { fun verifyFab() {
composeTestRule.tabsTrayFab().assertExists() composeTestRule.tabsTrayFab().assertExists()
Log.i(TAG, "verifyFab: Verified new tab FAB button exists")
} }
fun verifyNormalTabCounter() { fun verifyNormalTabCounter() {
composeTestRule.normalTabsCounter().assertExists() composeTestRule.normalTabsCounter().assertExists()
Log.i(TAG, "verifyNormalTabCounter: Verified normal tabs list counter exists")
} }
/** /**
@ -176,6 +201,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
*/ */
fun verifyTabThumbnail() { fun verifyTabThumbnail() {
composeTestRule.tabThumbnail().assertExists() composeTestRule.tabThumbnail().assertExists()
Log.i(TAG, "verifyTabThumbnail: Verified tab thumbnail exists")
} }
/** /**
@ -183,22 +209,27 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
*/ */
fun verifyTabCloseButton() { fun verifyTabCloseButton() {
composeTestRule.closeTabButton().assertExists() composeTestRule.closeTabButton().assertExists()
Log.i(TAG, "verifyTabCloseButton: Verified close tab button exists")
} }
fun verifyTabsTrayBehaviorState(expectedState: Int) { fun verifyTabsTrayBehaviorState(expectedState: Int) {
tabsTrayView().check(ViewAssertions.matches(BottomSheetBehaviorStateMatcher(expectedState))) tabsTrayView().check(ViewAssertions.matches(BottomSheetBehaviorStateMatcher(expectedState)))
Log.i(TAG, "verifyTabsTrayBehaviorState: Verified that the tabs tray state matches: $expectedState")
} }
fun verifyMinusculeHalfExpandedRatio() { fun verifyMinusculeHalfExpandedRatio() {
tabsTrayView().check(ViewAssertions.matches(BottomSheetBehaviorHalfExpandedMaxRatioMatcher(0.001f))) tabsTrayView().check(ViewAssertions.matches(BottomSheetBehaviorHalfExpandedMaxRatioMatcher(0.001f)))
Log.i(TAG, "verifyMinusculeHalfExpandedRatio: Verified that the tabs tray half expanded ratio")
} }
fun verifyTabTrayIsOpen() { fun verifyTabTrayIsOpen() {
composeTestRule.tabsTray().assertExists() composeTestRule.tabsTray().assertExists()
Log.i(TAG, "verifyTabTrayIsOpen: Verified that the open tabs tray exists")
} }
fun verifyTabTrayIsClosed() { fun verifyTabTrayIsClosed() {
composeTestRule.tabsTray().assertDoesNotExist() composeTestRule.tabsTray().assertDoesNotExist()
Log.i(TAG, "verifyTabTrayIsClosed: Verified that the tabs tray is closed")
} }
/** /**
@ -206,6 +237,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
*/ */
fun closeTab() { fun closeTab() {
composeTestRule.closeTabButton().performClick() composeTestRule.closeTabButton().performClick()
Log.i(TAG, "closeTab: Clicked close tab button")
} }
/** /**
@ -213,6 +245,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
*/ */
fun swipeTabLeft(title: String) { fun swipeTabLeft(title: String) {
composeTestRule.tabItem(title).performTouchInput { swipeLeft() } composeTestRule.tabItem(title).performTouchInput { swipeLeft() }
Log.i(TAG, "swipeTabLeft: Performed swipe left action on tab: $title")
} }
/** /**
@ -220,6 +253,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
*/ */
fun swipeTabRight(title: String) { fun swipeTabRight(title: String) {
composeTestRule.tabItem(title).performTouchInput { swipeRight() } composeTestRule.tabItem(title).performTouchInput { swipeRight() }
Log.i(TAG, "swipeTabRight: Performed swipe right action on tab: $title")
} }
/** /**
@ -231,7 +265,9 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
firstCollection: Boolean = true, firstCollection: Boolean = true,
) { ) {
composeTestRule.threeDotButton().performClick() composeTestRule.threeDotButton().performClick()
Log.i(TAG, "createCollection: Clicked 3 dot button")
composeTestRule.dropdownMenuItemSelectTabs().performClick() composeTestRule.dropdownMenuItemSelectTabs().performClick()
Log.i(TAG, "createCollection: Clicked \"Select tabs\" menu button")
for (tab in tabTitles) { for (tab in tabTitles) {
selectTab(tab) selectTab(tab)
@ -250,8 +286,10 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
*/ */
@OptIn(ExperimentalTestApi::class) @OptIn(ExperimentalTestApi::class)
fun selectTab(title: String) { fun selectTab(title: String) {
composeTestRule.waitUntilExactlyOneExists(hasText(title), TestAssetHelper.waitingTime) Log.i(TAG, "selectTab: Waiting for tab with title: $title to exist")
composeTestRule.waitUntilExactlyOneExists(hasText(title), waitingTime)
composeTestRule.tabItem(title).performClick() composeTestRule.tabItem(title).performClick()
Log.i(TAG, "selectTab: Clicked tab with title: $title")
} }
/** /**
@ -260,6 +298,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
fun longClickTab(title: String) { fun longClickTab(title: String) {
composeTestRule.tabItem(title) composeTestRule.tabItem(title)
.performTouchInput { longClick(durationMillis = Constants.LONG_CLICK_DURATION) } .performTouchInput { longClick(durationMillis = Constants.LONG_CLICK_DURATION) }
Log.i(TAG, "longClickTab: Long clicked tab with title: $title")
} }
/** /**
@ -268,6 +307,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
fun verifyTabsMultiSelectionCounter(numOfTabs: Int) { fun verifyTabsMultiSelectionCounter(numOfTabs: Int) {
composeTestRule.multiSelectionCounter() composeTestRule.multiSelectionCounter()
.assert(hasText("$numOfTabs selected")) .assert(hasText("$numOfTabs selected"))
Log.i(TAG, "verifyTabsMultiSelectionCounter: Verified $numOfTabs are selected")
} }
/** /**
@ -275,9 +315,11 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
*/ */
@OptIn(ExperimentalTestApi::class) @OptIn(ExperimentalTestApi::class)
fun verifyTabMediaControlButtonState(action: String) { fun verifyTabMediaControlButtonState(action: String) {
Log.i(TAG, "verifyTabMediaControlButtonStateTab: Waiting for media tab control button: $action to exist")
composeTestRule.waitUntilAtLeastOneExists(hasContentDescription(action), waitingTime) composeTestRule.waitUntilAtLeastOneExists(hasContentDescription(action), waitingTime)
composeTestRule.tabMediaControlButton(action) composeTestRule.tabMediaControlButton(action)
.assertExists() .assertExists()
Log.i(TAG, "verifyTabMediaControlButtonStateTab: Verified media tab control button: $action exists")
} }
/** /**
@ -285,9 +327,11 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
*/ */
@OptIn(ExperimentalTestApi::class) @OptIn(ExperimentalTestApi::class)
fun clickTabMediaControlButton(action: String) { fun clickTabMediaControlButton(action: String) {
Log.i(TAG, "clickTabMediaControlButton: Waiting for media tab control button: $action to exist")
composeTestRule.waitUntilAtLeastOneExists(hasContentDescription(action), waitingTime) composeTestRule.waitUntilAtLeastOneExists(hasContentDescription(action), waitingTime)
composeTestRule.tabMediaControlButton(action) composeTestRule.tabMediaControlButton(action)
.performClick() .performClick()
Log.i(TAG, "clickTabMediaControlButton: Clicked media tab control button: $action")
} }
/** /**
@ -298,6 +342,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
.filter(hasParent(hasText(title))) .filter(hasParent(hasText(title)))
.onFirst() .onFirst()
.performClick() .performClick()
Log.i(TAG, "closeTabWithTitle: Closed tab with title: $title")
} }
class Transition(private val composeTestRule: HomeActivityComposeTestRule) { class Transition(private val composeTestRule: HomeActivityComposeTestRule) {
@ -306,24 +351,28 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
mDevice.waitForIdle() mDevice.waitForIdle()
composeTestRule.tabsTrayFab().performClick() composeTestRule.tabsTrayFab().performClick()
Log.i(TAG, "openNewTab: Clicked new tab FAB button")
SearchRobot().interact() SearchRobot().interact()
return SearchRobot.Transition() return SearchRobot.Transition()
} }
fun toggleToNormalTabs(interact: ComposeTabDrawerRobot.() -> Unit): Transition { fun toggleToNormalTabs(interact: ComposeTabDrawerRobot.() -> Unit): Transition {
composeTestRule.normalBrowsingButton().performClick() composeTestRule.normalBrowsingButton().performClick()
Log.i(TAG, "toggleToNormalTabs: Clicked normal browsing button")
ComposeTabDrawerRobot(composeTestRule).interact() ComposeTabDrawerRobot(composeTestRule).interact()
return Transition(composeTestRule) return Transition(composeTestRule)
} }
fun toggleToPrivateTabs(interact: ComposeTabDrawerRobot.() -> Unit): Transition { fun toggleToPrivateTabs(interact: ComposeTabDrawerRobot.() -> Unit): Transition {
composeTestRule.privateBrowsingButton().performClick() composeTestRule.privateBrowsingButton().performClick()
Log.i(TAG, "toggleToPrivateTabs: Clicked private browsing button")
ComposeTabDrawerRobot(composeTestRule).interact() ComposeTabDrawerRobot(composeTestRule).interact()
return Transition(composeTestRule) return Transition(composeTestRule)
} }
fun toggleToSyncedTabs(interact: ComposeTabDrawerRobot.() -> Unit): Transition { fun toggleToSyncedTabs(interact: ComposeTabDrawerRobot.() -> Unit): Transition {
composeTestRule.syncedTabsButton().performClick() composeTestRule.syncedTabsButton().performClick()
Log.i(TAG, "toggleToSyncedTabs: Clicked synced tabs button")
ComposeTabDrawerRobot(composeTestRule).interact() ComposeTabDrawerRobot(composeTestRule).interact()
return Transition(composeTestRule) return Transition(composeTestRule)
} }
@ -331,18 +380,21 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
fun clickSignInToSyncButton(interact: SyncSignInRobot.() -> Unit): SyncSignInRobot.Transition { fun clickSignInToSyncButton(interact: SyncSignInRobot.() -> Unit): SyncSignInRobot.Transition {
itemContainingText(getStringResource(R.string.sync_sign_in)) itemContainingText(getStringResource(R.string.sync_sign_in))
.clickAndWaitForNewWindow(TestAssetHelper.waitingTimeShort) .clickAndWaitForNewWindow(TestAssetHelper.waitingTimeShort)
Log.i(TAG, "clickSignInToSyncButton: Clicked sign in to sync button")
SyncSignInRobot().interact() SyncSignInRobot().interact()
return SyncSignInRobot.Transition() return SyncSignInRobot.Transition()
} }
fun openThreeDotMenu(interact: ComposeTabDrawerRobot.() -> Unit): Transition { fun openThreeDotMenu(interact: ComposeTabDrawerRobot.() -> Unit): Transition {
composeTestRule.threeDotButton().performClick() composeTestRule.threeDotButton().performClick()
Log.i(TAG, "openThreeDotMenu: Clicked three dot button")
ComposeTabDrawerRobot(composeTestRule).interact() ComposeTabDrawerRobot(composeTestRule).interact()
return Transition(composeTestRule) return Transition(composeTestRule)
} }
fun closeAllTabs(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition { fun closeAllTabs(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition {
composeTestRule.dropdownMenuItemCloseAllTabs().performClick() composeTestRule.dropdownMenuItemCloseAllTabs().performClick()
Log.i(TAG, "closeAllTabs: Clicked \"Close all tabs\" menu button")
HomeScreenRobot().interact() HomeScreenRobot().interact()
return HomeScreenRobot.Transition() return HomeScreenRobot.Transition()
} }
@ -351,6 +403,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
composeTestRule.tabItem(title) composeTestRule.tabItem(title)
.performScrollTo() .performScrollTo()
.performClick() .performClick()
Log.i(TAG, "openTab: Scrolled and clicked tab with title: $title")
BrowserRobot().interact() BrowserRobot().interact()
return BrowserRobot.Transition() return BrowserRobot.Transition()
@ -360,6 +413,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
composeTestRule.privateTabsList() composeTestRule.privateTabsList()
.onChildren()[position] .onChildren()[position]
.performClick() .performClick()
Log.i(TAG, "openPrivateTab: Opened private tab at position: ${position + 1}")
BrowserRobot().interact() BrowserRobot().interact()
return BrowserRobot.Transition() return BrowserRobot.Transition()
@ -369,6 +423,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
composeTestRule.normalTabsList() composeTestRule.normalTabsList()
.onChildren()[position] .onChildren()[position]
.performClick() .performClick()
Log.i(TAG, "openNormalTab: Opened tab at position: ${position + 1}")
BrowserRobot().interact() BrowserRobot().interact()
return BrowserRobot.Transition() return BrowserRobot.Transition()
@ -378,6 +433,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
// The topBar contains other views. // The topBar contains other views.
// Don't do the default click in the middle, rather click in some free space - top right. // Don't do the default click in the middle, rather click in some free space - top right.
Espresso.onView(ViewMatchers.withId(R.id.topBar)).clickAtLocationInView(GeneralLocation.TOP_RIGHT) Espresso.onView(ViewMatchers.withId(R.id.topBar)).clickAtLocationInView(GeneralLocation.TOP_RIGHT)
Log.i(TAG, "clickTopBar: Clicked tabs tray top bar")
ComposeTabDrawerRobot(composeTestRule).interact() ComposeTabDrawerRobot(composeTestRule).interact()
return Transition(composeTestRule) return Transition(composeTestRule)
} }
@ -435,6 +491,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
fun closeTabDrawer(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition { fun closeTabDrawer(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition {
composeTestRule.bannerHandle().performSemanticsAction(SemanticsActions.OnClick) composeTestRule.bannerHandle().performSemanticsAction(SemanticsActions.OnClick)
Log.i(TAG, "closeTabDrawer: Closed tabs tray clicking the handle")
BrowserRobot().interact() BrowserRobot().interact()
return BrowserRobot.Transition() return BrowserRobot.Transition()
@ -442,6 +499,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
fun clickSaveCollection(interact: CollectionRobot.() -> Unit): CollectionRobot.Transition { fun clickSaveCollection(interact: CollectionRobot.() -> Unit): CollectionRobot.Transition {
composeTestRule.collectionsButton().performClick() composeTestRule.collectionsButton().performClick()
Log.i(TAG, "clickSaveCollection: Clicked collections button")
CollectionRobot().interact() CollectionRobot().interact()
return CollectionRobot.Transition() return CollectionRobot.Transition()
@ -449,6 +507,7 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
fun clickShareAllTabsButton(interact: ShareOverlayRobot.() -> Unit): ShareOverlayRobot.Transition { fun clickShareAllTabsButton(interact: ShareOverlayRobot.() -> Unit): ShareOverlayRobot.Transition {
composeTestRule.dropdownMenuItemShareAllTabs().performClick() composeTestRule.dropdownMenuItemShareAllTabs().performClick()
Log.i(TAG, "clickShareAllTabsButton: Clicked \"Share all tabs\" menu button button")
ShareOverlayRobot().interact() ShareOverlayRobot().interact()
return ShareOverlayRobot.Transition() return ShareOverlayRobot.Transition()
@ -469,6 +528,7 @@ fun composeTabDrawer(composeTestRule: HomeActivityComposeTestRule, interact: Com
*/ */
private fun clickCollectionsButton(composeTestRule: HomeActivityComposeTestRule, interact: CollectionRobot.() -> Unit): CollectionRobot.Transition { private fun clickCollectionsButton(composeTestRule: HomeActivityComposeTestRule, interact: CollectionRobot.() -> Unit): CollectionRobot.Transition {
composeTestRule.collectionsButton().performClick() composeTestRule.collectionsButton().performClick()
Log.i(TAG, "clickCollectionsButton: Clicked collections button")
CollectionRobot().interact() CollectionRobot().interact()
return CollectionRobot.Transition() return CollectionRobot.Transition()

Loading…
Cancel
Save