Bug 1837569 - Fix verifyStateFieldUpdatesInAccordanceWithCountryFieldTest UI test

fenix/125.0
AndiAJ 3 months ago committed by mergify[bot]
parent 2a5f1a8b36
commit 03541525b1

@ -5,6 +5,7 @@
package org.mozilla.fenix.ui.robots package org.mozilla.fenix.ui.robots
import android.util.Log import android.util.Log
import androidx.test.espresso.Espresso.closeSoftKeyboard
import androidx.test.espresso.Espresso.onView import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.RootMatchers import androidx.test.espresso.matcher.RootMatchers
@ -173,10 +174,10 @@ class SettingsSubMenuAutofillRobot {
} }
fun verifyCountryOption(country: String) { fun verifyCountryOption(country: String) {
scrollToElementByText(getStringResource(R.string.addresses_country)) Log.i(TAG, "verifyCountryOption: Trying to perform \"Close soft keyboard\" action")
Log.i(TAG, "verifyCountryOption: Trying to click device back button") // Closing the keyboard to ensure full visibility of the "Add address" view
mDevice.pressBack() closeSoftKeyboard()
Log.i(TAG, "verifyCountryOption: Clicked device back button") Log.i(TAG, "verifyCountryOption: Performed \"Close soft keyboard\" action")
assertUIObjectExists(itemContainingText(country)) assertUIObjectExists(itemContainingText(country))
} }

Loading…
Cancel
Save