Skip to content

Commit d93bb68

Browse files
committed
Merge main
2 parents d9f2337 + b822a9a commit d93bb68

File tree

10 files changed

+92
-11
lines changed

10 files changed

+92
-11
lines changed

.github/workflows/check-beta-l10n.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check new beta version
1+
name: Check new beta version - L10N
22

33
on:
44
schedule:

.github/workflows/check-beta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check new beta version
1+
name: Check new beta version - Smoke
22

33
on:
44
schedule:

.github/workflows/l10n.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ jobs:
109109
echo "Running tests for: $line";
110110
pipenv run python -m l10n_CM.run_l10n --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?;
111111
done < selected_l10n_mappings;
112+
ls artifacts-mac/* &>/dev/null || echo "No mappings to report" >> artifacts-mac/placeholder.txt
112113
mv -n artifacts/* artifacts-mac/ || true;
113114
EXIT_CODE=$(cat TEST_EXIT_CODE);
114115
if [ $EXIT_CODE != 0 ]; then
@@ -191,6 +192,7 @@ jobs:
191192
echo "Running tests for: $line";
192193
DISPLAY=:99 pipenv run python -m l10n_CM.run_l10n --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?;
193194
done < selected_l10n_mappings;
195+
ls artifacts-linux/* &>/dev/null || echo "No mappings to report" >> artifacts-linux/placeholder.txt
194196
mv -n artifacts/* artifacts-linux/ || true;
195197
EXIT_CODE=$(cat TEST_EXIT_CODE);
196198
if [ $EXIT_CODE != 0 ]; then
@@ -317,8 +319,8 @@ jobs:
317319
$SCRIPT_EXIT_CODE = $_.Exception.HResult
318320
}
319321
}
320-
rm artifacts/assets -r -Force
321-
Get-ChildItem -Path "artifacts" | ForEach-Object {
322+
rm artifacts/assets -r -Force -ErrorAction SilentlyContinue
323+
Get-ChildItem -Path "artifacts" -ErrorAction SilentlyContinue | ForEach-Object {
322324
$destPath = "artifacts-win\" + $_.Name
323325
if (-not (Test-Path -Path $destPath)) {
324326
try {
@@ -328,6 +330,10 @@ jobs:
328330
}
329331
}
330332
}
333+
mkdir artifacts-win -Force
334+
if (-not (Test-Path -Path "artifacts-win\*")) {
335+
New-Item -Path "artifacts-win\placeholder.txt" -ItemType File -Value "no mappings to report."
336+
}
331337
$EXIT_CODE = Get-Content -Path "TEST_EXIT_CODE"
332338
if ($EXIT_CODE -ne 0) {
333339
exit [int]$EXIT_CODE
@@ -363,7 +369,7 @@ jobs:
363369
with:
364370
name: artifacts-win
365371
path: artifacts-win
366-
- name: Download Windows artifact
372+
- name: Download Linux artifact
367373
uses: actions/download-artifact@v4
368374
with:
369375
name: artifacts-linux

choose_l10n_ci_set.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ def process_changed_file(f, selected_mappings):
135135

136136
# Run all the tests for all mappings if any core l10n model, component, conftest, or tests are changed.
137137
selected_mappings = defaultdict(set)
138-
# by default, have the demo page run for US
139-
selected_mappings["demo"] = {"US"}
140138
for f in committed_files:
141139
for re_val in re_set_all:
142140
if re_val.match(f):
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/artsper_ad.html",
3+
"field_mapping": {
4+
"given_name": "7a26aa14-1711-46ef-bb59-ee07a3a78e7a",
5+
"family_name": "46633581-d70d-411c-8525-f47e98a1c7e6",
6+
"organization": "00ae70e7-638a-48d9-84c2-f0c116ba3974",
7+
"street_address": "41436bba-351b-493b-ba3b-a83c0632a203",
8+
"address_level_2": "ec64782b-ae40-44fe-ac38-2147be6fd7b5",
9+
"postal_code": "0db3d939-9d04-4d95-9f33-5d33ba281fec",
10+
"telephone": "8755f1ec-42e6-4a4f-ac5f-1cf696a0271a"
11+
},
12+
"form_field": "*[data-moz-autofill-inspect-id='{given_name}']",
13+
"fields": [
14+
"7a26aa14-1711-46ef-bb59-ee07a3a78e7a",
15+
"46633581-d70d-411c-8525-f47e98a1c7e6",
16+
"00ae70e7-638a-48d9-84c2-f0c116ba3974",
17+
"41436bba-351b-493b-ba3b-a83c0632a203",
18+
"ec64782b-ae40-44fe-ac38-2147be6fd7b5",
19+
"0db3d939-9d04-4d95-9f33-5d33ba281fec",
20+
"8755f1ec-42e6-4a4f-ac5f-1cf696a0271a"
21+
]
22+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"url": "http://127.0.0.1:8080/artsper_cc.html",
3+
"field_mapping": {
4+
"name": "7ac2adf1-10a4-4dff-93be-b406b92ef86d",
5+
"card_number": "1d8fbfaa-dc6f-4146-ada4-f9f2644cb09d",
6+
"expiration_month": "8152d7c1-e0a8-43c3-a4d9-2220a521c216",
7+
"expiration_year": "4610e1d5-b20a-4ae9-a587-81ee3e7e21d4",
8+
"cvv": "0039f41b-1ca3-46be-89a7-8e46cbaacc61"
9+
},
10+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
11+
"fields": [
12+
"7ac2adf1-10a4-4dff-93be-b406b92ef86d",
13+
"1d8fbfaa-dc6f-4146-ada4-f9f2644cb09d",
14+
"8152d7c1-e0a8-43c3-a4d9-2220a521c216",
15+
"4610e1d5-b20a-4ae9-a587-81ee3e7e21d4",
16+
"0039f41b-1ca3-46be-89a7-8e46cbaacc61"
17+
]
18+
}

l10n_CM/region/FR.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"region": "FR",
33
"sites": [
44
"amazon",
5-
"demo"
5+
"demo",
6+
"artsper"
67
],
78
"tests": [
89
]

l10n_CM/run_l10n.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"aldoshoes",
3535
"canadatire",
3636
"wish",
37+
"artsper",
3738
}
3839

3940
loaded_valid_sites = valid_l10n_mappings().keys()
@@ -135,12 +136,14 @@ def get_region_tests(test_region: str) -> list[str]:
135136
Returns:
136137
list[str]: A list of test file paths for the given region.
137138
"""
138-
path_to_region = current_dir + "/region/"
139-
with open(path_to_region + test_region + ".json", "r") as fp:
139+
path_to_region = os.path.join(current_dir, "region")
140+
with open(os.path.join(path_to_region, test_region) + ".json", "r") as fp:
140141
region_data = load(fp)
141142
raw_tests = region_data.get("tests", [])
142143
return (
143-
list(map(lambda test: current_dir + "/Unified/" + test, raw_tests))
144+
list(
145+
map(lambda test: os.path.join(current_dir, "Unified", test), raw_tests)
146+
)
144147
if len(raw_tests) > 0
145148
else raw_tests
146149
)

l10n_CM/sites/artsper/FR/artsper_ad.html

Lines changed: 7 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)