[efficiency] Convert CreditCardAutofillTest.deleteSavedCreditCardUsingMenuButtonTest to ui/efficiency
Categories
(Firefox for Android :: UI Tests, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: jajohnson, Assigned: jajohnson)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Converts the legacy CreditCardAutofillTest.deleteSavedCreditCardUsingMenuButtonTest (TestRail 2271192) to the ui/efficiency harness. This is the first credit-card coverage on the framework, so it also adds the pieces that were missing:
- CreditCardTestData, mirroring AddressTestData. The expiry year is computed relative to today rather than hardcoded, because the editor does not offer past years and a fixed year would silently start failing.
- Credit-card selectors on SettingsAutofillSelectors, keyed off CreditCardEditorTestTags for the editor and off the existing text/res-id handles for the Autofill list rows.
- SettingsAutofillPage.fillAndSaveCreditCard, mirroring fillAndSaveAddress.
Three harness gaps surfaced while validating it on device, all fixed here:
-
selectDropdownOption matched option text exactly. The card expiry dropdowns render their options with surrounding text, so an exact match found nothing and the month selection timed out. It now takes an opt-in substring/ignore-case mode, matching what the legacy robot does for those two dropdowns; the address dropdowns keep exact matching.
-
selectDropdownOption caught Exception around its retry. Compose's waitUntil raises ComposeTimeoutException, which extends Throwable directly, so a timeout escaped the loop instead of retrying - the three-attempt retry never actually ran for the failure mode it was written for.
-
BaseTest cleared saved addresses between retry attempts but not saved cards. A leftover card replaces "Add card" with "Manage cards" on the Autofill screen, so a retry started on a different screen than the first attempt and failed on a missing "Add card".
The secure-your-cards prompt shown when opening Manage cards is a platform AlertDialog, so its "Later" button is matched by the framework res-id android:id/button2 verbatim (UIAUTOMATOR_WITH_RAW_RES_ID). An app-scoped strategy cannot resolve it - ESPRESSO_BY_ID looks the name up in the app's R class and throws IllegalArgumentException.
Validated on an API 37 emulator: CreditCardAutofillTest passes clean (no retry), and AddressAutofillTest still passes clean afterwards, covering the shared selectDropdownOption change.
Context: part of the ui/efficiency UI-test modernization. This is a faithful port of an existing legacy ui/ smoke test onto the ui/efficiency framework — same coverage and assertions, but far less per-test code via a shared page-object / selector / navigation layer, which bends the UI-test maintenance cost curve. Smoke-conversion campaign.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
First credit-card coverage on the framework, so it brings the missing pieces with it:
CreditCardTestData (expiry year relative to today, since the editor offers no past
years), credit-card selectors on SettingsAutofillSelectors, and
SettingsAutofillPage.fillAndSaveCreditCard mirroring fillAndSaveAddress.
Three harness gaps surfaced while validating on device:
- selectDropdownOption matched option text exactly, but the card expiry dropdowns
render options with surrounding text, so the month selection found nothing. It now
takes an opt-in substring mode, as the legacy robot does for those two dropdowns. - selectDropdownOption caught Exception around its retry, and Compose's waitUntil
raises ComposeTimeoutException, which extends Throwable — so a timeout escaped the
loop and the retry never ran for the case it was written for. - BaseTest cleared saved addresses between attempts but not saved cards. A leftover
card replaces "Add card" with "Manage cards", so a retry started on a different
screen than the first attempt.
The secure-your-cards prompt is a platform AlertDialog, so its "Later" button uses the
framework res-id verbatim; ESPRESSO_BY_ID resolves names against the app's R class and
cannot see it.
Updated•1 month ago
|
Description
•