Skip to content

Commit adae17f

Browse files
Merge branch 'main' into philimon/l10n_report
2 parents d4c33fb + ded2c12 commit adae17f

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

l10n_CM/constants/amazon/DE/amazon_ad.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"name": "28f5f493-ad18-4e7c-99fa-524bc768ed7a",
66
"telephone": "c384d303-3e2b-4b8a-ba89-c741056fc9b4",
77
"street_address": "a5fb9e4c-60a0-42a2-9e4a-6a067b55d208",
8-
"organization": "9e8475b3-e1a5-46cf-9af0-6f2caab918fe",
98
"address_level_2": "67cbe0f8-dbe4-4afd-a077-765186bcf0b3",
109
"postal_code": "e38f3160-4ce5-4804-b5d5-b92c3ccc499e"
1110
},
@@ -15,7 +14,6 @@
1514
"28f5f493-ad18-4e7c-99fa-524bc768ed7a",
1615
"c384d303-3e2b-4b8a-ba89-c741056fc9b4",
1716
"a5fb9e4c-60a0-42a2-9e4a-6a067b55d208",
18-
"9e8475b3-e1a5-46cf-9af0-6f2caab918fe",
1917
"67cbe0f8-dbe4-4afd-a077-765186bcf0b3",
2018
"e38f3160-4ce5-4804-b5d5-b92c3ccc499e"
2119
]

l10n_CM/run_l10n.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@
1313
valid_flags = {"--run-headless", "-n", "--reruns", "--fx-executable", "--ci"}
1414
flag_with_parameter = {"-n", "--reruns"}
1515
valid_region = {"US", "CA", "DE", "FR"}
16-
valid_sites = {"demo", "amazon", "walmart", "mediamarkt", "lowes", "etsy", "calvinklein"}
16+
valid_sites = {
17+
"demo",
18+
"amazon",
19+
"walmart",
20+
"mediamarkt",
21+
"lowes",
22+
"etsy",
23+
"calvinklein",
24+
}
1725
live_sites = []
1826

1927
LOCALHOST = "127.0.0.1"

modules/page_object_autofill.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ def verify_form_data(self, sample_data: CreditCardBase | AutofillAddressBase):
245245
)
246246
elif attr_name == "expiration_date" and len(autofilled_field_value) > 5:
247247
autofilled_field_value = autofilled_field_value.replace("20", "")
248-
248+
elif attr_name == "country":
249+
expected_value = self.util.get_country_local_translation(expected_value)
249250
if autofilled_field_value.isdigit():
250251
# Handle expiration month comparison - normalize to integers to handle leading zeros
251252
autofilled_field_value = str(int(autofilled_field_value))

modules/util.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def __init__(self):
103103
"Nunavut": "NU",
104104
"Yukon": "YT",
105105
}
106+
# temporary fix until faker issue is resolved
107+
self.country_local_translation = {"Germany": "Deutschland"}
106108
self.fake = None
107109
self.locale = None
108110

@@ -519,6 +521,15 @@ def get_state_province_abbreviation(self, full_name: str) -> str:
519521
"""
520522
return self.state_province_abbr.get(full_name, "Not Found")
521523

524+
def get_country_local_translation(self, country_name: str) -> str:
525+
"""
526+
Returns the local translation of the country name.
527+
528+
:param country_name: The full name of the country in english
529+
:return: The corresponding translation in the local language or the english name itself if not in the dictionary.
530+
"""
531+
return self.country_local_translation.get(country_name, country_name)
532+
522533
def normalize_regional_phone_numbers(self, phone: str, region: str) -> str:
523534
"""
524535
Normalizes a phone number by separating the country prefix and verifying the rest of the number as an integer.

tests/password_manager/test_primary_password_triggered_on_about_logins_access.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def test_primary_password_triggered_on_about_logins_access_via_hamburger_menu(
7373
# Attempt to view the saved password in order to trigger the primary password prompt
7474
about_logins.element_visible("show-password-checkbox")
7575
about_logins.click_on("show-password-checkbox")
76-
7776
# Dismiss the primary password prompt without entering the password
7877
with driver.context(driver.CONTEXT_CHROME):
7978
driver.switch_to.window(driver.window_handles[-1])
@@ -84,9 +83,9 @@ def test_primary_password_triggered_on_about_logins_access_via_hamburger_menu(
8483
tabs.switch_to_new_tab()
8584
panel_ui.open_panel_menu()
8685
panel_ui.redirect_to_about_logins_page()
87-
8886
# Verify that the primary password prompt appears and enter the primary password
8987
with driver.context(driver.CONTEXT_CHROME):
88+
tabs.wait_for_num_tabs(2)
9089
driver.switch_to.window(driver.window_handles[-1])
9190
# Fetch a fresh reference to avoid staling
9291
primary_password_prompt = about_logins.get_element("primary-password-prompt")

0 commit comments

Comments
 (0)