2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-15 18:12:54 +00:00

Bug 1880221 - Convert private variables to functions so they don't get initialised

This commit is contained in:
AndiAJ 2024-02-13 15:45:42 +02:00 committed by mergify[bot]
parent 9c7b082829
commit b5b4abb1ff

View File

@ -87,21 +87,21 @@ class RecentlyClosedTabsRobot {
}
fun clickOpenInNewTab(testRule: HomeActivityComposeTestRule, interact: ComposeTabDrawerRobot.() -> Unit): ComposeTabDrawerRobot.Transition {
openInNewTabOption.click()
openInNewTabOption().click()
ComposeTabDrawerRobot(testRule).interact()
return ComposeTabDrawerRobot.Transition(testRule)
}
fun clickOpenInPrivateTab(testRule: HomeActivityComposeTestRule, interact: ComposeTabDrawerRobot.() -> Unit): ComposeTabDrawerRobot.Transition {
openInPrivateTabOption.click()
openInPrivateTabOption().click()
ComposeTabDrawerRobot(testRule).interact()
return ComposeTabDrawerRobot.Transition(testRule)
}
fun clickShare(interact: ShareOverlayRobot.() -> Unit): ShareOverlayRobot.Transition {
multipleSelectionShareButton.click()
multipleSelectionShareButton().click()
ShareOverlayRobot().interact()
return ShareOverlayRobot.Transition()
@ -132,8 +132,8 @@ private fun recentlyClosedTabDeleteButton() =
),
)
private val openInNewTabOption = onView(withText("Open in new tab"))
private fun openInNewTabOption() = onView(withText("Open in new tab"))
private val openInPrivateTabOption = onView(withText("Open in private tab"))
private fun openInPrivateTabOption() = onView(withText("Open in private tab"))
private val multipleSelectionShareButton = onView(withId(R.id.share_history_multi_select))
private fun multipleSelectionShareButton() = onView(withId(R.id.share_history_multi_select))