Skip to content

Commit 23ab6e0

Browse files
committed
Remove skipif to see if these are working in CI
1 parent be49f08 commit 23ab6e0

File tree

4 files changed

+89
-29
lines changed

4 files changed

+89
-29
lines changed

l10n_CM/Unified/test_demo_ad_address_data_captured_in_doorhanger_and_stored.py

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
from modules.browser_object_autofill_popup import AutofillPopup
55
from modules.page_object_autofill import AddressFill
66
from modules.page_object_prefs import AboutPrefs
7-
from modules.util import Utilities, BrowserActions
8-
7+
from modules.util import BrowserActions, Utilities
98

109

1110
@pytest.fixture()
1211
def test_case():
1312
return "2888703"
1413

1514

16-
def test_demo_ad_address_data_captured_in_doorhanger_and_stored(driver: Firefox, region: str):
15+
def test_demo_ad_address_data_captured_in_doorhanger_and_stored(
16+
driver: Firefox, region: str
17+
):
1718
"""
1819
C2888703 - Verify Address data are captured in the Capture Doorhanger and stored in about:preferences
1920
"""
@@ -33,7 +34,9 @@ def test_demo_ad_address_data_captured_in_doorhanger_and_stored(driver: Firefox,
3334

3435
# containing Street Address field
3536
expected_street_add = address_autofill_data.street_address
36-
address_autofill_popup.element_has_text("address-doorhanger-street", expected_street_add)
37+
address_autofill_popup.element_has_text(
38+
"address-doorhanger-street", expected_street_add
39+
)
3740

3841
# containing City field
3942
expected_city = address_autofill_data.address_level_2
@@ -42,16 +45,24 @@ def test_demo_ad_address_data_captured_in_doorhanger_and_stored(driver: Firefox,
4245
expected_state = address_autofill_data.address_level_1
4346
if region not in ["FR", "DE"]:
4447
state_abbreviation = util.get_state_province_abbreviation(expected_state)
45-
address_autofill_popup.element_has_text("address-doorhanger-state", state_abbreviation)
48+
address_autofill_popup.element_has_text(
49+
"address-doorhanger-state", state_abbreviation
50+
)
4651

4752
# Verify Zip Code field (Different selector for DE/FR)
4853
expected_zip = address_autofill_data.postal_code
49-
zip_selector = "address-doorhanger-zip-other" if region in ["FR", "DE"] else "address-doorhanger-zip"
54+
zip_selector = (
55+
"address-doorhanger-zip-other"
56+
if region in ["FR", "DE"]
57+
else "address-doorhanger-zip"
58+
)
5059
address_autofill_popup.element_has_text(zip_selector, expected_zip)
5160

5261
# containing Country field
5362
expected_country = address_autofill_data.country
54-
address_autofill_popup.element_has_text("address-doorhanger-country", expected_country)
63+
address_autofill_popup.element_has_text(
64+
"address-doorhanger-country", expected_country
65+
)
5566

5667
# Click the "Save" button
5768
address_autofill_popup.click_doorhanger_button("save")
@@ -65,13 +76,17 @@ def test_demo_ad_address_data_captured_in_doorhanger_and_stored(driver: Firefox,
6576
elements = about_prefs.get_elements("saved-addresses-values")
6677

6778
# Expected values for verification
68-
expected_values = [expected_street_add, expected_city, expected_zip, expected_country]
79+
expected_values = [
80+
expected_street_add,
81+
expected_city,
82+
expected_zip,
83+
expected_country,
84+
]
6985
if region not in ["FR", "DE"]:
7086
expected_values.insert(2, expected_state)
7187

7288
# Check if all expected values exist in any saved address
7389
found_address_data = any(
74-
all(value in element.text for value in expected_values)
75-
for element in elements
90+
all(value in element.text for value in expected_values) for element in elements
7691
)
77-
assert found_address_data, "Street, city, state (if applicable), zip, or country were not found in any of the address entries!"
92+
assert found_address_data, "Street, city, state (if applicable), zip, or country were not found in any of the address entries!"

modules/util.py

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -403,21 +403,70 @@ def get_state_province_abbreviation(self, full_name: str) -> str:
403403
"""
404404
state_province_abbr = {
405405
# US States
406-
"Alabama": "AL", "Alaska": "AK", "Arizona": "AZ", "Arkansas": "AR", "California": "CA",
407-
"Colorado": "CO", "Connecticut": "CT", "Delaware": "DE", "Florida": "FL", "Georgia": "GA",
408-
"Hawaii": "HI", "Idaho": "ID", "Illinois": "IL", "Indiana": "IN", "Iowa": "IA",
409-
"Kansas": "KS", "Kentucky": "KY", "Louisiana": "LA", "Maine": "ME", "Maryland": "MD",
410-
"Massachusetts": "MA", "Michigan": "MI", "Minnesota": "MN", "Mississippi": "MS", "Missouri": "MO",
411-
"Montana": "MT", "Nebraska": "NE", "Nevada": "NV", "New Hampshire": "NH", "New Jersey": "NJ",
412-
"New Mexico": "NM", "New York": "NY", "North Carolina": "NC", "North Dakota": "ND", "Ohio": "OH",
413-
"Oklahoma": "OK", "Oregon": "OR", "Pennsylvania": "PA", "Rhode Island": "RI", "South Carolina": "SC",
414-
"South Dakota": "SD", "Tennessee": "TN", "Texas": "TX", "Utah": "UT", "Vermont": "VT",
415-
"Virginia": "VA", "Washington": "WA", "West Virginia": "WV", "Wisconsin": "WI", "Wyoming": "WY",
416-
406+
"Alabama": "AL",
407+
"Alaska": "AK",
408+
"Arizona": "AZ",
409+
"Arkansas": "AR",
410+
"California": "CA",
411+
"Colorado": "CO",
412+
"Connecticut": "CT",
413+
"Delaware": "DE",
414+
"Florida": "FL",
415+
"Georgia": "GA",
416+
"Hawaii": "HI",
417+
"Idaho": "ID",
418+
"Illinois": "IL",
419+
"Indiana": "IN",
420+
"Iowa": "IA",
421+
"Kansas": "KS",
422+
"Kentucky": "KY",
423+
"Louisiana": "LA",
424+
"Maine": "ME",
425+
"Maryland": "MD",
426+
"Massachusetts": "MA",
427+
"Michigan": "MI",
428+
"Minnesota": "MN",
429+
"Mississippi": "MS",
430+
"Missouri": "MO",
431+
"Montana": "MT",
432+
"Nebraska": "NE",
433+
"Nevada": "NV",
434+
"New Hampshire": "NH",
435+
"New Jersey": "NJ",
436+
"New Mexico": "NM",
437+
"New York": "NY",
438+
"North Carolina": "NC",
439+
"North Dakota": "ND",
440+
"Ohio": "OH",
441+
"Oklahoma": "OK",
442+
"Oregon": "OR",
443+
"Pennsylvania": "PA",
444+
"Rhode Island": "RI",
445+
"South Carolina": "SC",
446+
"South Dakota": "SD",
447+
"Tennessee": "TN",
448+
"Texas": "TX",
449+
"Utah": "UT",
450+
"Vermont": "VT",
451+
"Virginia": "VA",
452+
"Washington": "WA",
453+
"West Virginia": "WV",
454+
"Wisconsin": "WI",
455+
"Wyoming": "WY",
417456
# Canadian Provinces
418-
"Alberta": "AB", "British Columbia": "BC", "Manitoba": "MB", "New Brunswick": "NB",
419-
"Newfoundland and Labrador": "NL", "Nova Scotia": "NS", "Ontario": "ON", "Prince Edward Island": "PE",
420-
"Quebec": "QC", "Saskatchewan": "SK", "Northwest Territories": "NT", "Nunavut": "NU", "Yukon": "YT",
457+
"Alberta": "AB",
458+
"British Columbia": "BC",
459+
"Manitoba": "MB",
460+
"New Brunswick": "NB",
461+
"Newfoundland and Labrador": "NL",
462+
"Nova Scotia": "NS",
463+
"Ontario": "ON",
464+
"Prince Edward Island": "PE",
465+
"Quebec": "QC",
466+
"Saskatchewan": "SK",
467+
"Northwest Territories": "NT",
468+
"Nunavut": "NU",
469+
"Yukon": "YT",
421470
}
422471

423472
return state_province_abbr.get(full_name, "Not Found")

tests/security_and_privacy/test_cookies_not_saved_private_browsing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ def test_case():
1313
return "101677"
1414

1515

16-
@pytest.mark.skipif(system == "Linux", reason="136.0b3 Linux security bustage")
1716
def test_cookies_not_saved_private_browsing(driver: Firefox):
1817
"""
1918
C101677: ensure that cookies are not saved after using private browsing

tests/security_and_privacy/test_private_browser_password_doorhanger.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ def add_prefs():
2121
return [("signon.rememberSignons", True)]
2222

2323

24-
@pytest.mark.skipif(
25-
sys.platform.lower().startswith("linux"), reason="136.0b3 Linux security bustage"
26-
)
2724
def test_no_password_doorhanger_private_browsing(driver: Firefox):
2825
"""
2926
C101670: Ensure no save password doorhanger shows up and settings are correct

0 commit comments

Comments
 (0)