Skip to content

Commit 89256b5

Browse files
authored
Merge pull request #503 from mozilla/Hani/modify_test_demo_ad_autofill_email_tel
Hani/ Modify test demo ad autofill email tel
2 parents e070dfa + 6b71f18 commit 89256b5

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

l10n_CM/Unified/test_demo_ad_autofill_phone_email.py

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,13 @@ def test_demo_ad_autofill_phone_email(
3030
# Click the "Save" button
3131
autofill_popup.click_doorhanger_button("save")
3232

33-
# Double inside phone field and select a saved address entry from the dropdown
34-
address_autofill.double_click("form-field", labels=["tel"])
35-
36-
# Click on the first element from the autocomplete dropdown
37-
first_item = autofill_popup.get_nth_element(1)
38-
autofill_popup.click_on(first_item)
39-
40-
# Verify autofill data
41-
address_autofill.verify_autofill_data(address_autofill_data, region, util)
42-
43-
# Double inside phone field and select clear form autofill
44-
address_autofill.double_click("form-field", labels=["tel"])
45-
autofill_popup.click_clear_form_option()
46-
47-
# Double inside email field and select a saved address entry from the dropdown
48-
address_autofill.double_click("form-field", labels=["email"])
49-
50-
# Click on the first element from the autocomplete dropdown
51-
first_item = autofill_popup.get_nth_element(1)
52-
autofill_popup.click_on(first_item)
53-
54-
# Verify autofill data
55-
address_autofill.verify_autofill_data(address_autofill_data, region, util)
33+
# List of field labels to be autofilled and verified
34+
fields_to_test = [
35+
"email",
36+
"tel"
37+
]
38+
39+
# Loop through each field and perform the autofill test
40+
for field in fields_to_test:
41+
address_autofill.autofill_and_verify(autofill_popup, field,
42+
address_autofill_data, util)

0 commit comments

Comments
 (0)