From f6404a20080d54f644189137dc54270d38f8c905 Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Tue, 27 Jul 2021 15:07:02 -0700 Subject: [PATCH] [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/20540: always swipe twice to openSettings in ThreeDotMenuMainRobot. --- .../mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt index d423188796..c4cb1e47d7 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt @@ -127,11 +127,11 @@ class ThreeDotMenuMainRobot { private val mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()) fun openSettings(interact: SettingsRobot.() -> Unit): SettingsRobot.Transition { - var maxSwipes = 3 - while (!settingsButton().exists() && maxSwipes != 0) { - threeDotMenuRecyclerView().perform(swipeUp()) - maxSwipes-- - } + // We require one swipe to display the full size 3-dot menu. On smaller devices + // 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()) settingsButton().click() SettingsRobot().interact()