@elisra-devops/docgen-data-provider 1.96.0 → 1.97.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.
- package/bin/modules/ResultDataProvider.js +14 -2
- package/bin/modules/ResultDataProvider.js.map +1 -1
- package/bin/tests/modules/ResultDataProvider.test.js +8 -0
- package/bin/tests/modules/ResultDataProvider.test.js.map +1 -1
- package/package.json +1 -1
- package/src/modules/ResultDataProvider.ts +19 -4
- package/src/tests/modules/ResultDataProvider.test.ts +11 -0
|
@@ -3629,14 +3629,26 @@ class ResultDataProvider {
|
|
|
3629
3629
|
*/
|
|
3630
3630
|
createIterationsMap(iterations, isTestReporter, includeNotRunTestCases) {
|
|
3631
3631
|
return iterations.reduce((map, iterationItem) => {
|
|
3632
|
-
|
|
3633
|
-
iterationItem.
|
|
3632
|
+
const hasRunIdentifiers = (iterationItem === null || iterationItem === void 0 ? void 0 : iterationItem.lastRunId) !== undefined &&
|
|
3633
|
+
(iterationItem === null || iterationItem === void 0 ? void 0 : iterationItem.lastRunId) !== null &&
|
|
3634
|
+
String(iterationItem === null || iterationItem === void 0 ? void 0 : iterationItem.lastRunId).trim() !== '' &&
|
|
3635
|
+
(iterationItem === null || iterationItem === void 0 ? void 0 : iterationItem.lastResultId) !== undefined &&
|
|
3636
|
+
(iterationItem === null || iterationItem === void 0 ? void 0 : iterationItem.lastResultId) !== null &&
|
|
3637
|
+
String(iterationItem === null || iterationItem === void 0 ? void 0 : iterationItem.lastResultId).trim() !== '';
|
|
3638
|
+
if (hasRunIdentifiers) {
|
|
3634
3639
|
const key = `${iterationItem.lastRunId}-${iterationItem.lastResultId}-${iterationItem.testCaseId}`;
|
|
3635
3640
|
map[key] = iterationItem;
|
|
3636
3641
|
}
|
|
3637
3642
|
else if (includeNotRunTestCases) {
|
|
3638
3643
|
const key = `${iterationItem.testCaseId}`;
|
|
3639
3644
|
map[key] = iterationItem;
|
|
3645
|
+
if (isTestReporter && (iterationItem === null || iterationItem === void 0 ? void 0 : iterationItem.iteration)) {
|
|
3646
|
+
logger_1.default.debug(`[RunlessResolver] createIterationsMap: mapped runless testCaseId=${String(iterationItem === null || iterationItem === void 0 ? void 0 : iterationItem.testCaseId)} to case-only key`);
|
|
3647
|
+
}
|
|
3648
|
+
}
|
|
3649
|
+
else if ((iterationItem === null || iterationItem === void 0 ? void 0 : iterationItem.iteration) && !isTestReporter) {
|
|
3650
|
+
const key = `${iterationItem.lastRunId}-${iterationItem.lastResultId}-${iterationItem.testCaseId}`;
|
|
3651
|
+
map[key] = iterationItem;
|
|
3640
3652
|
}
|
|
3641
3653
|
return map;
|
|
3642
3654
|
}, {});
|