tor-browser

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

commit 30f51c47c12dd9576fb3b0e98bbd7f024a057d4f
parent bf66297346732bd0ac911b5a19e9e05e134054c8
Author: Delia Pop <dpop@mozilla.com>
Date:   Thu, 27 Nov 2025 19:14:23 +0000

Bug 1824956 - Fix verifyAddressAutofillToggleTest UI test r=aaronmt

The verifyAddressAutofillToggleTest and verifyAutofillAddressSectionTest (bug 1986869) UI tests were intermittently failing when attempting to enter input into the  email field because the keyboard remained focused after typing in the previous phone field.
Using waitForAppWindowToBeUpdated() wasn’t a suitable solution in these cases, as it caused flakiness after tapping the “Save” button.
I resolved the problem by explicitly dismissing the keyboard after entering both the phone number and the email address.

The UI tests successfully passed 100x on Firebase ✅

Try : https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=166008

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

Diffstat:
Mmobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuAutofillRobot.kt | 6++++++
1 file changed, 6 insertions(+), 0 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 @@ -405,9 +405,15 @@ class SettingsSubMenuAutofillRobot(private val composeTestRule: ComposeTestRule) Log.i(TAG, "fillAndSaveAddress: Trying to set \"Phone\" to $phoneNumber") composeTestRule.phoneTextInput().performTextInput(phoneNumber) Log.i(TAG, "fillAndSaveAddress: \"Phone\" was set to $phoneNumber") + Log.i(TAG, "fillAndSaveAddress: Trying to close the keyboard.") + closeSoftKeyboard() + Log.i(TAG, "fillAndSaveAddress: Closed the keyboard.") Log.i(TAG, "fillAndSaveAddress: Trying to set \"Email\" to $emailAddress") composeTestRule.emailTextInput().performTextInput(emailAddress) Log.i(TAG, "fillAndSaveAddress: \"Email\" was set to $emailAddress") + Log.i(TAG, "fillAndSaveAddress: Trying to close the keyboard.") + closeSoftKeyboard() + Log.i(TAG, "fillAndSaveAddress: Closed the keyboard.") Log.i(TAG, "fillAndSaveAddress: Trying to click the \"Save\" button") if (composeTestRule.saveButton().isNotDisplayed()) { composeTestRule.saveButton().performScrollTo()