mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
[fenix] Bug 1814082 - New verifyStateFieldUpdatesInAccordanceWithCountryFieldTest UI test
This commit is contained in:
parent
2ec11455fa
commit
b22e3922d3
@ -313,4 +313,20 @@ class AddressAutofillTest {
|
||||
verifyManageAddressesToolbarTitle()
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyStateFieldUpdatesInAccordanceWithCountryFieldTest() {
|
||||
homeScreen {
|
||||
}.openThreeDotMenu {
|
||||
}.openSettings {
|
||||
}.openAutofillSubMenu {
|
||||
verifyAddressAutofillSection(true, false)
|
||||
clickAddAddressButton()
|
||||
verifyCountryOption("United States")
|
||||
verifyStateOption("Alabama")
|
||||
verifyCountryOptions("Canada", "United States")
|
||||
clickCountryOption("Canada")
|
||||
verifyStateOption("Alberta")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +116,27 @@ class SettingsSubMenuAutofillRobot {
|
||||
)
|
||||
}
|
||||
|
||||
fun verifyCountryOption(country: String) {
|
||||
scrollToElementByText(getStringResource(R.string.addresses_country))
|
||||
mDevice.pressBack()
|
||||
assertItemContainingTextExists(itemContainingText(country))
|
||||
}
|
||||
|
||||
fun verifyStateOption(state: String) =
|
||||
assertItemContainingTextExists(itemContainingText(state))
|
||||
|
||||
fun verifyCountryOptions(vararg countries: String) {
|
||||
countryDropDown.click()
|
||||
for (country in countries) {
|
||||
assertItemContainingTextExists(itemContainingText(country))
|
||||
}
|
||||
}
|
||||
|
||||
fun selectCountry(country: String) {
|
||||
countryDropDown.click()
|
||||
countryOption(country).click()
|
||||
}
|
||||
|
||||
fun verifyEditAddressView() {
|
||||
assertItemContainingTextExists(editAddressToolbarTitle)
|
||||
assertItemWithDescriptionExists(navigateBackButton)
|
||||
|
Loading…
Reference in New Issue
Block a user