@midscene/test 1.13.2 → 1.13.4-beta-20260924030824.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,9 +16,7 @@ var __webpack_modules__ = {
16
16
  module.exports = require("yargs/yargs");
17
17
  },
18
18
  "./package.json" (module) {
19
- module.exports = {
20
- rE: "1.13.2"
21
- };
19
+ module.exports = JSON.parse('{"rE":"1.13.4-beta-20260924030824.0"}');
22
20
  }
23
21
  };
24
22
  var __webpack_module_cache__ = {};
@@ -1217,13 +1215,32 @@ Each Node's returned \`data\` is saved on that Step's result. Results are not na
1217
1215
  notRunReason: reason
1218
1216
  });
1219
1217
  const summarize = (projects)=>{
1220
- const cases = projects.flatMap((project)=>latestById(project.cases, (item)=>item.caseId));
1218
+ const healthCases = projects.flatMap((project)=>{
1219
+ const documentAttemptByRunId = new Map(project.documents.map((document)=>[
1220
+ document.documentRunId,
1221
+ document.attemptIndex ?? 0
1222
+ ]));
1223
+ return latestById(project.cases, (item)=>item.caseId).map((item)=>({
1224
+ status: item.status,
1225
+ ...item.run ? {
1226
+ run: item.run
1227
+ } : {},
1228
+ ...item.attempts ? {
1229
+ attempts: item.attempts
1230
+ } : {},
1231
+ retryCount: item.documentRunId ? documentAttemptByRunId.get(item.documentRunId) ?? 0 : 0
1232
+ }));
1233
+ });
1221
1234
  const documents = projects.flatMap((project)=>latestById(project.documents, (item)=>item.documentId));
1235
+ const health = (0, report_namespaceObject.calculateTestRunHealth)(healthCases);
1222
1236
  return {
1223
- total: cases.length,
1224
- passed: cases.filter((item)=>'success' === item.status).length,
1225
- failed: cases.filter((item)=>'failed' === item.status).length,
1226
- notRun: cases.filter((item)=>'not-run' === item.status).length,
1237
+ total: health.total,
1238
+ passed: health.passed,
1239
+ failed: health.failed,
1240
+ notRun: health.notRun,
1241
+ passedAfterRetry: health.passedAfterRetry,
1242
+ finalPassRate: health.finalPassRate,
1243
+ firstPassRate: health.firstPassRate,
1227
1244
  filtered: projects.reduce((total, project)=>total + project.filteredCaseCount, 0),
1228
1245
  collectionErrors: projects.reduce((total, project)=>total + project.collectionErrors.length, 0),
1229
1246
  documentFailures: documents.filter((document)=>'failed' === document.status).length,