Skip to content

Commit ed839c5

Browse files
authored
Merge branch 'main' into as/yellow-hightlight-adrresses-fields
2 parents 88d2b83 + ee6b281 commit ed839c5

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import pytest
2+
from selenium.webdriver import Firefox
3+
4+
from modules.browser_object_autofill_popup import AutofillPopup
5+
from modules.page_object_autofill import AddressFill
6+
from modules.util import Utilities
7+
8+
9+
@pytest.fixture()
10+
def test_case():
11+
return "2888570"
12+
13+
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+
):
21+
"""
22+
C2888570 - Verify the yellow highlight appears on autofilled fields for the email and phone fields.
23+
"""
24+
25+
# Create fake data and fill it in
26+
address_autofill.open()
27+
address_autofill_data = util.fake_autofill_data(region)
28+
address_autofill.save_information_basic(address_autofill_data)
29+
30+
# Click the "Save" button
31+
autofill_popup.click_doorhanger_button("save")
32+
33+
# Double click inside email field and select a saved address entry from the dropdown
34+
address_autofill.double_click("form-field", labels=["email"])
35+
36+
# Click on the first element from the autocomplete dropdown
37+
first_item = autofill_popup.get_nth_element(1)
38+
autofill_popup.click_on(first_item)
39+
40+
# Verify the email and phone fields are highlighted
41+
address_autofill.verify_field_yellow_highlights(
42+
fields_to_test=["email", "tel"], expected_highlighted_fields=["email", "tel"]
43+
)

l10n_CM/region/Unified.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@
1515
"test_demo_cc_yellow_highlight.py",
1616
"test_demo_ad_yellow_highlight_name_org.py",
1717
"test_demo_ad_yellow_highlight_address.py"
18+
"test_demo_ad_yellow_highlight_phone_email.py"
19+
1820
]
1921
}

0 commit comments

Comments
 (0)