Skip to content

Commit 10d0676

Browse files
authored
Merge branch 'main' into Hani/cm-zooplus-es
2 parents 38aa659 + 3a1547c commit 10d0676

21 files changed

+606
-28
lines changed

choose_l10n_ci_set.py

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,31 @@ def valid_l10n_mappings():
3636

3737
def distribute_mappings_evenly(mappings, version):
3838
"""
39-
Write the selected mappings to the output file.
39+
Distribute the selected mappings if its a reportable run.
4040
4141
Args:
4242
mappings (dict): A dictionary of mappings, where the keys are sites and the values are sets of regions.
4343
version (int): The beta_version of the beta.
4444
"""
4545
if not mappings:
4646
return {}
47-
# sort the mappings by the length of the regions per site
48-
mappings = dict(sorted(mappings.items(), key=lambda val: len(val[1]), reverse=True))
49-
# place the mappings into 3 containers evenly according to the load
50-
loads = [0, 0, 0]
51-
containers = [defaultdict(set) for _ in range(3)]
52-
for key, value in mappings.items():
53-
min_idx = loads.index(min(loads))
54-
containers[min_idx][key] = value
55-
loads[min_idx] += len(value)
56-
# get container index according to beta beta_version
57-
run_idx = version % 3
58-
return containers[run_idx]
47+
if os.environ.get("TESTRAIL_REPORT"):
48+
# sort the mappings by the length of the regions per site
49+
mappings = dict(
50+
sorted(mappings.items(), key=lambda val: len(val[1]), reverse=True)
51+
)
52+
# place the mappings into 3 containers evenly according to the load
53+
loads = [0, 0, 0]
54+
containers = [defaultdict(set) for _ in range(3)]
55+
for key, value in mappings.items():
56+
min_idx = loads.index(min(loads))
57+
containers[min_idx][key] = value
58+
loads[min_idx] += len(value)
59+
# get container index according to beta beta_version
60+
run_idx = version % 3
61+
return containers[run_idx]
62+
else:
63+
return mappings
5964

6065

6166
def process_changed_file(f, selected_mappings):

ci_l10n_pyproject_headed.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ markers = [
1515
"noxvfb: tests that should not run in xvfb sessions"
1616
]
1717

18-
addopts = "-vs --ci --json-report --json-report-file artifacts/report_headed.json -n auto --reruns 5 --reruns-delay 3 --html=artifacts/report_headed.html"
18+
addopts = "-vs --ci --json-report --json-report-file artifacts/report_headed.json -n auto --reruns 4 --reruns-delay 3 --html=artifacts/report_headed.html"
1919

2020
[tool.ruff]
2121
target-version = "py310"

l10n_CM/Unified/test_demo_ad_7c_capture_doorhanger_stored_data_phone_email.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ def test_demo_ad_email_phone_captured_in_doorhanger_and_stored(
2323
C2888704 - Verify phone/email data are captured in the Capture Doorhanger and stored in about:preferences
2424
"""
2525
if not is_live_site:
26-
# Skip for PL region due to Firefox doorhanger bug where phone field doesn't appear
27-
if region == "PL":
28-
pytest.skip(
29-
"Phone field not displayed in doorhanger during automated testing for PL region"
30-
)
31-
3226
# Create fake data and fill it in
3327
address_autofill.open()
3428

l10n_CM/constants/artsper/FR/artsper_ad.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@
1818
"ec64782b-ae40-44fe-ac38-2147be6fd7b5",
1919
"0db3d939-9d04-4d95-9f33-5d33ba281fec",
2020
"8755f1ec-42e6-4a4f-ac5f-1cf696a0271a"
21+
],
22+
"skipped": [
23+
"test_demo_ad_3a_autofill_address_fields.py",
24+
"test_demo_ad_5b_clear_address_fields.py"
2125
]
2226
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"url": "http://127.0.0.1:8080/duka_ad.html",
3+
"field_mapping": {
4+
"given_name":"c0fd584b-ff6c-4805-93a4-12eaf7195c89",
5+
"family_name":"672a6e9a-5923-4a74-9977-1ad535a2f31f",
6+
"organization": "b3f7e7ef-7711-46c1-b469-163fc4bd1858",
7+
"street_address":"3c509d39-e8b2-4b65-8afe-7f2f70bde4f1",
8+
"postal_code":"1fe5e273-6087-44ae-9968-7a6724606864",
9+
"address_level_2": "f6a2144e-50e7-46db-a01f-d80aa098fc08",
10+
"country": "65ba7dc0-54ec-40b8-8879-f5dbe05c8303",
11+
"telephone": "8758cbc6-287e-40a7-b94e-88b35da48d76"
12+
13+
},
14+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
15+
"fields": [
16+
"c0fd584b-ff6c-4805-93a4-12eaf7195c89",
17+
"672a6e9a-5923-4a74-9977-1ad535a2f31f",
18+
"b3f7e7ef-7711-46c1-b469-163fc4bd1858",
19+
"3c509d39-e8b2-4b65-8afe-7f2f70bde4f1",
20+
"1fe5e273-6087-44ae-9968-7a6724606864",
21+
"f6a2144e-50e7-46db-a01f-d80aa098fc08",
22+
"65ba7dc0-54ec-40b8-8879-f5dbe05c8303",
23+
"8758cbc6-287e-40a7-b94e-88b35da48d76"
24+
25+
]
26+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"url": "http://127.0.0.1:8080/newegg_cc.html",
3+
"field_mapping": {
4+
"card_number": "11111111-aaaa-bbbb-cccc-000000000000",
5+
"expiration_date": "22222222-bbbb-cccc-dddd-111111111111",
6+
"cvv": "33333333-cccc-dddd-eeee-222222222222"
7+
},
8+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
9+
"skip": "True",
10+
"fields": [
11+
"11111111-aaaa-bbbb-cccc-000000000000",
12+
"22222222-bbbb-cccc-dddd-111111111111",
13+
"33333333-cccc-dddd-eeee-222222222222"
14+
]
15+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"url": "http://127.0.0.1:8080/fnac_ad.html",
3+
"field_mapping": {
4+
"given_name": "4c929eea-6b02-416b-ab91-5c12df732fc7",
5+
"family_name": "be324d87-0dda-45d4-a884-8f622d4e5be8",
6+
"street_address": "b3b475eb-3b91-4170-a6ca-880a071c6c3f",
7+
"address_level_2": "55790e94-fabf-4684-b2db-6846fa1056c2",
8+
"address_level_1": "ac6e6f42-0d04-4671-8ced-9c5e7f8dc51a",
9+
"country": "b3b87b3b-867d-4ec6-8e4b-aa13a45fe9ed",
10+
"postal_code": "8bd2a4c8-0eed-4721-8179-47d35717a188",
11+
"telephone": "82310c4a-3f30-4898-b0da-3605ec2dc6fd"
12+
},
13+
14+
"form_field": "*[data-moz-autofill-inspect-id='{given_name}']",
15+
"fields": [
16+
"4c929eea-6b02-416b-ab91-5c12df732fc7",
17+
"be324d87-0dda-45d4-a884-8f622d4e5be8",
18+
"b3b475eb-3b91-4170-a6ca-880a071c6c3f",
19+
"55790e94-fabf-4684-b2db-6846fa1056c2",
20+
"ac6e6f42-0d04-4671-8ced-9c5e7f8dc51a",
21+
"b3b87b3b-867d-4ec6-8e4b-aa13a45fe9ed",
22+
"8bd2a4c8-0eed-4721-8179-47d35717a188",
23+
"82310c4a-3f30-4898-b0da-3605ec2dc6fd"
24+
]
25+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"url": "http://127.0.0.1:8080/fnac_cc.html",
3+
"field_mapping": {
4+
"name": "c39e0aac-c334-43d5-81ac-1e799ecf7b63",
5+
"card_number": "2508fd7b-a4c9-4d63-80a1-79b4e12a8826",
6+
"expiration_date": "3181324d-01b3-4665-bdd9-5de4be475336",
7+
"cvv": "bc2807a3-960e-4071-9cf0-5713b340911a"
8+
},
9+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
10+
"fields": [
11+
"c39e0aac-c334-43d5-81ac-1e799ecf7b63",
12+
"2508fd7b-a4c9-4d63-80a1-79b4e12a8826",
13+
"3181324d-01b3-4665-bdd9-5de4be475336",
14+
"bc2807a3-960e-4071-9cf0-5713b340911a"
15+
],
16+
"skipped": [
17+
"test_demo_cc_1_dropdown.py",
18+
"test_demo_cc_2_preview.py",
19+
"test_demo_cc_3_autofill.py",
20+
"test_demo_cc_5_clear.py"
21+
]
22+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"url": "http://127.0.0.1:8080/zalando_ad.html",
3+
"field_mapping": {
4+
"given_name":"c3fa1b01-da72-4499-a839-ff22339be533",
5+
"family_name":"3418ab6c-db89-4476-b001-e6bcccb25330",
6+
"street_address":"1035f3d8-efd8-48bd-a4ed-0472f18e4b10",
7+
"postal_code":"0769b552-edc4-4ba1-bfef-b8d82665d990",
8+
"address_level_2": "92ed3f36-e523-4a96-a5a9-54be50339e69"
9+
10+
},
11+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
12+
"fields": [
13+
"c3fa1b01-da72-4499-a839-ff22339be533",
14+
"3418ab6c-db89-4476-b001-e6bcccb25330",
15+
"1035f3d8-efd8-48bd-a4ed-0472f18e4b10",
16+
"0769b552-edc4-4ba1-bfef-b8d82665d990",
17+
"92ed3f36-e523-4a96-a5a9-54be50339e69"
18+
19+
]
20+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"url": "http://127.0.0.1:8080/zalando_cc.html",
3+
"field_mapping": {
4+
"card_name": "7985a423-775d-4938-a25b-13ba236fd152",
5+
"card_number": "773a1b5d-5337-4dba-bb10-d4ed80bb151e",
6+
"expiration_date": "7985a423-775d-4938-a25b-13ba236fd152",
7+
"cvv": "a8d8392a-b65c-45b0-83d9-f26a6d51815b"
8+
},
9+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
10+
"skip": "True",
11+
"fields": [
12+
"7985a423-775d-4938-a25b-13ba236fd152",
13+
"773a1b5d-5337-4dba-bb10-d4ed80bb151e",
14+
"7985a423-775d-4938-a25b-13ba236fd152",
15+
"a8d8392a-b65c-45b0-83d9-f26a6d51815b"
16+
]
17+
}

0 commit comments

Comments
 (0)