Skip to content

Commit a04c5fb

Browse files
Hani YacoubHani Yacoub
authored andcommitted
changes
1 parent 5eae892 commit a04c5fb

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

l10n_CM/Unified/test_demo_ad_preview_name_org.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ def test_demo_ad_preview_name_org(
3535
]
3636

3737
for field in fields_to_test:
38-
address_autofill.verify_autofill_preview(field, address_autofill_data.name)
39-
address_autofill.verify_autofill_preview(field, address_autofill_data.organization)
38+
address_autofill.verify_autofill_preview(autofill_popup, field, address_autofill_data.name)
39+
address_autofill.verify_autofill_preview(autofill_popup, field, address_autofill_data.organization)

modules/page_object_autofill.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,14 @@ def autofill_and_verify(
590590
self.double_click("form-field", labels=[field_label])
591591
address_autofill_popup.click_clear_form_option()
592592

593-
def verify_autofill_preview(self, field_label: str, expected_value: str):
594-
"""Reusable method to verify autofill preview for a given field."""
593+
def verify_autofill_preview(self, autofill_popup: AutofillPopup, field_label: str, expected_value: str):
594+
"""
595+
Verifies that hovering over an autofill dropdown entry for a given field shows the expected value.
596+
"""
595597
self.double_click("form-field", labels=[field_label])
596-
first_item = self.get_nth_element(1)
597-
actual_value = self.hover(first_item).get_primary_value(first_item)
598+
first_item = autofill_popup.get_nth_element(1)
599+
actual_value = autofill_popup.hover(first_item).get_primary_value(first_item)
600+
598601
assert expected_value == actual_value, (
599602
f"Expected {expected_value}, but got {actual_value}"
600603
)

0 commit comments

Comments
 (0)