fix sorting test scripts and add dotenv (#9099)

This commit is contained in:
sabril 2025-09-02 16:58:52 +08:00 committed by GitHub
parent 6ffdf79b7a
commit 06057a423e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 5 deletions

View file

@ -24,6 +24,7 @@
"client-oauth2": "4.3.3",
"deepmerge": "4.3.1",
"detox": "20.37.0",
"dotenv": "17.2.1",
"form-data": "4.0.1",
"jest": "29.7.0",
"jest-circus": "29.7.0",
@ -5507,6 +5508,19 @@
"highlight.js": "11.9.0"
}
},
"node_modules/dotenv": {
"version": "17.2.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.1.tgz",
"integrity": "sha512-kQhDYKZecqnM0fCnzI5eIv5L4cAe/iRI+HqMbO/hbRdTAeXDG+M9FjipUxNfbARuEg4iHIbhnhs78BCHNbSxEQ==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/dtrace-provider": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.8.tgz",

View file

@ -22,6 +22,7 @@
"client-oauth2": "4.3.3",
"deepmerge": "4.3.1",
"detox": "20.37.0",
"dotenv": "17.2.1",
"form-data": "4.0.1",
"jest": "29.7.0",
"jest-circus": "29.7.0",

View file

@ -115,11 +115,7 @@ async function createTestExecutions(allTests, testCycle) {
const promises = [];
Object.entries(testCases).forEach(([key, steps], index) => {
const testScriptResults = steps.
sort((a, b) => {
const aKey = a.title.match(/(MM-T\d+_\d+)/)[0].split('_')[1];
const bKey = b.title.match(/(MM-T\d+_\d+)/)[0].split('_')[1];
return parseInt(aKey, 10) - parseInt(bKey, 10);
}).
sort((a, b) => a.title.localeCompare(b.title)).
map((item) => {
return {
title: item.title,