Skip to content

Commit 8596bb1

Browse files
authored
Merge branch 'main' into vs/CC-doorhanger-data-is-saved
2 parents d4d9c44 + a950d57 commit 8596bb1

File tree

5 files changed

+61
-5
lines changed

5 files changed

+61
-5
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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 "2888569"
12+
13+
14+
def test_demo_ad_autofill_phone_email(driver: Firefox, region: str):
15+
"""
16+
C2888569 - Verify Autofill functionality when selecting an entry from the dropdown for tele/email fields
17+
"""
18+
# Instantiate objects
19+
address_autofill = AddressFill(driver)
20+
address_autofill_popup = AutofillPopup(driver)
21+
util = Utilities()
22+
23+
# Create fake data and fill it in
24+
address_autofill.open()
25+
address_autofill_data = util.fake_autofill_data(region)
26+
address_autofill.save_information_basic(address_autofill_data)
27+
28+
# Click the "Save" button
29+
address_autofill_popup.click_doorhanger_button("save")
30+
31+
# Double inside phone field and select a saved address entry from the dropdown
32+
address_autofill.double_click("form-field", labels=["tel"])
33+
34+
# Click on the first element from the autocomplete dropdown
35+
first_item = address_autofill_popup.get_nth_element(1)
36+
address_autofill_popup.click_on(first_item)
37+
38+
# Verify autofill data
39+
address_autofill.verify_autofill_data(address_autofill_data, region, util)
40+
41+
# Double inside phone field and select clear form autofill
42+
address_autofill.double_click("form-field", labels=["tel"])
43+
address_autofill_popup.click_clear_form_option()
44+
45+
# Double inside email field and select a saved address entry from the dropdown
46+
address_autofill.double_click("form-field", labels=["email"])
47+
48+
# Click on the first element from the autocomplete dropdown
49+
first_item = address_autofill_popup.get_nth_element(1)
50+
address_autofill_popup.click_on(first_item)
51+
52+
# Verify autofill data
53+
address_autofill.verify_autofill_data(address_autofill_data, region, util)

l10n_CM/region/CA.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"test_demo_cc_dropdown-presence.py",
1111
"test_demo_cc_clear_form.py",
1212
"test_demo_cc_dropdown-presence.py",
13-
"test_demo_ad_autofill_name_org.py"
13+
"test_demo_ad_autofill_name_org.py",
14+
"test_demo_ad_autofill_phone_email.py"
1415
]
1516
}

l10n_CM/region/DE.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"test_demo_ad_address_data_captured_in_doorhanger_and_stored.py",
1111
"test_demo_ad_autofill_name_org.py",
1212
"test_demo_ad_address_data_captured_in_doorhanger_and_stored.py",
13-
"test_demo_cc_clear_form.py"
13+
"test_demo_cc_clear_form.py",
14+
"test_demo_ad_autofill_phone_email.py"
1415
]
1516
}

l10n_CM/region/FR.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"test_demo_ad_autofill_name_org.py",
1212
"test_demo_ad_email_phone_captured_in_doorhanger_and_stored.py",
1313
"test_demo_cc_dropdown-presence.py",
14-
"test_demo_cc_clear_form.py"
15-
14+
"test_demo_cc_clear_form.py",
15+
"test_demo_ad_autofill_phone_email.py"
1616
]
1717
}

l10n_CM/region/US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"test_demo_ad_autofill_name_org.py",
1212
"test_demo_ad_email_phone_captured_in_doorhanger_and_stored.py",
1313
"test_demo_cc_dropdown-presence.py",
14-
"test_demo_cc_clear_form.py"
14+
"test_demo_cc_clear_form.py",
15+
"test_demo_ad_autofill_phone_email.py"
1516
]
1617
}

0 commit comments

Comments
 (0)