@elisra-devops/docgen-data-provider 1.93.0 → 1.95.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.
@@ -194,6 +194,15 @@ export default class ResultDataProvider {
194
194
  * Maps raw test point data to a simplified object.
195
195
  */
196
196
  private mapTestPointForCrossPlans;
197
+ /**
198
+ * Resolves a point timestamp that can be used as WIT `asOf` anchor.
199
+ * Returns an ISO string when a valid date exists, otherwise an empty string.
200
+ */
201
+ private resolvePointAsOfTimestamp;
202
+ /**
203
+ * Builds a normalized test point shape used by downstream result fetch flows.
204
+ */
205
+ private buildMappedTestPoint;
197
206
  getTestPointsForTestCases(projectName: string, testCaseId: string[]): Promise<any>;
198
207
  /**
199
208
  * Fetches test cases by suite ID.
@@ -201,10 +210,24 @@ export default class ResultDataProvider {
201
210
  private fetchTestCasesBySuiteId;
202
211
  private attachSuiteTestCaseContextToPoints;
203
212
  private extractWorkItemFieldsMap;
213
+ /**
214
+ * Reads a field value by reference name with case-insensitive key matching.
215
+ */
216
+ private getFieldValueByName;
204
217
  private resolveSuiteTestCaseRevision;
205
218
  private buildWorkItemSnapshotFromSuiteTestCase;
206
219
  private fetchWorkItemByRevision;
220
+ private fetchWorkItemByAsOf;
207
221
  private fetchWorkItemLatest;
222
+ /**
223
+ * Executes a work-item GET by URL and applies consistent warning/error handling.
224
+ */
225
+ private fetchWorkItemByUrl;
226
+ /**
227
+ * Resolves runless test case data using ordered fallbacks:
228
+ * 1) point-based `asOf` snapshot, 2) explicit revision, 3) suite payload snapshot, 4) latest WI.
229
+ */
230
+ private resolveRunlessTestCaseData;
208
231
  /**
209
232
  * Fetches result data based on the Work Item Test Reporter.
210
233
  *
@@ -274,7 +274,7 @@ class ResultDataProvider {
274
274
  const planName = await this.fetchTestPlanName(testPlanId, projectName);
275
275
  const suites = await this.fetchTestSuites(testPlanId, projectName, selectedSuiteIds, true);
276
276
  const testData = await this.fetchTestData(suites, projectName, testPlanId, false);
277
- const runResults = await this.fetchAllResultDataTestReporter(testData, projectName, selectedFields, false, includeAllHistory);
277
+ const runResults = await this.fetchAllResultDataTestReporter(testData, projectName, selectedFields, false, includeAllHistory, true);
278
278
  const rows = this.alignStepsWithIterationsFlatReport(testData, runResults, true, testPlanId, planName);
279
279
  return { planId: testPlanId, planName, rows: rows || [] };
280
280
  }
@@ -2516,7 +2516,7 @@ class ResultDataProvider {
2516
2516
  }
2517
2517
  // Fetch detailed information for each test point and map to required format
2518
2518
  const detailedPoints = await Promise.all(latestPoints.map(async (point) => {
2519
- const url = `${point.url}?witFields=Microsoft.VSTS.TCM.Steps&includePointDetails=true`;
2519
+ const url = `${point.url}?witFields=Microsoft.VSTS.TCM.Steps,System.Rev&includePointDetails=true`;
2520
2520
  const detailedPoint = await tfs_1.TFSServices.getItemContent(url, this.token);
2521
2521
  return this.mapTestPointForCrossPlans(detailedPoint, projectName);
2522
2522
  // return this.mapTestPointForCrossPlans(detailedPoint, projectName);
@@ -2548,32 +2548,32 @@ class ResultDataProvider {
2548
2548
  */
2549
2549
  mapTestPoint(testPoint, projectName) {
2550
2550
  var _a, _b, _c, _d, _e;
2551
- return {
2551
+ const pointAsOfTimestamp = this.resolvePointAsOfTimestamp(testPoint);
2552
+ return this.buildMappedTestPoint({
2552
2553
  testPointId: testPoint.id,
2553
2554
  testCaseId: testPoint.testCaseReference.id,
2554
2555
  testCaseName: testPoint.testCaseReference.name,
2555
- testCaseUrl: `${this.orgUrl}${projectName}/_workitems/edit/${testPoint.testCaseReference.id}`,
2556
2556
  configurationName: (_a = testPoint.configuration) === null || _a === void 0 ? void 0 : _a.name,
2557
- outcome: ((_b = testPoint.results) === null || _b === void 0 ? void 0 : _b.outcome) || 'Not Run',
2557
+ outcome: (_b = testPoint.results) === null || _b === void 0 ? void 0 : _b.outcome,
2558
2558
  testSuite: testPoint.testSuite,
2559
2559
  lastRunId: (_c = testPoint.results) === null || _c === void 0 ? void 0 : _c.lastTestRunId,
2560
2560
  lastResultId: (_d = testPoint.results) === null || _d === void 0 ? void 0 : _d.lastResultId,
2561
2561
  lastResultDetails: (_e = testPoint.results) === null || _e === void 0 ? void 0 : _e.lastResultDetails,
2562
- };
2562
+ }, projectName, pointAsOfTimestamp);
2563
2563
  }
2564
2564
  /**
2565
2565
  * Maps raw test point data to a simplified object.
2566
2566
  */
2567
2567
  mapTestPointForCrossPlans(testPoint, projectName) {
2568
2568
  var _a, _b, _c;
2569
- return {
2569
+ const pointAsOfTimestamp = this.resolvePointAsOfTimestamp(testPoint);
2570
+ return this.buildMappedTestPoint({
2570
2571
  testPointId: testPoint.id,
2571
2572
  testCaseId: testPoint.testCase.id,
2572
2573
  testCaseName: testPoint.testCase.name,
2573
- testCaseUrl: `${this.orgUrl}${projectName}/_workitems/edit/${testPoint.testCase.id}`,
2574
- testSuite: testPoint.testSuite,
2575
2574
  configurationName: (_a = testPoint.configuration) === null || _a === void 0 ? void 0 : _a.name,
2576
- outcome: testPoint.outcome || 'Not Run',
2575
+ outcome: testPoint.outcome,
2576
+ testSuite: testPoint.testSuite,
2577
2577
  lastRunId: (_b = testPoint.lastTestRun) === null || _b === void 0 ? void 0 : _b.id,
2578
2578
  lastResultId: (_c = testPoint.lastResult) === null || _c === void 0 ? void 0 : _c.id,
2579
2579
  lastResultDetails: testPoint.lastResultDetails || {
@@ -2581,7 +2581,50 @@ class ResultDataProvider {
2581
2581
  dateCompleted: '0000-00-00T00:00:00.000Z',
2582
2582
  runBy: { displayName: 'No tester', id: '00000000-0000-0000-0000-000000000000' },
2583
2583
  },
2584
+ }, projectName, pointAsOfTimestamp);
2585
+ }
2586
+ /**
2587
+ * Resolves a point timestamp that can be used as WIT `asOf` anchor.
2588
+ * Returns an ISO string when a valid date exists, otherwise an empty string.
2589
+ */
2590
+ resolvePointAsOfTimestamp(testPoint) {
2591
+ const candidates = [
2592
+ testPoint === null || testPoint === void 0 ? void 0 : testPoint.lastUpdatedDate,
2593
+ testPoint === null || testPoint === void 0 ? void 0 : testPoint.lastUpdatedOn,
2594
+ testPoint === null || testPoint === void 0 ? void 0 : testPoint.updatedDate,
2595
+ testPoint === null || testPoint === void 0 ? void 0 : testPoint.updatedOn,
2596
+ ];
2597
+ for (const candidate of candidates) {
2598
+ const raw = String(candidate || '').trim();
2599
+ if (!raw)
2600
+ continue;
2601
+ const parsed = new Date(raw);
2602
+ if (!Number.isNaN(parsed.getTime())) {
2603
+ return parsed.toISOString();
2604
+ }
2605
+ }
2606
+ return '';
2607
+ }
2608
+ /**
2609
+ * Builds a normalized test point shape used by downstream result fetch flows.
2610
+ */
2611
+ buildMappedTestPoint(pointData, projectName, pointAsOfTimestamp) {
2612
+ const mappedPoint = {
2613
+ testPointId: pointData.testPointId,
2614
+ testCaseId: pointData.testCaseId,
2615
+ testCaseName: pointData.testCaseName,
2616
+ testCaseUrl: `${this.orgUrl}${projectName}/_workitems/edit/${pointData.testCaseId}`,
2617
+ configurationName: pointData.configurationName,
2618
+ outcome: pointData.outcome || 'Not Run',
2619
+ testSuite: pointData.testSuite,
2620
+ lastRunId: pointData.lastRunId,
2621
+ lastResultId: pointData.lastResultId,
2622
+ lastResultDetails: pointData.lastResultDetails,
2584
2623
  };
2624
+ if (pointAsOfTimestamp) {
2625
+ mappedPoint.pointAsOfTimestamp = pointAsOfTimestamp;
2626
+ }
2627
+ return mappedPoint;
2585
2628
  }
2586
2629
  // Helper method to get all test points for a test case
2587
2630
  async getTestPointsForTestCases(projectName, testCaseId) {
@@ -2597,7 +2640,7 @@ class ResultDataProvider {
2597
2640
  * Fetches test cases by suite ID.
2598
2641
  */
2599
2642
  async fetchTestCasesBySuiteId(projectName, testPlanId, suiteId) {
2600
- const url = `${this.orgUrl}${projectName}/_apis/testplan/Plans/${testPlanId}/Suites/${suiteId}/TestCase?witFields=Microsoft.VSTS.TCM.Steps`;
2643
+ const url = `${this.orgUrl}${projectName}/_apis/testplan/Plans/${testPlanId}/Suites/${suiteId}/TestCase?witFields=Microsoft.VSTS.TCM.Steps,System.Rev`;
2601
2644
  const { value: testCases } = await tfs_1.TFSServices.getItemContent(url, this.token);
2602
2645
  return testCases;
2603
2646
  }
@@ -2639,14 +2682,35 @@ class ResultDataProvider {
2639
2682
  }
2640
2683
  return fields;
2641
2684
  }
2685
+ /**
2686
+ * Reads a field value by reference name with case-insensitive key matching.
2687
+ */
2688
+ getFieldValueByName(fields, fieldName) {
2689
+ if (!fields || typeof fields !== 'object')
2690
+ return undefined;
2691
+ if (Object.prototype.hasOwnProperty.call(fields, fieldName)) {
2692
+ return fields[fieldName];
2693
+ }
2694
+ const lookupName = String(fieldName || '').toLowerCase().trim();
2695
+ if (!lookupName)
2696
+ return undefined;
2697
+ const matchedKey = Object.keys(fields).find((key) => String(key || '').toLowerCase().trim() === lookupName);
2698
+ return matchedKey ? fields[matchedKey] : undefined;
2699
+ }
2642
2700
  resolveSuiteTestCaseRevision(testCaseItem) {
2643
- var _a, _b, _c, _d, _e;
2701
+ var _a, _b, _c, _d, _e, _f, _g;
2702
+ const fieldsFromList = this.extractWorkItemFieldsMap((_a = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _a === void 0 ? void 0 : _a.workItemFields);
2703
+ const fieldsFromMap = ((_b = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _b === void 0 ? void 0 : _b.fields) || {};
2704
+ const systemRevFromList = this.getFieldValueByName(fieldsFromList, 'System.Rev');
2705
+ const systemRevFromMap = this.getFieldValueByName(fieldsFromMap, 'System.Rev');
2644
2706
  const revisionCandidates = [
2645
- (_a = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _a === void 0 ? void 0 : _a.rev,
2646
- (_b = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _b === void 0 ? void 0 : _b.revision,
2647
- (_c = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _c === void 0 ? void 0 : _c.version,
2648
- (_d = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _d === void 0 ? void 0 : _d.workItemRevision,
2649
- (_e = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _e === void 0 ? void 0 : _e.workItemVersion,
2707
+ systemRevFromList,
2708
+ systemRevFromMap,
2709
+ (_c = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _c === void 0 ? void 0 : _c.rev,
2710
+ (_d = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _d === void 0 ? void 0 : _d.revision,
2711
+ (_e = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _e === void 0 ? void 0 : _e.version,
2712
+ (_f = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _f === void 0 ? void 0 : _f.workItemRevision,
2713
+ (_g = testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItem) === null || _g === void 0 ? void 0 : _g.workItemVersion,
2650
2714
  testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.revision,
2651
2715
  testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItemRevision,
2652
2716
  testCaseItem === null || testCaseItem === void 0 ? void 0 : testCaseItem.workItemVersion,
@@ -2693,13 +2757,19 @@ class ResultDataProvider {
2693
2757
  return null;
2694
2758
  const expandParam = expandAll ? '?$expand=all' : '';
2695
2759
  const url = `${this.orgUrl}${projectName}/_apis/wit/workItems/${id}/revisions/${rev}${expandParam}`;
2696
- try {
2697
- return await tfs_1.TFSServices.getItemContent(url, this.token);
2698
- }
2699
- catch (error) {
2700
- logger_1.default.warn(`Failed to fetch work item ${id} by revision ${rev}: ${(error === null || error === void 0 ? void 0 : error.message) || error}`);
2760
+ return this.fetchWorkItemByUrl(url, `work item ${id} by revision ${rev}`);
2761
+ }
2762
+ async fetchWorkItemByAsOf(projectName, workItemId, asOfTimestamp, expandAll = false) {
2763
+ const id = Number(workItemId || 0);
2764
+ const parsedAsOf = new Date(String(asOfTimestamp || '').trim());
2765
+ if (!Number.isFinite(id) || id <= 0 || Number.isNaN(parsedAsOf.getTime()))
2701
2766
  return null;
2767
+ const query = [`asOf=${encodeURIComponent(parsedAsOf.toISOString())}`];
2768
+ if (expandAll) {
2769
+ query.push(`$expand=all`);
2702
2770
  }
2771
+ const url = `${this.orgUrl}${projectName}/_apis/wit/workItems/${id}?${query.join('&')}`;
2772
+ return this.fetchWorkItemByUrl(url, `work item ${id} by asOf ${parsedAsOf.toISOString()}`);
2703
2773
  }
2704
2774
  async fetchWorkItemLatest(projectName, workItemId, expandAll = false) {
2705
2775
  const id = Number(workItemId || 0);
@@ -2707,14 +2777,37 @@ class ResultDataProvider {
2707
2777
  return null;
2708
2778
  const expandParam = expandAll ? '?$expand=all' : '';
2709
2779
  const url = `${this.orgUrl}${projectName}/_apis/wit/workItems/${id}${expandParam}`;
2780
+ return this.fetchWorkItemByUrl(url, `latest work item ${id}`);
2781
+ }
2782
+ /**
2783
+ * Executes a work-item GET by URL and applies consistent warning/error handling.
2784
+ */
2785
+ async fetchWorkItemByUrl(url, failureContext) {
2710
2786
  try {
2711
2787
  return await tfs_1.TFSServices.getItemContent(url, this.token);
2712
2788
  }
2713
2789
  catch (error) {
2714
- logger_1.default.warn(`Failed to fetch latest work item ${id}: ${(error === null || error === void 0 ? void 0 : error.message) || error}`);
2790
+ logger_1.default.warn(`Failed to fetch ${failureContext}: ${(error === null || error === void 0 ? void 0 : error.message) || error}`);
2715
2791
  return null;
2716
2792
  }
2717
2793
  }
2794
+ /**
2795
+ * Resolves runless test case data using ordered fallbacks:
2796
+ * 1) point-based `asOf` snapshot, 2) explicit revision, 3) suite payload snapshot, 4) latest WI.
2797
+ */
2798
+ async resolveRunlessTestCaseData(projectName, testCaseId, suiteTestCaseRevision, pointAsOfTimestamp, fallbackSnapshot, expandAll) {
2799
+ if (pointAsOfTimestamp) {
2800
+ const asOfSnapshot = await this.fetchWorkItemByAsOf(projectName, testCaseId, pointAsOfTimestamp, expandAll);
2801
+ if (asOfSnapshot)
2802
+ return asOfSnapshot;
2803
+ }
2804
+ const revisionSnapshot = await this.fetchWorkItemByRevision(projectName, testCaseId, suiteTestCaseRevision, expandAll);
2805
+ if (revisionSnapshot)
2806
+ return revisionSnapshot;
2807
+ if (fallbackSnapshot)
2808
+ return fallbackSnapshot;
2809
+ return this.fetchWorkItemLatest(projectName, testCaseId, expandAll);
2810
+ }
2718
2811
  /**
2719
2812
  * Fetches result data based on the Work Item Test Reporter.
2720
2813
  *
@@ -2729,7 +2822,7 @@ class ResultDataProvider {
2729
2822
  * @param isQueryMode - (Optional) A flag indicating whether the result data is being fetched in query mode.
2730
2823
  * @returns A promise that resolves to the fetched result data.
2731
2824
  */
2732
- async fetchResultDataBasedOnWiBase(projectName, runId, resultId, isTestReporter = false, selectedFields, isQueryMode, point, includeAllHistory = false) {
2825
+ async fetchResultDataBasedOnWiBase(projectName, runId, resultId, isTestReporter = false, selectedFields, isQueryMode, point, includeAllHistory = false, useRunlessAsOf = false) {
2733
2826
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2734
2827
  try {
2735
2828
  let filteredFields = {};
@@ -2744,14 +2837,11 @@ class ResultDataProvider {
2744
2837
  const suiteTestCaseItem = point === null || point === void 0 ? void 0 : point.suiteTestCase;
2745
2838
  const testCaseId = Number((point === null || point === void 0 ? void 0 : point.testCaseId) || ((_a = suiteTestCaseItem === null || suiteTestCaseItem === void 0 ? void 0 : suiteTestCaseItem.workItem) === null || _a === void 0 ? void 0 : _a.id) || (suiteTestCaseItem === null || suiteTestCaseItem === void 0 ? void 0 : suiteTestCaseItem.testCaseId) || 0);
2746
2839
  const suiteTestCaseRevision = this.resolveSuiteTestCaseRevision(suiteTestCaseItem);
2840
+ const pointAsOfTimestamp = useRunlessAsOf
2841
+ ? String((point === null || point === void 0 ? void 0 : point.pointAsOfTimestamp) || '').trim()
2842
+ : '';
2747
2843
  const fallbackSnapshot = this.buildWorkItemSnapshotFromSuiteTestCase(suiteTestCaseItem, testCaseId, String((point === null || point === void 0 ? void 0 : point.testCaseName) || ''));
2748
- let testCaseData = await this.fetchWorkItemByRevision(projectName, testCaseId, suiteTestCaseRevision, isTestReporter);
2749
- if (!testCaseData) {
2750
- testCaseData = fallbackSnapshot;
2751
- }
2752
- if (!testCaseData) {
2753
- testCaseData = await this.fetchWorkItemLatest(projectName, testCaseId, isTestReporter);
2754
- }
2844
+ const testCaseData = await this.resolveRunlessTestCaseData(projectName, testCaseId, suiteTestCaseRevision, pointAsOfTimestamp, fallbackSnapshot, isTestReporter);
2755
2845
  if (!testCaseData) {
2756
2846
  logger_1.default.warn(`Could not resolve test case ${point.testCaseId} for runless point fallback.`);
2757
2847
  return null;
@@ -4027,8 +4117,8 @@ class ResultDataProvider {
4027
4117
  * @param selectedFields - (Optional) An array of field names to include in the result data.
4028
4118
  * @returns A promise that resolves to the fetched result data.
4029
4119
  */
4030
- async fetchResultDataBasedOnWiTestReporter(projectName, runId, resultId, selectedFields, isQueryMode, point, includeAllHistory = false) {
4031
- return this.fetchResultDataBasedOnWiBase(projectName, runId, resultId, true, selectedFields, isQueryMode, point, includeAllHistory);
4120
+ async fetchResultDataBasedOnWiTestReporter(projectName, runId, resultId, selectedFields, isQueryMode, point, includeAllHistory = false, useRunlessAsOf = false) {
4121
+ return this.fetchResultDataBasedOnWiBase(projectName, runId, resultId, true, selectedFields, isQueryMode, point, includeAllHistory, useRunlessAsOf);
4032
4122
  }
4033
4123
  /**
4034
4124
  * Fetches all result data for the test reporter by processing the provided test data.
@@ -4042,8 +4132,8 @@ class ResultDataProvider {
4042
4132
  * @param selectedFields - An optional array of field names to include in the result data.
4043
4133
  * @returns A promise that resolves to an array of processed result data.
4044
4134
  */
4045
- async fetchAllResultDataTestReporter(testData, projectName, selectedFields, isQueryMode, includeAllHistory = false) {
4046
- return this.fetchAllResultDataBase(testData, projectName, true, (projectName, testSuiteId, point, selectedFields, isQueryMode, includeAllHistory) => this.fetchResultDataForTestReporter(projectName, testSuiteId, point, selectedFields, isQueryMode, includeAllHistory), [selectedFields, isQueryMode, includeAllHistory]);
4135
+ async fetchAllResultDataTestReporter(testData, projectName, selectedFields, isQueryMode, includeAllHistory = false, useRunlessAsOf = false) {
4136
+ return this.fetchAllResultDataBase(testData, projectName, true, (projectName, testSuiteId, point, selectedFields, isQueryMode, includeAllHistory, useRunlessAsOf) => this.fetchResultDataForTestReporter(projectName, testSuiteId, point, selectedFields, isQueryMode, includeAllHistory, useRunlessAsOf), [selectedFields, isQueryMode, includeAllHistory, useRunlessAsOf]);
4047
4137
  }
4048
4138
  /**
4049
4139
  * Aligns test steps with iterations for the test reporter by processing test data and iterations
@@ -4151,8 +4241,8 @@ class ResultDataProvider {
4151
4241
  * @returns A promise that resolves to the formatted result data object containing details about the test case,
4152
4242
  * test suite, last run, iteration, and other selected fields.
4153
4243
  */
4154
- async fetchResultDataForTestReporter(projectName, testSuiteId, point, selectedFields, isQueryMode, includeAllHistory = false) {
4155
- return this.fetchResultDataBase(projectName, testSuiteId, point, (project, runId, resultId, fields, isQueryMode, point, includeAllHistory) => this.fetchResultDataBasedOnWiTestReporter(project, runId, resultId, fields, isQueryMode, point, includeAllHistory), (resultData, testSuiteId, point, selectedFields) => {
4244
+ async fetchResultDataForTestReporter(projectName, testSuiteId, point, selectedFields, isQueryMode, includeAllHistory = false, useRunlessAsOf = false) {
4245
+ return this.fetchResultDataBase(projectName, testSuiteId, point, (project, runId, resultId, fields, isQueryMode, point, includeAllHistory, useRunlessAsOf) => this.fetchResultDataBasedOnWiTestReporter(project, runId, resultId, fields, isQueryMode, point, includeAllHistory, useRunlessAsOf), (resultData, testSuiteId, point, selectedFields) => {
4156
4246
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
4157
4247
  const { lastRunId, lastResultId, configurationName, lastResultDetails } = point;
4158
4248
  try {
@@ -4245,7 +4335,7 @@ class ResultDataProvider {
4245
4335
  logger_1.default.error(`Error stack: ${err.stack}`);
4246
4336
  return null;
4247
4337
  }
4248
- }, [selectedFields, isQueryMode, point, includeAllHistory]);
4338
+ }, [selectedFields, isQueryMode, point, includeAllHistory, useRunlessAsOf]);
4249
4339
  }
4250
4340
  getTestOutcome(resultData) {
4251
4341
  // Default outcome if nothing else is available