Skip to content

Commit e38043c

Browse files
committed
Small corrections
1 parent 3b441f3 commit e38043c

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

l10n_CM/Unified/test_demo_ad_yellow_highlight.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88

99
@pytest.fixture()
1010
def test_case():
11-
return "2888569"
11+
return "2888559"
1212

1313

14-
def test_address_yellow_highlight_on_name_org_fields(driver: Firefox, region: str):
14+
def test_address_yellow_highlight_on_name_organization_fields(
15+
driver: Firefox, region: str
16+
):
1517
"""
16-
C2888569 - Verify Autofill functionality when selecting an entry from the dropdown for tele/email fields
18+
C2888559 - Verify the yellow highlight appears on autofilled fields for name and organization.
1719
"""
20+
1821
# Instantiate objects
1922
address_autofill = AddressFill(driver)
2023
address_autofill_popup = AutofillPopup(driver)
@@ -28,15 +31,15 @@ def test_address_yellow_highlight_on_name_org_fields(driver: Firefox, region: st
2831
# Click the "Save" button
2932
address_autofill_popup.click_doorhanger_button("save")
3033

31-
# Double inside phone field and select a saved address entry from the dropdown
34+
# Double click inside phone field and select a saved address entry from the dropdown
3235
address_autofill.double_click("form-field", labels=["name"])
3336

3437
# Click on the first element from the autocomplete dropdown
3538
first_item = address_autofill_popup.get_nth_element(1)
3639
address_autofill_popup.click_on(first_item)
3740

38-
# Verify highlighted fields
41+
# Verify the name and organization fields are highlighted
3942
address_autofill.verify_field_yellow_highlights(
40-
fields_to_test=["name", "organization"], # Only test name & org
43+
fields_to_test=["name", "organization"],
4144
expected_highlighted_fields=["name", "organization"],
4245
)

modules/page_object_autofill.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,19 @@ def click_form_button(self, field_name):
3939
"""Clicks submit on the form"""
4040
self.click_on("submit-button", labels=[field_name])
4141

42-
def verify_field_highlights_in_list(
42+
def verify_field_highlight(
4343
self,
4444
fields_to_test: List[str],
4545
expected_highlighted_fields: Optional[List[str]] = None,
4646
extra_fields: Optional[List[str]] = None,
4747
):
4848
"""
49-
A common method to check which fields have the "yellow highlight."
49+
A common method to check which fields have the "yellow highlight". This is used in both CC and Address pages.
5050
- fields_to_test: The primary list of fields for this page (cc fields, address fields).
5151
- expected_highlighted_fields: Which ones are expected to be highlighted. Defaults to all in `fields_to_test`.
5252
- extra_fields: If some pages have extra fields to test (e.g. 'cc-csc'), pass them here.
5353
"""
54+
5455
if expected_highlighted_fields is None:
5556
# By default, everything in fields_to_test is expected to be highlighted
5657
expected_highlighted_fields = fields_to_test[:]
@@ -388,7 +389,7 @@ def verify_field_yellow_highlights(self, expected_highlighted_fields=None):
388389
We also want to include the "cc-csc" field in the test, so we
389390
pass it via 'extra_fields'.
390391
"""
391-
return self.verify_field_highlights_in_list(
392+
return self.verify_field_highlight(
392393
fields_to_test=self.fields,
393394
expected_highlighted_fields=expected_highlighted_fields,
394395
extra_fields=["cc-csc"],
@@ -563,7 +564,7 @@ def verify_field_yellow_highlights(
563564
if fields_to_test is None:
564565
fields_to_test = self.fields # By default, test all address fields
565566

566-
return self.verify_field_highlights_in_list(
567+
return self.verify_field_highlight(
567568
fields_to_test=fields_to_test,
568569
expected_highlighted_fields=expected_highlighted_fields,
569570
)

0 commit comments

Comments
 (0)