|
|
@ -127,11 +127,11 @@ class ThreeDotMenuMainRobot {
|
|
|
|
private val mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
|
|
|
|
private val mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
|
|
|
|
|
|
|
|
|
|
|
|
fun openSettings(interact: SettingsRobot.() -> Unit): SettingsRobot.Transition {
|
|
|
|
fun openSettings(interact: SettingsRobot.() -> Unit): SettingsRobot.Transition {
|
|
|
|
var maxSwipes = 3
|
|
|
|
// We require one swipe to display the full size 3-dot menu. On smaller devices
|
|
|
|
while (!settingsButton().exists() && maxSwipes != 0) {
|
|
|
|
// such as the Pixel 2, we require two swipes to display the "Settings" menu item
|
|
|
|
|
|
|
|
// at the bottom. On larger devices, the second swipe is a no-op.
|
|
|
|
|
|
|
|
threeDotMenuRecyclerView().perform(swipeUp())
|
|
|
|
threeDotMenuRecyclerView().perform(swipeUp())
|
|
|
|
threeDotMenuRecyclerView().perform(swipeUp())
|
|
|
|
maxSwipes--
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
settingsButton().click()
|
|
|
|
settingsButton().click()
|
|
|
|
|
|
|
|
|
|
|
|
SettingsRobot().interact()
|
|
|
|
SettingsRobot().interact()
|
|
|
|