tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit a7d872e9d28072c2dd6d688d1b6c0493fcf7e94c
parent f03a8af4dc541a45a9c09d0c756601a3beb2f9a4
Author: AndiAJ <andiaj@users.noreply.github.com>
Date:   Thu, 30 Oct 2025 06:37:38 +0000

Bug 1877633 - Fix verifyEditAddressViewTest UI test r=aaronmt

The UI test was flaky because it sometimes exited the "Edit address" section because of the keyboard dismissal.
I've moved the action after doing some assertion to improve the syncing.

The UI test successfully passed 100x on Firebase ✅

Differential Revision: https://phabricator.services.mozilla.com/D270515

Diffstat:
Mmobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuAutofillRobot.kt | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuAutofillRobot.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuAutofillRobot.kt @@ -45,6 +45,7 @@ import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime import org.mozilla.fenix.helpers.TestHelper.hasCousin import org.mozilla.fenix.helpers.TestHelper.mDevice import org.mozilla.fenix.helpers.TestHelper.packageName +import org.mozilla.fenix.helpers.TestHelper.waitForAppWindowToBeUpdated import org.mozilla.fenix.helpers.click import org.mozilla.fenix.settings.address.ui.edit.EditAddressTestTag @@ -230,9 +231,6 @@ class SettingsSubMenuAutofillRobot(private val composeTestRule: ComposeTestRule) } fun verifyEditAddressView() { - Log.i(TAG, "verifyEditAddressView: Trying to click device back button to dismiss keyboard using device back button") - mDevice.pressBack() - Log.i(TAG, "verifyEditAddressView: Clicked device back button to dismiss keyboard using device back button") Log.i(TAG, "verifyEditAddressView: Trying to verify that the \"Edit address\" items are displayed") listOf( composeTestRule.navigateBackButton(), @@ -245,6 +243,11 @@ class SettingsSubMenuAutofillRobot(private val composeTestRule: ComposeTestRule) composeTestRule.subRegionDropDown(), ).forEach { it.assertIsDisplayed() } + Log.i(TAG, "verifyEditAddressView: Trying to click device back button to dismiss keyboard using device back button") + mDevice.pressBack() + Log.i(TAG, "verifyEditAddressView: Clicked device back button to dismiss keyboard using device back button") + waitForAppWindowToBeUpdated() + if (composeTestRule.countryDropDown().isNotDisplayed()) { composeTestRule.countryDropDown().performScrollTo() }