Skip to content

Commit e8efd83

Browse files
committed
Update the code to utilize the instantiated fixture objects, for consistency
1 parent 1010145 commit e8efd83

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

l10n_CM/Unified/test_demo_ad_yellow_highlight_phone_email.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,31 @@ def test_case():
1111
return "2888570"
1212

1313

14-
def test_address_yellow_highlight_address_fields(driver: Firefox, region: str):
14+
def test_address_yellow_highlight_address_fields(
15+
driver: Firefox,
16+
region: str,
17+
address_autofill: AddressFill,
18+
util: Utilities,
19+
autofill_popup: AutofillPopup,
20+
):
1521
"""
1622
C2888570 - Verify the yellow highlight appears on autofilled fields for the email and phone fields.
1723
"""
1824

19-
# Instantiate objects
20-
address_autofill = AddressFill(driver)
21-
address_autofill_popup = AutofillPopup(driver)
22-
util = Utilities()
23-
2425
# Create fake data and fill it in
2526
address_autofill.open()
2627
address_autofill_data = util.fake_autofill_data(region)
2728
address_autofill.save_information_basic(address_autofill_data)
2829

2930
# Click the "Save" button
30-
address_autofill_popup.click_doorhanger_button("save")
31+
autofill_popup.click_doorhanger_button("save")
3132

3233
# Double click inside email field and select a saved address entry from the dropdown
3334
address_autofill.double_click("form-field", labels=["email"])
3435

3536
# Click on the first element from the autocomplete dropdown
36-
first_item = address_autofill_popup.get_nth_element(1)
37-
address_autofill_popup.click_on(first_item)
37+
first_item = autofill_popup.get_nth_element(1)
38+
autofill_popup.click_on(first_item)
3839

3940
# Verify the email and phone fields are highlighted
4041
address_autofill.verify_field_yellow_highlights(

0 commit comments

Comments
 (0)