Skip to content

Commit 3f54298

Browse files
authored
Merge branch 'main' into anca/cm-de-thomann
2 parents cc68150 + 2c8978a commit 3f54298

File tree

8 files changed

+59
-7
lines changed

8 files changed

+59
-7
lines changed

l10n_CM/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ The harness relies on several configuration files:
6565
],
6666
# list of individual tests to skip for this configuration run.
6767
"skipped": []
68+
# list of OS platforms to skip for this configuration run.
69+
# "Darwin", "Linux" or "Windows"
70+
"skip_os": []
6871
}
6972
7073
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"url": "http://127.0.0.1:8080/wish_ad.html",
3+
"field_mapping": {
4+
"family_name": "85068eda-75f5-4319-b897-becd3a1b1b22",
5+
"given_name": "3cab3b5e-1944-4112-af77-75a4f3ca238d",
6+
"address_level_2": "0408ab06-bf6d-4aae-b73c-58e314183732",
7+
"address_level_1": "5dee3d64-dab7-4848-895c-6ecb016547fb",
8+
"street_address" : "a6db6fea-94a1-4a7f-addd-436a4b2ba270",
9+
"postal_code": "be69366f-f2b1-4502-90af-cdc56069af11",
10+
"telephone": "22bcc5a1-f1d3-4a97-949a-6868448e9c17"
11+
12+
},
13+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
14+
"fields": [
15+
"85068eda-75f5-4319-b897-becd3a1b1b22",
16+
"3cab3b5e-1944-4112-af77-75a4f3ca238d",
17+
"0408ab06-bf6d-4aae-b73c-58e314183732",
18+
"5dee3d64-dab7-4848-895c-6ecb016547fb",
19+
"a6db6fea-94a1-4a7f-addd-436a4b2ba270",
20+
"be69366f-f2b1-4502-90af-cdc56069af11",
21+
"22bcc5a1-f1d3-4a97-949a-6868448e9c17"
22+
23+
]
24+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"url": "http://127.0.0.1:8080/wish_cc.html",
3+
"field_mapping": {
4+
"card_number": "6e530a2b-9ee5-489a-8ce3-68f014a3bb27",
5+
"expiration_date": "dbc81cc7-75dc-454f-b4e4-eaf40f956bce",
6+
"cvv": "4e2ac2c7-ef80-43b1-bab7-50da89d54acb"
7+
},
8+
"form_field": "*[data-moz-autofill-inspect-id='{name}']",
9+
"skip": true,
10+
"fields": [
11+
"6e530a2b-9ee5-489a-8ce3-68f014a3bb27",
12+
"dbc81cc7-75dc-454f-b4e4-eaf40f956bce",
13+
"4e2ac2c7-ef80-43b1-bab7-50da89d54acb"
14+
]
15+
16+
}

l10n_CM/region/US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"bestbuy",
1010
"demo",
1111
"newegg",
12-
"aldoshoes"
12+
"aldoshoes",
13+
"wish"
1314
],
1415
"tests": []
1516
}

l10n_CM/run_l10n.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22
import os
3+
import platform
34
import subprocess
45
import sys
56
import threading
@@ -34,6 +35,7 @@
3435
"aldoshoes",
3536
"canadatire",
3637
"thomann",
38+
"wish",
3739
"artsper",
3840
}
3941

@@ -42,7 +44,6 @@
4244

4345
live_sites = []
4446

45-
4647
LOCALHOST = "127.0.0.1"
4748
PORT = 8080
4849
os.environ["TEST_EXIT_CODE"] = "0"
@@ -189,15 +190,17 @@ def should_keep_test(test):
189190
def get_skipped_tests(live_site) -> list[str] | str:
190191
"""
191192
Read the mapping for the given region and site and return any tests that are marked as skipped.
193+
It is either a list of tests to skip or skipping all tests for the given site.
192194
193195
Arg:
194196
live_site (str): The site is being tested.
195197
Returns:
196198
list[str] | str: A list of tests that should be skipped, or "All" if all tests should be skipped.
197199
"""
198-
with open(current_dir + "/constants/" + live_site + ".json", "r") as fp:
200+
with open(os.path.join(current_dir, "constants", live_site) + ".json", "r") as fp:
199201
live_site_data = load(fp)
200-
if live_site_data.get("skip"):
202+
platform_skip = platform.system() in live_site_data.get("skip_os", [])
203+
if live_site_data.get("skip") or platform_skip:
201204
return "All"
202205
return live_site_data.get("skipped", [])
203206

l10n_CM/sites/wish/US/wish_ad.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div class="Common__InfoWrapper-bon6ls-0 hXGwiH"><div class="Common__Title-bon6ls-2 fltZgm">Shipping</div><div class="Common__Wrapper-bon6ls-17 hctQYm" height="570.7999877929688"><div><div class="Common__MultipleShippingWrapper-bon6ls-40 eKePTm"><div class="FormElement__FormContent-h7mauq-9 eMuqID"><div class="FormElement__FormElementTitle-h7mauq-1 cfkeTg">New Address</div><div class="FormElement__FormBody-h7mauq-19 krIguT"><div class="FormElement__FormRow-h7mauq-20 jpHihr"><div class="FormElement__FormRowEntry-h7mauq-22 bfdzNa"><div class="WishTextInput__Wrapper-molq32-0 kqbtqL"><div class="FormElement__FormElementTitle-h7mauq-1 itcIgP">First Name*</div><div class="WishTextInput__InputWrapper-molq32-4 cQLdvm"><input autocomplete="given-name" class="WishTextInput-molq32-5 kwzpzy" data-id="firstName" data-moz-autofill-inspect-id="3cab3b5e-1944-4112-af77-75a4f3ca238d" data-moz-autofill-type="given-name" id="firstName" inputmode="text" maxlength="99" placeholder="" type="text" value=""></div></div></div><div class="FormElement__FormRowEntry-h7mauq-22 bfdzNa"><div class="WishTextInput__Wrapper-molq32-0 kqbtqL"><div class="FormElement__FormElementTitle-h7mauq-1 itcIgP">Last Name*</div><div class="WishTextInput__InputWrapper-molq32-4 cQLdvm"><input autocomplete="family-name" class="WishTextInput-molq32-5 kwzpzy" data-id="lastName" data-moz-autofill-inspect-id="85068eda-75f5-4319-b897-becd3a1b1b22" data-moz-autofill-type="family-name" id="lastName" inputmode="text" maxlength="99" placeholder="" type="text" value=""></div></div></div></div><div class="FormElement__FormRow-h7mauq-20 jpHihr"><div class="FormElement__FormRowEntry-h7mauq-22 bfdzNa"><div class="FormElement__FormElementTitle-h7mauq-1 itcIgP">Address Line 1*</div><div class="WishTextInput__InputWrapper-molq32-4 cQLdvm"><input autocomplete="address-line1" class="WishTextInput-molq32-5 kwzpzy" data-id="addressLineOne" data-moz-autofill-inspect-id="a6db6fea-94a1-4a7f-addd-436a4b2ba270" data-moz-autofill-type="address-line1" id="addressLineOne" inputmode="text" maxlength="199" placeholder="" type="text" value=""></div></div></div><div class="FormElement__FormRow-h7mauq-20 jpHihr"><div class="FormElement__FormRowEntry-h7mauq-22 bfdzNa"><div class="FormElement__FormElementTitle-h7mauq-1 itcIgP">Address Line 2</div><div class="WishTextInput__InputWrapper-molq32-4 cQLdvm"><input autocomplete="address-line2" class="WishTextInput-molq32-5 kwzpzy" data-id="addressLineTwo" data-moz-autofill-inspect-id="e8ca8d13-d44c-4aec-94a4-6ba648448778" data-moz-autofill-type="address-line2" id="addressLineTwo" inputmode="text" maxlength="199" placeholder="Optional" type="text" value=""></div></div></div><div class="FormElement__FormRow-h7mauq-20 jpHihr"><div class="FormElement__FormRowEntry-h7mauq-22 bfdzNa"><div class="FormElement__FormElementTitle-h7mauq-1 fqJTbh">Country / Region*</div><div class="DropdownSelectInput__SelectBox-sc-1ssquc7-1 cutZI" role="listbox" tabindex="0" width="100%"><div class="DropdownSelectInput__SelectBoxText-sc-1ssquc7-0 jBTMEu">United Kingdom (Great Britain)</div></div><input class="FormElement__FormDummyInput-h7mauq-24 hStClv" data-moz-autofill-type="country" data-moz-autofill-inspect-id="5769e933-02cf-473e-9437-d8138611a872" id="country"></div></div><div class="FormElement__FormRow-h7mauq-20 jpHihr"><div class="FormElement__FormRowEntry-h7mauq-22 bfdzNa"><div class="FormElement__FormElementTitle-h7mauq-1 itcIgP">State/Province/Region</div><div class="WishTextInput__InputWrapper-molq32-4 cQLdvm"><input autocomplete="address-level1" class="WishTextInput-molq32-5 kwzpzy" data-id="state" data-moz-autofill-inspect-id="5dee3d64-dab7-4848-895c-6ecb016547fb" data-moz-autofill-type="address-level1" id="state" inputmode="text" maxlength="99" placeholder="Optional" type="text" value=""></div></div></div><div class="FormElement__FormRow-h7mauq-20 jpHihr"><div class="FormElement__FormRowEntry-h7mauq-22 bfdzNa"><div class="FormElement__FormElementTitle-h7mauq-1 itcIgP">City*</div><div class="WishTextInput__InputWrapper-molq32-4 cQLdvm"><input autocomplete="address-level2" class="WishTextInput-molq32-5 kwzpzy" data-id="city" data-moz-autofill-inspect-id="0408ab06-bf6d-4aae-b73c-58e314183732" data-moz-autofill-type="address-level2" id="city" inputmode="text" maxlength="99" placeholder="" type="text" value=""></div></div><div class="FormElement__FormRowEntry-h7mauq-22 bfdzNa"><div class="FormElement__FormElementTitle-h7mauq-1 itcIgP">Zip/Postal Code*</div><div class="WishTextInput__InputWrapper-molq32-4 cQLdvm"><input autocomplete="postal-code" class="WishTextInput-molq32-5 kwzpzy" data-id="zipcode" data-moz-autofill-inspect-id="be69366f-f2b1-4502-90af-cdc56069af11" data-moz-autofill-type="postal-code" id="zipcode" inputmode="text" maxlength="49" placeholder="" type="text" value=""></div></div></div><div class="FormElement__FormRow-h7mauq-20 jpHihr"><div class="FormElement__FormRowEntry-h7mauq-22 bfdzNa"><div class="FormElement__FormElementTitle-h7mauq-1 itcIgP">Phone Number*</div><div class="WishTextInput__InputWrapper-molq32-4 cQLdvm"><input autocomplete="tel" class="WishTextInput-molq32-5 kwzpzy" data-id="phoneNumber" data-moz-autofill-inspect-id="22bcc5a1-f1d3-4a97-949a-6868448e9c17" data-moz-autofill-type="tel" id="phoneNumber" inputmode="text" maxlength="49" placeholder="" type="text" value=""></div></div></div></div></div><div class="Common__MultipleShippingFormButtonGroup-bon6ls-41 dUuJGK"><div class="Common__MultipleShippingFormButtonWrapper-bon6ls-42 itPoBY"><div class="Button-sc-1r40802-0 dABSHV">Cancel</div></div><div class="Common__MultipleShippingFormButtonWrapper-bon6ls-42 itPoBY"><div class="Button-sc-1r40802-0 dABSHV">Save Address</div></div></div></div></div></div></div>

l10n_CM/sites/wish/US/wish_cc.html

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

modules/testrail_integration.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ def organize_l10n_entries(
290290
cases_in_suite = suite_info.get("cases")
291291
cases_in_suite = [int(n) for n in cases_in_suite]
292292
results = suite_info.get("results")
293+
durations = suite_info.get("durations")
293294
plan_title = expected_plan.get("name")
294295

295296
site_entries = [
@@ -380,16 +381,18 @@ def organize_l10n_entries(
380381
"blocked": {},
381382
}
382383

383-
for test_case, outcome in results.items():
384-
logging.info(f"{test_case}: {outcome}")
384+
for test_case in results.keys():
385+
outcome = results[test_case]
386+
duration = durations[test_case]
387+
logging.info(f"{test_case}: {outcome} {duration}")
385388
if outcome == "rerun":
386389
logging.info("Rerun result...skipping...")
387390
continue
388391
category = next(status for status in passkey if outcome in passkey.get(status))
389392
if not test_results[category].get(run_id):
390393
test_results[category][run_id] = []
391394
test_results[category][run_id].append(
392-
{"suite_id": suite_id, "site": site, "test_case": test_case}
395+
{"suite_id": suite_id, "site": site, "test_case": test_case, "duration": f"{duration}s"}
393396
)
394397

395398
return test_results

0 commit comments

Comments
 (0)