Skip to content

Commit 95691cd

Browse files
authored
Merge pull request #492 from mozilla/Hani/clear_from_tel_email
Hani/l10n ad - clear from tel email
2 parents 5c1aeca + 7b624c1 commit 95691cd

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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 "2888571"
12+
13+
14+
def test_demo_ad_clear_tel_email(
15+
driver: Firefox,
16+
region: str,
17+
address_autofill: AddressFill,
18+
util: Utilities,
19+
autofill_popup: AutofillPopup
20+
):
21+
"""
22+
C2888571 - Verify clear functionality after selecting an entry from tele/email 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+
# List of field labels to be autofilled and verified
34+
fields_to_test = [
35+
"email",
36+
"tel"
37+
]
38+
39+
# Loop through each field and perform the autofill test
40+
for field in fields_to_test:
41+
address_autofill.clear_and_verify(autofill_popup, field, address_autofill_data)

l10n_CM/region/Unified.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"test_demo_cc_clear_form.py",
1212
"test_demo_cc_doorhanger_data_is_stored_in_about_prefs.py",
1313
"test_demo_cc_doorhanger_shown_on_valid_credit_card_submission.py",
14-
"test_demo_cc_dropdown-presence.py",
14+
"test_demo_cc_dropdown_presence.py",
1515
"test_demo_cc_yellow_highlight.py",
1616
"test_demo_ad_yellow_highlight.py",
1717
"test_demo_ad_yellow_highlight_phone_email.py",
@@ -22,6 +22,7 @@
2222
"test_demo_ad_clear_name_org.py",
2323
"test_demo_ad_yellow_highlight_phone_email.py",
2424
"test_demo_ad_clear_name_org.py",
25-
"test_demo_ad_clear_address_fields.py"
25+
"test_demo_ad_clear_address_fields.py",
26+
"test_demo_ad_clear_tel_email.py"
2627
]
2728
}

0 commit comments

Comments
 (0)