Skip to content

Commit 0267e13

Browse files
fix merge issues
1 parent 4ce2a84 commit 0267e13

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22
from selenium.webdriver import Firefox
33

4+
from l10n_CM.Unified.conftest import autofill_popup
45
from modules.browser_object_autofill_popup import AutofillPopup
56
from modules.page_object_autofill import AddressFill
67
from modules.util import Utilities
@@ -11,43 +12,44 @@ def test_case():
1112
return "2888558"
1213

1314

14-
def test_demo_ad_autofill_name_org(driver: Firefox, region: str):
15+
def test_demo_ad_autofill_name_org(
16+
driver: Firefox,
17+
region: str,
18+
address_autofill: AddressFill,
19+
autofill_popup: AutofillPopup,
20+
util: Utilities,
21+
):
1522
"""
1623
C2888558 - Verify Autofill functionality when selecting an entry from the dropdown for name/org fields
1724
"""
18-
# Instantiate objects
19-
address_autofill = AddressFill(driver)
20-
address_autofill_popup = AutofillPopup(driver)
21-
util = Utilities()
22-
2325
# Create fake data and fill it in
2426
address_autofill.open()
2527
address_autofill_data = util.fake_autofill_data(region)
2628
address_autofill.save_information_basic(address_autofill_data)
2729

2830
# Click the "Save" button
29-
address_autofill_popup.click_doorhanger_button("save")
31+
autofill_popup.click_doorhanger_button("save")
3032

3133
# Double inside Name field and select a saved address entry from the dropdown
3234
address_autofill.double_click("form-field", labels=["name"])
3335

3436
# 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+
first_item = autofill_popup.get_nth_element(1)
38+
autofill_popup.click_on(first_item)
3739

3840
# Verify autofill data
3941
address_autofill.verify_autofill_data(address_autofill_data, region, util)
4042

4143
# Double inside Name field and select clear form autofill
4244
address_autofill.double_click("form-field", labels=["name"])
43-
address_autofill_popup.click_clear_form_option()
45+
autofill_popup.click_clear_form_option()
4446

4547
# Double inside Organization field and select a saved address entry from the dropdown
4648
address_autofill.double_click("form-field", labels=["organization"])
4749

4850
# 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+
first_item = autofill_popup.get_nth_element(1)
52+
autofill_popup.click_on(first_item)
5153

5254
# Verify autofill data
5355
address_autofill.verify_autofill_data(address_autofill_data, region, util)

l10n_CM/Unified/test_demo_ad_autofill_phone_email.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,45 @@ def test_case():
1111
return "2888569"
1212

1313

14-
def test_demo_ad_autofill_phone_email(driver: Firefox, region: str):
14+
def test_demo_ad_autofill_phone_email(
15+
driver: Firefox,
16+
region: str,
17+
address_autofill: AddressFill,
18+
autofill_popup: AutofillPopup,
19+
util: Utilities,
20+
):
1521
"""
1622
C2888569 - Verify Autofill functionality when selecting an entry from the dropdown for tele/email fields
1723
"""
18-
# Instantiate objects
19-
address_autofill = AddressFill(driver)
20-
address_autofill_popup = AutofillPopup(driver)
21-
util = Utilities()
2224

2325
# Create fake data and fill it in
2426
address_autofill.open()
2527
address_autofill_data = util.fake_autofill_data(region)
2628
address_autofill.save_information_basic(address_autofill_data)
2729

2830
# Click the "Save" button
29-
address_autofill_popup.click_doorhanger_button("save")
31+
autofill_popup.click_doorhanger_button("save")
3032

3133
# Double inside phone field and select a saved address entry from the dropdown
3234
address_autofill.double_click("form-field", labels=["tel"])
3335

3436
# 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+
first_item = autofill_popup.get_nth_element(1)
38+
autofill_popup.click_on(first_item)
3739

3840
# Verify autofill data
3941
address_autofill.verify_autofill_data(address_autofill_data, region, util)
4042

4143
# Double inside phone field and select clear form autofill
4244
address_autofill.double_click("form-field", labels=["tel"])
43-
address_autofill_popup.click_clear_form_option()
45+
autofill_popup.click_clear_form_option()
4446

4547
# Double inside email field and select a saved address entry from the dropdown
4648
address_autofill.double_click("form-field", labels=["email"])
4749

4850
# 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+
first_item = autofill_popup.get_nth_element(1)
52+
autofill_popup.click_on(first_item)
5153

5254
# Verify autofill data
5355
address_autofill.verify_autofill_data(address_autofill_data, region, util)

0 commit comments

Comments
 (0)