Skip to content

Commit d1bb60d

Browse files
addressfill methods moved to autofill except one
1 parent 73f887f commit d1bb60d

16 files changed

+86
-197
lines changed

l10n_CM/Unified/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ def about_prefs(driver):
5858

5959

6060
@pytest.fixture()
61-
def credit_card_fill_obj(driver):
61+
def credit_card_autofill(driver):
6262
yield CreditCardFill(driver)

l10n_CM/Unified/test_demo_ad_3a_autofill_address_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ def test_demo_ad_autofill_address_fields(
3636

3737
# Loop through each field and perform the autofill test
3838
for field in fields_to_test:
39-
address_autofill.autofill_and_verify(field, address_autofill_data)
39+
address_autofill.clear_and_verify(field, address_autofill_data)

l10n_CM/Unified/test_demo_ad_3b_autofill_name_org_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ def test_demo_ad_autofill_name_org(
3030

3131
# Loop through each field and perform the autofill test
3232
for field in fields_to_test:
33-
address_autofill.autofill_and_verify(field, address_autofill_data)
33+
address_autofill.clear_and_verify(field, address_autofill_data)

l10n_CM/Unified/test_demo_ad_3c_autofill_phone_email_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ def test_demo_ad_autofill_phone_email(
3030

3131
# Loop through each field and perform the autofill test
3232
for field in fields_to_test:
33-
address_autofill.autofill_and_verify(field, address_autofill_data)
33+
address_autofill.clear_and_verify(field, address_autofill_data)

l10n_CM/Unified/test_demo_ad_5a_clear_name_org_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ def test_demo_ad_clear_name_org(
3030

3131
# Loop through each field and perform the autofill test
3232
for field in fields_to_test:
33-
address_autofill.clear_and_verify(field, region)
33+
address_autofill.clear_and_verify(field, region=region)

l10n_CM/Unified/test_demo_ad_5b_clear_address_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ def test_demo_ad_clear_address_fields(
3636

3737
# Loop through each field and perform the autofill test
3838
for field in fields_to_test:
39-
address_autofill.clear_and_verify(field, region)
39+
address_autofill.clear_and_verify(field, region=region)

l10n_CM/Unified/test_demo_ad_5c_clear_phone_email_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ def test_demo_ad_clear_tel_email(
3030

3131
# Loop through each field and perform the autofill test
3232
for field in fields_to_test:
33-
address_autofill.clear_and_verify(field, region)
33+
address_autofill.clear_and_verify(field, region=region)

l10n_CM/Unified/test_demo_cc_1_dropdown.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_dropdown_presence_credit_card(
1717
util: Utilities,
1818
autofill_popup: AutofillPopup,
1919
about_prefs_privacy: AboutPrefs,
20-
credit_card_fill_obj: CreditCardFill,
20+
credit_card_autofill: CreditCardFill,
2121
):
2222
"""
2323
C2886598 - Verify autofill dropdown is displayed only for the eligible fields after a credit card is saved
@@ -35,7 +35,7 @@ def test_dropdown_presence_credit_card(
3535
about_prefs_privacy.add_entry_to_saved_payments(credit_card_sample_data)
3636

3737
# Open credit card form page
38-
credit_card_fill_obj.open()
38+
credit_card_autofill.open()
3939

4040
# Verify autofill dropdown is displayed only for the eligible fields
41-
credit_card_fill_obj.verify_field_autofill_dropdown()
41+
credit_card_autofill.verify_field_autofill_dropdown()

l10n_CM/Unified/test_demo_cc_2_preview.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_cc_preview(
2222
region: str,
2323
about_prefs_privacy: AboutPrefs,
2424
autofill_popup: AutofillPopup,
25-
credit_card_fill_obj: CreditCardFill,
25+
credit_card_autofill: CreditCardFill,
2626
):
2727
"""
2828
C2886599 - Verify that hovering over field will preview all eligible fields (except for the CVV field)
@@ -40,14 +40,14 @@ def test_cc_preview(
4040
about_prefs_privacy.add_entry_to_saved_payments(credit_card_sample_data)
4141

4242
# Open credit card form page
43-
credit_card_fill_obj.open()
43+
credit_card_autofill.open()
4444

4545
# Hover over each field and check data preview
4646
fields_to_test = ["cc-name", "cc-number", "cc-exp-month", "cc-exp-year"]
4747
for field in fields_to_test:
48-
credit_card_fill_obj.check_autofill_preview_for_field(
48+
credit_card_autofill.check_autofill_preview_for_field(
4949
field, credit_card_sample_data
5050
)
5151

52-
credit_card_fill_obj.click_on("form-field", labels=["cc-csc"])
52+
credit_card_autofill.click_on("form-field", labels=["cc-csc"])
5353
autofill_popup.ensure_autofill_dropdown_not_visible()

l10n_CM/Unified/test_demo_cc_3_autofill.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,28 @@ def test_cc_autofill_from_dropdown(
1515
driver: Firefox,
1616
util: Utilities,
1717
autofill_popup: AutofillPopup,
18-
credit_card_fill_obj: CreditCardFill,
18+
credit_card_autofill: CreditCardFill,
19+
region: str,
1920
):
2021
"""
2122
Verify that saved credit card information is autofilled correctly when selected from the dropdown,
2223
except for the CVV field.
24+
Arguments:
25+
credit_card_autofill: CreditCardFill instance
26+
autofill_popup: AutofillPopup instance
27+
util: Utilities instance
28+
region: region being tested
2329
"""
2430

2531
# Open credit card form page
26-
credit_card_fill_obj.open()
32+
credit_card_autofill.open()
2733

2834
# Create and save fake credit card data
29-
credit_card_data = credit_card_fill_obj.fill_and_save()
35+
credit_card_data = credit_card_autofill.fill_and_save(region)
3036

3137
# Autocomplete and clear all fields
32-
credit_card_fill_obj.autofill_and_clear_all_fields(credit_card_data)
38+
credit_card_autofill.clear_and_verify_all_fields(credit_card_data, region)
3339

3440
# Step 5: Click the csc field (cc-csc), ensure autofill popup is not present
35-
credit_card_fill_obj.click_on("form-field", labels=["cc-csc"]) # Use single click
41+
credit_card_autofill.click_on("form-field", labels=["cc-csc"]) # Use single click
3642
autofill_popup.ensure_autofill_dropdown_not_visible()

0 commit comments

Comments
 (0)