Skip to content

Commit 88d2b83

Browse files
committed
Update the code to utilize the instantiated fixture objects
1 parent ee99f0d commit 88d2b83

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

l10n_CM/Unified/test_demo_ad_yellow_highlight_address.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ def test_case():
1111
return "2888564"
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
C2888564 - Verify the yellow highlight appears on autofilled fields for the address fields.
1723
"""
1824

1925
# Instantiate objects
20-
address_autofill = AddressFill(driver)
2126
address_autofill_popup = AutofillPopup(driver)
22-
util = Utilities()
2327

2428
# Create fake data and fill it in
2529
address_autofill.open()

l10n_CM/Unified/test_demo_ad_yellow_highlight_name_org.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,30 @@ def test_case():
1212

1313

1414
def test_address_yellow_highlight_on_name_organization_fields(
15-
driver: Firefox, region: str
15+
driver: Firefox,
16+
region: str,
17+
address_autofill: AddressFill,
18+
util: Utilities,
19+
autofill_popup: AutofillPopup,
1620
):
1721
"""
1822
C2888559 - Verify the yellow highlight appears on autofilled fields for name and organization.
1923
"""
2024

21-
# Instantiate objects
22-
address_autofill = AddressFill(driver)
23-
address_autofill_popup = AutofillPopup(driver)
24-
util = Utilities()
25-
2625
# Create fake data and fill it in
2726
address_autofill.open()
2827
address_autofill_data = util.fake_autofill_data(region)
2928
address_autofill.save_information_basic(address_autofill_data)
3029

3130
# Click the "Save" button
32-
address_autofill_popup.click_doorhanger_button("save")
31+
autofill_popup.click_doorhanger_button("save")
3332

3433
# Double click inside name field and select a saved address entry from the dropdown
3534
address_autofill.double_click("form-field", labels=["name"])
3635

3736
# Click on the first element from the autocomplete dropdown
38-
first_item = address_autofill_popup.get_nth_element(1)
39-
address_autofill_popup.click_on(first_item)
37+
first_item = autofill_popup.get_nth_element(1)
38+
autofill_popup.click_on(first_item)
4039

4140
# Verify the name and organization fields are highlighted
4241
address_autofill.verify_field_yellow_highlights(

0 commit comments

Comments
 (0)