Skip to content

Vs/refactoring2 #563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
93d8297
vs/Part1-Refactoring
vsangereanMOZ Apr 8, 2025
4b1d2bd
vs/Refactoring 2
vsangereanMOZ Apr 30, 2025
1707ddd
Mark tests unstable
Tracy-Walker Apr 29, 2025
30cabe2
Fix Boookmarks tests
Tracy-Walker Apr 29, 2025
5aa69a9
Fix additional test
Tracy-Walker Apr 29, 2025
40a10a8
inital progress on poc
philimon-reset Apr 14, 2025
fcdd60f
continued efforts with live site POC
philimon-reset Apr 15, 2025
be7f2c8
broken change to ignore doorhanger
philimon-reset Apr 17, 2025
40cbb10
base structure for live testing set for walmart address page
philimon-reset Apr 17, 2025
70c03a4
amazon address field working
philimon-reset Apr 23, 2025
8c5cf0a
proof of concept complete
philimon-reset Apr 23, 2025
c7d461f
fix test create address profile
philimon-reset Apr 23, 2025
2bbd201
unfortunate mistake
philimon-reset Apr 23, 2025
ff0a4e5
live site access changed(only relevant for my local testing)
philimon-reset Apr 24, 2025
d13033a
further work to support DE and FR regions and clean up
philimon-reset Apr 24, 2025
1f5c922
webserver implemented
philimon-reset Apr 29, 2025
5be8bdd
amazon_ad minify
philimon-reset Apr 29, 2025
aa93def
region divide added
philimon-reset Apr 29, 2025
4b9c4be
canada address page for amazon added
philimon-reset Apr 29, 2025
b88e7e1
fix conftest
philimon-reset Apr 29, 2025
39e919d
remove loggin
philimon-reset Apr 29, 2025
fb7cd7b
l10n clean up
philimon-reset Apr 29, 2025
0437959
extra field for credit card base class.
philimon-reset Apr 29, 2025
96b6c45
revert change
philimon-reset Apr 29, 2025
4806fce
remove unnessary files
philimon-reset Apr 29, 2025
0a9d0c5
added amazon canada fix
philimon-reset Apr 30, 2025
cb5f594
Update null automation status to Untriaged
soncuteanca May 2, 2025
046a888
Merge branch 'main' into vs/Refactoring2
vsangereanMOZ May 5, 2025
60ba145
Merge branch 'main' into vs/Refactoring2
vsangereanMOZ May 5, 2025
1c40c43
Add files that were reverted.
vsangereanMOZ May 5, 2025
f04c64b
Merge remote-tracking branch 'origin/vs/Refactoring2' into vs/Refacto…
vsangereanMOZ May 5, 2025
3f62b33
Mark 2 tests as unstable.
vsangereanMOZ May 5, 2025
fbb6759
Merge remote-tracking branch 'origin/vs/Refactoring2' into vs/Refacto…
vsangereanMOZ May 5, 2025
139705b
Merge branch 'main' into vs/Refactoring2
vsangereanMOZ May 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
base structure for live testing set for walmart address page
  • Loading branch information
philimon-reset authored and vsangereanMOZ committed May 5, 2025
commit 40cbb10ea7c4e133574081da69935173196fecbe
4 changes: 2 additions & 2 deletions l10n_CM/Unified/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def prefs_list(add_to_prefs_list: List[tuple[str, str | bool]], region: str):

@pytest.fixture()
def site_data():
live_site = os.environ.get("FX_SITE", None)
# live_site = os.environ.get("FX_SITE", None)
# un comment to test a live site form
# live_site = "walmart/walmart_ad"
live_site = "walmart/walmart_ad"
if live_site:
path_to_site = parent_dir + "/constants/"
with open(path_to_site + live_site + ".json", "r") as fp:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_dropdown_presence_name_organization(
address_autofill.open()

# Verify that the name and organization fields have the autofill dropdown present
fields_to_test = ["name", "organization"]
fields_to_test = ["name", "given_name", "family_name", "organization"]

address_autofill.verify_field_autofill_dropdown(
region=region, fields_to_test=fields_to_test
Expand Down
2 changes: 1 addition & 1 deletion l10n_CM/Unified/test_demo_ad_2a_preview_name_org_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ def test_demo_ad_hover_name_org(
autofill_data = fill_and_save_address

# Hover over each field and check data preview
fields_to_test = ["name", "organization"]
fields_to_test = ["name", "given_name", "family_name", "organization"]
for field in fields_to_test:
address_autofill.check_autofill_preview_for_field(field, autofill_data, region)
8 changes: 6 additions & 2 deletions l10n_CM/Unified/test_demo_ad_2c_preview_phone_email_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.page_object_prefs import AboutPrefs
from modules.util import Utilities
Expand All @@ -19,10 +20,13 @@ def test_hover_email_and_phone_autofill_preview(
address_autofill: AddressFill,
autofill_popup: AutofillPopup,
util: Utilities,
fill_and_save_address: AutofillAddressBase,
):
# Create fake data and fill it in
# Create fake data
address_autofill.open()
autofill_data = address_autofill.fill_and_save(region)

# created fake data
autofill_data = fill_and_save_address

# Hover over each field and check data preview
fields_to_test = ["email", "telephone"]
Expand Down
10 changes: 7 additions & 3 deletions l10n_CM/Unified/test_demo_ad_3a_autofill_address_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.util import Utilities

Expand All @@ -17,13 +18,16 @@ def test_demo_ad_autofill_address_fields(
address_autofill: AddressFill,
util: Utilities,
autofill_popup: AutofillPopup,
fill_and_save_address: AutofillAddressBase,
):
"""
C2888563 - Verify Autofill functionality when selecting an entry from the dropdown for address fields
"""
# Create fake data and fill it in
# Create fake data
address_autofill.open()
address_autofill_data = address_autofill.fill_and_save(region)

# created fake data
autofill_data = fill_and_save_address

# List of field labels to be autofilled and verified
fields_to_test = [
Expand All @@ -35,4 +39,4 @@ def test_demo_ad_autofill_address_fields(
]
# Loop through each field and perform the autofill test
for field in fields_to_test:
address_autofill.clear_and_verify(field, address_autofill_data, region=region)
address_autofill.clear_and_verify(field, autofill_data, region=region)
12 changes: 8 additions & 4 deletions l10n_CM/Unified/test_demo_ad_3b_autofill_name_org_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.util import Utilities

Expand All @@ -17,17 +18,20 @@ def test_demo_ad_autofill_name_org(
address_autofill: AddressFill,
autofill_popup: AutofillPopup,
util: Utilities,
fill_and_save_address: AutofillAddressBase,
):
"""
C2888558 - Verify Autofill functionality when selecting an entry from the dropdown for name/org fields
"""
# Create fake data and fill it in
# Create fake data
address_autofill.open()
address_autofill_data = address_autofill.fill_and_save(region)

# created fake data
autofill_data = fill_and_save_address

# List of field labels to be autofilled and verified
fields_to_test = ["name", "organization"]
fields_to_test = ["name", "given_name", "family_name", "organization"]

# Loop through each field and perform the autofill test
for field in fields_to_test:
address_autofill.clear_and_verify(field, address_autofill_data, region=region)
address_autofill.clear_and_verify(field, autofill_data, region=region)
10 changes: 7 additions & 3 deletions l10n_CM/Unified/test_demo_ad_3c_autofill_phone_email_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.util import Utilities

Expand All @@ -17,17 +18,20 @@ def test_demo_ad_autofill_phone_email(
address_autofill: AddressFill,
autofill_popup: AutofillPopup,
util: Utilities,
fill_and_save_address: AutofillAddressBase,
):
"""
C2888569 - Verify Autofill functionality when selecting an entry from the dropdown for tele/email fields
"""
# Create fake data and fill it in
# Create fake data
address_autofill.open()
address_autofill_data = address_autofill.fill_and_save(region)

# created fake data
autofill_data = fill_and_save_address

# List of field labels to be autofilled and verified
fields_to_test = ["email", "telephone"]

# Loop through each field and perform the autofill test
for field in fields_to_test:
address_autofill.clear_and_verify(field, address_autofill_data, region=region)
address_autofill.clear_and_verify(field, autofill_data, region=region)
7 changes: 5 additions & 2 deletions l10n_CM/Unified/test_demo_ad_4a_highlight_name_org_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.util import Utilities

Expand All @@ -17,14 +18,16 @@ def test_address_yellow_highlight_on_name_organization_fields(
address_autofill: AddressFill,
util: Utilities,
autofill_popup: AutofillPopup,
fill_and_save_address: AutofillAddressBase,
):
"""
C2888559 - Verify the yellow highlight appears on autofilled fields for name and organization.
"""
if address_autofill.is_field_present("name"):
if address_autofill.is_field_present("name") or address_autofill.is_field_present(
"given_name"
):
# Create fake data and fill it in
address_autofill.open()
address_autofill.fill_and_save(region)

# Double click inside name field and select a saved address entry from the dropdown
address_autofill.click_form_field("name")
Expand Down
3 changes: 2 additions & 1 deletion l10n_CM/Unified/test_demo_ad_4b_highlight_address_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.util import Utilities

Expand All @@ -17,14 +18,14 @@ def test_address_yellow_highlight_address_fields(
address_autofill: AddressFill,
util: Utilities,
autofill_popup: AutofillPopup,
fill_and_save_address: AutofillAddressBase,
):
"""
C2888564 - Verify the yellow highlight appears on autofilled fields for the address fields.
"""
if address_autofill.is_field_present("street_address"):
# Create fake data and fill it in
address_autofill.open()
address_autofill.fill_and_save(region)

# Double click inside name field and select a saved address entry from the dropdown
address_autofill.click_form_field("street_address")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.util import Utilities

Expand All @@ -17,14 +18,14 @@ def test_address_yellow_highlight_address_fields(
address_autofill: AddressFill,
util: Utilities,
autofill_popup: AutofillPopup,
fill_and_save_address: AutofillAddressBase,
):
"""
C2888570 - Verify the yellow highlight appears on autofilled fields for the email and phone fields.
"""
if address_autofill.is_field_present("email"):
# Create fake data and fill it in
address_autofill.open()
address_autofill.fill_and_save(region)

# Double click inside name field and select a saved address entry from the dropdown
address_autofill.click_form_field("email")
Expand Down
5 changes: 3 additions & 2 deletions l10n_CM/Unified/test_demo_ad_5a_clear_name_org_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.util import Utilities

Expand All @@ -17,16 +18,16 @@ def test_demo_ad_clear_name_org(
address_autofill: AddressFill,
util: Utilities,
autofill_popup: AutofillPopup,
fill_and_save_address: AutofillAddressBase,
):
"""
C2888560 - Verify clear functionality after selecting an entry from name/org fields
"""
# Create fake data and fill it in
address_autofill.open()
address_autofill.fill_and_save(region)

# List of field labels to be autofilled and verified
fields_to_test = ["name", "organization"]
fields_to_test = ["name", "given_name", "family_name", "organization"]

# Loop through each field and perform the autofill test
for field in fields_to_test:
Expand Down
3 changes: 2 additions & 1 deletion l10n_CM/Unified/test_demo_ad_5b_clear_address_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.util import Utilities

Expand All @@ -17,13 +18,13 @@ def test_demo_ad_clear_address_fields(
address_autofill: AddressFill,
util: Utilities,
autofill_popup: AutofillPopup,
fill_and_save_address: AutofillAddressBase,
):
"""
C2888565 - Verify clear functionality after selecting an entry from address fields
"""
# Create fake data and fill it in
address_autofill.open()
address_autofill.fill_and_save(region)

# List of field labels to be autofilled and verified
fields_to_test = [
Expand Down
3 changes: 2 additions & 1 deletion l10n_CM/Unified/test_demo_ad_5c_clear_phone_email_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from selenium.webdriver import Firefox

from modules.browser_object_autofill_popup import AutofillPopup
from modules.classes.autofill_base import AutofillAddressBase
from modules.page_object_autofill import AddressFill
from modules.util import Utilities

Expand All @@ -17,13 +18,13 @@ def test_demo_ad_clear_tel_email(
address_autofill: AddressFill,
util: Utilities,
autofill_popup: AutofillPopup,
fill_and_save_address: AutofillAddressBase,
):
"""
C2888571 - Verify clear functionality after selecting an entry from tele/email fields
"""
# Create fake data and fill it in
address_autofill.open()
address_autofill.fill_and_save(region)

# List of field labels to be autofilled and verified
fields_to_test = ["email", "telephone"]
Expand Down
14 changes: 9 additions & 5 deletions l10n_CM/Unified/test_demo_ad_6_capture_doorhanger_appearance.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ def test_address_doorhanger_displayed_after_entering_valid_address(
address_autofill: AddressFill,
util: Utilities,
autofill_popup: AutofillPopup,
url_template: str,
):
"""
C2886581 - Verify the Capture Door hanger is displayed after entering valid Address data
"""
# Create fake data and fill it in
address_autofill.open()
address_autofill.fill_and_save(region, door_hanger=False)
if not url_template:
# Create fake data and fill it in
address_autofill.open()
address_autofill.fill_and_save(region, door_hanger=False)

# Check "Save Address?" door hanger appears in the Address bar
autofill_popup.element_visible("address-save-doorhanger")
# Check "Save Address?" door hanger appears in the Address bar
autofill_popup.element_visible("address-save-doorhanger")
else:
pytest.skip("Doorhanger not tested for Live Sites.")
Loading