@elisra-devops/docgen-data-provider 1.98.0 → 1.99.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.
@@ -3498,7 +3498,7 @@ class ResultDataProvider {
3498
3498
  * @returns An array of detailed result objects, either at the test level or step level, depending on the options.
3499
3499
  */
3500
3500
  alignStepsWithIterationsBase(testData, iterations, includeNotRunTestCases, includeItemsWithNoIterations, isTestReporter, options) {
3501
- var _a, _b, _c;
3501
+ var _a, _b, _c, _d;
3502
3502
  const detailedResults = [];
3503
3503
  if (!iterations || (iterations === null || iterations === void 0 ? void 0 : iterations.length) === 0) {
3504
3504
  return detailedResults;
@@ -3516,10 +3516,19 @@ class ResultDataProvider {
3516
3516
  }
3517
3517
  }
3518
3518
  for (const point of testItem.testPointsItems) {
3519
- const testCase = testCaseById.get(Number(point.testCaseId));
3520
- if (!testCase)
3519
+ const pointTestCaseId = Number((point === null || point === void 0 ? void 0 : point.testCaseId) || 0);
3520
+ const testCase = testCaseById.get(pointTestCaseId) || {
3521
+ workItem: { id: pointTestCaseId, workItemFields: [] },
3522
+ };
3523
+ if (!Number.isFinite(pointTestCaseId) || pointTestCaseId <= 0)
3521
3524
  continue;
3522
- if (testCase.workItem.workItemFields.length === 0) {
3525
+ if (!testCaseById.has(pointTestCaseId) && isTestReporter) {
3526
+ logger_1.default.debug(`[RunlessResolver] Missing suite testCase payload for point testCaseId=${String(pointTestCaseId)}; using point fallback for alignment`);
3527
+ }
3528
+ const testCaseWorkItemFields = Array.isArray((_d = testCase === null || testCase === void 0 ? void 0 : testCase.workItem) === null || _d === void 0 ? void 0 : _d.workItemFields)
3529
+ ? testCase.workItem.workItemFields
3530
+ : [];
3531
+ if (testCaseWorkItemFields.length === 0) {
3523
3532
  logger_1.default.warn(`Could not fetch the steps from WI ${JSON.stringify(testCase.workItem.id)}`);
3524
3533
  if (!isTestReporter) {
3525
3534
  continue;