Skip to content

Commit 34fbcbd

Browse files
further test optimizations
1 parent d12e454 commit 34fbcbd

36 files changed

+1030
-1142
lines changed

SELECTOR_INFO.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,19 @@ Path to .json: modules/data/about_prefs.components.json
544544
```
545545
```
546546
Selector Name: cc-saved-options
547-
Selector Data: "option[data-l10n-id='credit-card-label-number-name-expiration-2']"
547+
Selector Data: "credit-cards"
548548
Description: The "Add card" modal, containing 4 fields
549549
Location: Inside the "Add card" form in the Saved payment methods section on the about:preferences#privacy page
550550
Path to .json: modules/data/about_prefs.components.json
551551
```
552552
```
553+
Selector Name: address-saved-options
554+
Selector Data: "addresses"
555+
Description: gets the selector element for the saved addresses options
556+
Location: Inside the Saved addresses methods section on the about:preferences#privacy page
557+
Path to .json: modules/data/about_prefs.components.json
558+
```
559+
```
553560
Selector Name: panel-popup-button
554561
Selector Data: "button[data-l10n-id='{name}']"
555562
Description: Element for a button by label
@@ -1453,9 +1460,9 @@ Path to .json: modules/data/autofill_popup.components.json
14531460
```
14541461
```
14551462
Selector Name: cc-saved-options
1456-
Selector Data: "option[data-l10n-id='credit-card-label-number-name-expiration-2']"
1457-
Description: The actually "Add card" modal, containing 4 fields
1458-
Location: Inside the "Add card" form in the Saved payment methods section on the about:preferences#privacy page
1463+
Selector Data: "credit-cards"
1464+
Description: gets the selector element for the saved cc options
1465+
Location: Inside the Saved payment methods section on the about:preferences#privacy page
14591466
Path to .json: modules/data/autofill_popup.components.json
14601467
```
14611468
```

l10n_CM/Unified/test_demo_ad_verify_new_address_added.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ def test_verify_new_address_is_added(
3131
# generate fake data for region
3232
address_autofill_data = util.fake_autofill_data(region)
3333

34-
# open saved addresses and add entry
34+
# open saved addresses
3535
about_prefs_privacy.open()
36-
about_prefs_privacy.get_saved_addresses_popup().click()
36+
about_prefs_privacy.open_and_switch_to_saved_addresses_popup()
37+
# add new entry to saved addresses
38+
about_prefs_privacy.click_add_on_dialog_element()
3739
about_prefs_privacy.add_entry_to_saved_addresses(address_autofill_data)
3840
about_prefs_privacy.switch_to_saved_addresses_popup_iframe()
3941

l10n_CM/Unified/test_demo_cc_add_new_credit_card.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_create_new_cc_profile(
3232

3333
# Add a new CC profile
3434
about_prefs.click_on("panel-popup-button", labels=["autofill-manage-add-button"])
35-
about_prefs_privacy.fill_cc_panel_information(credit_card_sample_data)
35+
about_prefs_privacy.fill_and_save_cc_panel_information(credit_card_sample_data)
3636

3737
# Get the saved CC data
3838
cc_profiles = about_prefs.get_all_saved_cc_profiles()

l10n_CM/Unified/test_demo_cc_autofill_from_dropdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_cc_autofill_from_dropdown(
2727

2828
# Create and save fake credit card data
2929
credit_card_data = util.fake_credit_card_data()
30-
credit_card_fill_obj.fill_credit_card_info(credit_card_data)
30+
credit_card_fill_obj.fill_and_submit_credit_card_info(credit_card_data)
3131
autofill_popup.click_doorhanger_button("save")
3232

3333
# Autocomplete and clear all fields

l10n_CM/Unified/test_demo_cc_clear_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_cc_clear_form(
3131

3232
credit_card_sample_data = util.fake_credit_card_data(region)
3333
about_prefs.click_on("panel-popup-button", labels=["autofill-manage-add-button"])
34-
about_prefs_privacy.fill_cc_panel_information(credit_card_sample_data)
34+
about_prefs_privacy.fill_and_save_cc_panel_information(credit_card_sample_data)
3535

3636
# Open credit card form page, clear form and verify all fields are empty
3737
credit_card_fill_obj.open()

l10n_CM/Unified/test_demo_cc_doorhanger_data_is_stored_in_about_prefs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_demo_cc_data_captured_in_doorhanger_and_stored(
2828

2929
# Fill data
3030
credit_card_sample_data = util.fake_credit_card_data(region)
31-
credit_card_fill_obj.fill_credit_card_info(credit_card_sample_data)
31+
credit_card_fill_obj.fill_and_submit_credit_card_info(credit_card_sample_data)
3232

3333
# The "Save credit card?" doorhanger is displayed
3434
assert autofill_popup.element_visible("doorhanger-save-button"), (

l10n_CM/Unified/test_demo_cc_doorhanger_shown_on_valid_credit_card_submission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_cc_check_door_hanger_is_displayed(
2626

2727
# Fill data
2828
credit_card_sample_data = util.fake_credit_card_data(region)
29-
credit_card_fill_obj.fill_credit_card_info(credit_card_sample_data)
29+
credit_card_fill_obj.fill_and_submit_credit_card_info(credit_card_sample_data)
3030

3131
# Check if an element from the door hanger is visible
3232
autofill_popup.element_visible("doorhanger-save-button")

l10n_CM/Unified/test_demo_cc_dropdown_presence.py

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

3131
credit_card_sample_data = util.fake_credit_card_data(region)
3232
about_prefs.click_on("panel-popup-button", labels=["autofill-manage-add-button"])
33-
about_prefs_privacy.fill_cc_panel_information(credit_card_sample_data)
33+
about_prefs_privacy.fill_and_save_cc_panel_information(credit_card_sample_data)
3434

3535
# Open credit card form page
3636
credit_card_fill_obj.open()

l10n_CM/Unified/test_demo_cc_hover_verify_cc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_cc_preview(
3939
about_prefs_privacy.click_on(
4040
"panel-popup-button", labels=["autofill-manage-add-button"]
4141
)
42-
about_prefs_privacy.fill_cc_panel_information(credit_card_sample_data)
42+
about_prefs_privacy.fill_and_save_cc_panel_information(credit_card_sample_data)
4343

4444
# Open the credit card fill form
4545
credit_card_fill_obj.open()

l10n_CM/Unified/test_demo_cc_yellow_highlight.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_cc_yellow_highlight(
2929
about_prefs_privacy.open_and_switch_to_saved_payments_popup()
3030
credit_card_sample_data = util.fake_credit_card_data(region)
3131
about_prefs.click_on("panel-popup-button", labels=["autofill-manage-add-button"])
32-
about_prefs.fill_cc_panel_information(credit_card_sample_data)
32+
about_prefs.fill_and_save_cc_panel_information(credit_card_sample_data)
3333

3434
# Open the credit card fill form and trigger the autofill option
3535
credit_card_fill_obj.open()

0 commit comments

Comments
 (0)