commit 6d70f3aa4d61258fa0afd6eb27419ae411f8f6fc
parent 6f8a6db621dd9496ef726b207141018c2e1f2520
Author: Delia Pop <dpop@mozilla.com>
Date: Wed, 17 Dec 2025 14:45:30 +0000
Bug 2006319 - Fix verifyAddAddressViewTest UI test r=ajoltan
The verifyAddAddressViewTest UI test was flaky because it was accessing the “Sync addresses across devices” menu option instead of “Add address” due to a delay.
Added a 1s wait for the app window to be updated for better syncing before opening the “Add address” option.
Similarly, the verifyAddressAutofillTest UI test failed when asserting the autofilled address immediately after selection, before the UI finished updating.
Added a 1s wait for the app window to be updated for better syncing before asserting the autofilled address.
Both UI tests successfully passed 50x on Firebase
Try: [[ https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=169524 | link ]]
Differential Revision: https://phabricator.services.mozilla.com/D276842
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/AddressAutofillTest.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/AddressAutofillTest.kt
@@ -14,6 +14,7 @@ import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdContainingText
import org.mozilla.fenix.helpers.TestAssetHelper.addressFormAsset
import org.mozilla.fenix.helpers.TestHelper.exitMenu
import org.mozilla.fenix.helpers.TestHelper.packageName
+import org.mozilla.fenix.helpers.TestHelper.waitForAppWindowToBeUpdated
import org.mozilla.fenix.helpers.TestSetup
import org.mozilla.fenix.helpers.perf.DetectMemoryLeaksRule
import org.mozilla.fenix.ui.robots.autofillScreen
@@ -90,6 +91,7 @@ class AddressAutofillTest : TestSetup() {
"Harrison Street",
),
)
+ waitForAppWindowToBeUpdated()
verifyAutofilledAddress("Harrison Street")
}
}
@@ -130,6 +132,7 @@ class AddressAutofillTest : TestSetup() {
}.openThreeDotMenu {
}.openSettings {
}.openAutofillSubMenu(composeTestRule) {
+ waitForAppWindowToBeUpdated()
clickAddAddressButton()
verifyAddAddressView()
}.goBackToAutofillSettings(composeTestRule) {