|
|
@ -37,6 +37,10 @@ import org.hamcrest.CoreMatchers.anyOf
|
|
|
|
import org.hamcrest.CoreMatchers.containsString
|
|
|
|
import org.hamcrest.CoreMatchers.containsString
|
|
|
|
import org.hamcrest.Matcher
|
|
|
|
import org.hamcrest.Matcher
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
|
|
|
import org.mozilla.fenix.helpers.Constants.LONG_CLICK_DURATION
|
|
|
|
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.assertItemWithResIdAndTextExists
|
|
|
|
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
|
|
|
|
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndDescription
|
|
|
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndDescription
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeLong
|
|
|
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeLong
|
|
|
@ -191,10 +195,11 @@ class TabDrawerRobot {
|
|
|
|
waitingTime,
|
|
|
|
waitingTime,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
tab(title).also {
|
|
|
|
mDevice.findObject(
|
|
|
|
it.waitForExists(waitingTime)
|
|
|
|
By
|
|
|
|
it.longClick()
|
|
|
|
.textContains(title)
|
|
|
|
}
|
|
|
|
.res("$packageName:id/mozac_browser_tabstray_title"),
|
|
|
|
|
|
|
|
).click(LONG_CLICK_DURATION)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fun createCollection(
|
|
|
|
fun createCollection(
|
|
|
@ -215,12 +220,11 @@ class TabDrawerRobot {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fun verifyTabsMultiSelectionCounter(numOfTabs: Int) {
|
|
|
|
fun verifyTabsMultiSelectionCounter(numOfTabs: Int) =
|
|
|
|
assertTrue(
|
|
|
|
assertItemWithResIdAndTextExists(
|
|
|
|
mDevice.findObject(UiSelector().text("$numOfTabs selected"))
|
|
|
|
itemWithResId("$packageName:id/multiselect_title"),
|
|
|
|
.waitForExists(waitingTime),
|
|
|
|
itemContainingText("$numOfTabs selected"),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Transition {
|
|
|
|
class Transition {
|
|
|
|
fun openThreeDotMenu(interact: ThreeDotMenuMainRobot.() -> Unit): ThreeDotMenuMainRobot.Transition {
|
|
|
|
fun openThreeDotMenu(interact: ThreeDotMenuMainRobot.() -> Unit): ThreeDotMenuMainRobot.Transition {
|
|
|
|