@elisra-devops/docgen-data-provider 0.5.0 → 0.7.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.
Files changed (40) hide show
  1. package/bin/helpers/helper.js +22 -7
  2. package/bin/helpers/helper.js.map +1 -1
  3. package/bin/helpers/tfs.js +62 -77
  4. package/bin/helpers/tfs.js.map +1 -1
  5. package/bin/index.d.ts +3 -1
  6. package/bin/index.js +17 -31
  7. package/bin/index.js.map +1 -1
  8. package/bin/models/tfs-data.d.ts +3 -3
  9. package/bin/models/tfs-data.js +54 -17
  10. package/bin/models/tfs-data.js.map +1 -1
  11. package/bin/modules/GitDataProvider.js +213 -259
  12. package/bin/modules/GitDataProvider.js.map +1 -1
  13. package/bin/modules/MangementDataProvider.js +26 -43
  14. package/bin/modules/MangementDataProvider.js.map +1 -1
  15. package/bin/modules/PipelinesDataProvider.js +57 -82
  16. package/bin/modules/PipelinesDataProvider.js.map +1 -1
  17. package/bin/modules/ResultDataProvider.d.ts +106 -0
  18. package/bin/modules/ResultDataProvider.js +530 -0
  19. package/bin/modules/ResultDataProvider.js.map +1 -0
  20. package/bin/modules/TestDataProvider.js +196 -236
  21. package/bin/modules/TestDataProvider.js.map +1 -1
  22. package/bin/modules/TicketsDataProvider.d.ts +8 -2
  23. package/bin/modules/TicketsDataProvider.js +301 -301
  24. package/bin/modules/TicketsDataProvider.js.map +1 -1
  25. package/bin/modules/test/gitDataProvider.test.js +67 -76
  26. package/bin/modules/test/gitDataProvider.test.js.map +1 -1
  27. package/bin/modules/test/managmentDataProvider.test.js +16 -25
  28. package/bin/modules/test/managmentDataProvider.test.js.map +1 -1
  29. package/bin/modules/test/pipelineDataProvider.test.js +32 -41
  30. package/bin/modules/test/pipelineDataProvider.test.js.map +1 -1
  31. package/bin/modules/test/testDataProvider.test.js +56 -65
  32. package/bin/modules/test/testDataProvider.test.js.map +1 -1
  33. package/bin/modules/test/ticketsDataProvider.test.js +39 -48
  34. package/bin/modules/test/ticketsDataProvider.test.js.map +1 -1
  35. package/package.json +17 -11
  36. package/src/index.ts +19 -15
  37. package/src/modules/ResultDataProvider.ts +642 -0
  38. package/src/modules/TestDataProvider.ts +1 -0
  39. package/src/modules/TicketsDataProvider.ts +137 -164
  40. package/tsconfig.json +2 -2
@@ -0,0 +1,530 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tfs_1 = require("../helpers/tfs");
4
+ const tfs_data_1 = require("../models/tfs-data");
5
+ const xml2js = require("xml2js");
6
+ const logger_1 = require("../utils/logger");
7
+ class ResultDataProvider {
8
+ orgUrl = '';
9
+ token = '';
10
+ constructor(orgUrl, token) {
11
+ this.orgUrl = orgUrl;
12
+ this.token = token;
13
+ }
14
+ /**
15
+ * Retrieves test suites by test plan ID and processes them into a flat structure with hierarchy names.
16
+ */
17
+ async fetchTestSuites(testPlanId, projectName, selectedSuiteIds, isHierarchyGroupName = true) {
18
+ try {
19
+ const treeUrl = `${this.orgUrl}${projectName}/_apis/testplan/Plans/${testPlanId}/Suites?asTreeView=true`;
20
+ const { value: treeTestSuites, count: treeCount } = await tfs_1.TFSServices.getItemContent(treeUrl, this.token);
21
+ if (treeCount === 0)
22
+ throw new Error('No test suites found');
23
+ const flatTestSuites = this.flattenSuites(treeTestSuites);
24
+ const filteredSuites = this.filterSuites(flatTestSuites, selectedSuiteIds);
25
+ const suiteMap = this.createSuiteMap(treeTestSuites);
26
+ return filteredSuites.map((testSuite) => ({
27
+ testSuiteId: testSuite.id,
28
+ testGroupName: this.buildTestGroupName(testSuite.id, suiteMap, isHierarchyGroupName),
29
+ }));
30
+ }
31
+ catch (error) {
32
+ logger_1.default.error(`Error during fetching Test Suites: ${error.message}`);
33
+ return [];
34
+ }
35
+ }
36
+ /**
37
+ * Flattens a hierarchical suite structure into a single-level array.
38
+ */
39
+ flattenSuites(suites) {
40
+ const flatSuites = [];
41
+ const flatten = (suites) => {
42
+ suites.forEach((suite) => {
43
+ flatSuites.push(suite);
44
+ if (suite.children)
45
+ flatten(suite.children);
46
+ });
47
+ };
48
+ flatten(suites);
49
+ return flatSuites;
50
+ }
51
+ /**
52
+ * Filters test suites based on the selected suite IDs.
53
+ */
54
+ filterSuites(testSuites, selectedSuiteIds) {
55
+ return selectedSuiteIds
56
+ ? testSuites.filter((suite) => selectedSuiteIds.includes(suite.id))
57
+ : testSuites.filter((suite) => suite.parentSuite);
58
+ }
59
+ /**
60
+ * Creates a quick-lookup map of suites by their IDs.
61
+ */
62
+ createSuiteMap(suites) {
63
+ const suiteMap = new Map();
64
+ const addToMap = (suites) => {
65
+ suites.forEach((suite) => {
66
+ suiteMap.set(suite.id, suite);
67
+ if (suite.children)
68
+ addToMap(suite.children);
69
+ });
70
+ };
71
+ addToMap(suites);
72
+ return suiteMap;
73
+ }
74
+ /**
75
+ * Constructs the test group name using a hierarchical format.
76
+ */
77
+ buildTestGroupName(suiteId, suiteMap, isHierarchyGroupName) {
78
+ if (!isHierarchyGroupName)
79
+ return suiteMap.get(suiteId)?.name || '';
80
+ let currentSuite = suiteMap.get(suiteId);
81
+ let path = currentSuite?.name || '';
82
+ while (currentSuite?.parentSuite) {
83
+ const parentSuite = suiteMap.get(currentSuite.parentSuite.id);
84
+ if (!parentSuite)
85
+ break;
86
+ path = `${parentSuite.name}/${path}`;
87
+ currentSuite = parentSuite;
88
+ }
89
+ const parts = path.split('/');
90
+ return parts.length > 3
91
+ ? `${parts[1]}/.../${parts[parts.length - 1]}`
92
+ : `${parts[1]}/${parts[parts.length - 1]}`;
93
+ }
94
+ /**
95
+ * Fetches test points by suite ID.
96
+ */
97
+ async fetchTestPoints(projectName, testPlanId, testSuiteId) {
98
+ try {
99
+ const url = `${this.orgUrl}${projectName}/_apis/testplan/Plans/${testPlanId}/Suites/${testSuiteId}/TestPoint?includePointDetails=true`;
100
+ const { value: testPoints, count } = await tfs_1.TFSServices.getItemContent(url, this.token);
101
+ return count !== 0 ? testPoints.map(this.mapTestPoint) : [];
102
+ }
103
+ catch (error) {
104
+ logger_1.default.error(`Error during fetching Test Points: ${error.message}`);
105
+ return [];
106
+ }
107
+ }
108
+ /**
109
+ * Maps raw test point data to a simplified object.
110
+ */
111
+ mapTestPoint(testPoint) {
112
+ return {
113
+ testCaseId: testPoint.testCaseReference.id,
114
+ testCaseName: testPoint.testCaseReference.name,
115
+ configurationName: testPoint.configuration?.name,
116
+ outcome: testPoint.results?.outcome,
117
+ lastRunId: testPoint.results?.lastTestRunId,
118
+ lastResultId: testPoint.results?.lastResultId,
119
+ };
120
+ }
121
+ /**
122
+ * Fetches test cases by suite ID.
123
+ */
124
+ async fetchTestCasesBySuiteId(projectName, testPlanId, suiteId) {
125
+ const url = `${this.orgUrl}${projectName}/_apis/testplan/Plans/${testPlanId}/Suites/${suiteId}/TestCase?witFields=Microsoft.VSTS.TCM.Steps`;
126
+ const { value: testCases } = await tfs_1.TFSServices.getItemContent(url, this.token);
127
+ return testCases;
128
+ }
129
+ /**
130
+ * Fetches iterations data by run and result IDs.
131
+ */
132
+ async fetchIterations(projectName, runId, resultId) {
133
+ const url = `${this.orgUrl}${projectName}/_apis/test/runs/${runId}/Results/${resultId}/iterations`;
134
+ const { value: iterations } = await tfs_1.TFSServices.getItemContent(url, this.token);
135
+ return iterations;
136
+ }
137
+ /**
138
+ * Converts run status from API format to a more readable format.
139
+ */
140
+ convertRunStatus(status) {
141
+ switch (status) {
142
+ case 'passed':
143
+ return 'Passed';
144
+ case 'failed':
145
+ return 'Failed';
146
+ case 'notApplicable':
147
+ return 'Not Applicable';
148
+ default:
149
+ return 'Unspecified';
150
+ }
151
+ }
152
+ /**
153
+ * Parses test steps from XML format into a structured array.
154
+ */
155
+ parseTestSteps(xmlSteps) {
156
+ const stepsList = [];
157
+ xml2js.parseString(xmlSteps, { explicitArray: false }, (err, result) => {
158
+ if (err) {
159
+ logger_1.default.warn('Failed to parse XML test steps.');
160
+ return;
161
+ }
162
+ const stepsArray = Array.isArray(result.steps?.step) ? result.steps.step : [result.steps?.step];
163
+ stepsArray.forEach((stepObj) => {
164
+ const step = new tfs_data_1.TestSteps();
165
+ step.action = stepObj.parameterizedString?.[0]?._ || '';
166
+ step.expected = stepObj.parameterizedString?.[1]?._ || '';
167
+ stepsList.push(step);
168
+ });
169
+ });
170
+ return stepsList;
171
+ }
172
+ /**
173
+ * Aligns test steps with their corresponding iterations.
174
+ */
175
+ alignStepsWithIterations(testData, iterations) {
176
+ const detailedResults = [];
177
+ const iterationsMap = this.createIterationsMap(iterations);
178
+ for (const testItem of testData) {
179
+ for (const point of testItem.testPointsItems) {
180
+ const testCase = testItem.testCasesItems.find((tc) => tc.workItem.id === point.testCaseId);
181
+ if (!testCase)
182
+ continue;
183
+ const steps = this.parseTestSteps(testCase.workItem.workItemFields[0]['Microsoft.VSTS.TCM.Steps']);
184
+ const iterationKey = `${point.lastRunId}-${point.lastResultId}`;
185
+ const iteration = iterationsMap[iterationKey]?.iteration;
186
+ if (!iteration)
187
+ continue;
188
+ for (const actionResult of iteration.actionResults) {
189
+ const stepIndex = parseInt(actionResult.stepIdentifier, 10) - 2;
190
+ if (!steps[stepIndex])
191
+ continue;
192
+ // const actionPath = actionResult.actionPath;
193
+ // const testStepAttachments = iteration.attachments.find(
194
+ // (attachment: any) => attachment.actionPath === actionPath
195
+ // );
196
+ detailedResults.push({
197
+ testId: point.testCaseId,
198
+ testName: point.testCaseName,
199
+ stepNo: stepIndex + 1,
200
+ stepAction: steps[stepIndex].action,
201
+ stepExpected: steps[stepIndex].expected,
202
+ stepStatus: actionResult.outcome !== 'Unspecified' ? actionResult.outcome : '',
203
+ stepComments: actionResult.errorMessage || '',
204
+ });
205
+ }
206
+ }
207
+ }
208
+ //Filter out all the results with no comment
209
+ return detailedResults.filter((result) => result.stepComments !== '' || result.stepStatus === 'Failed');
210
+ }
211
+ /**
212
+ * Creates a mapping of iterations by their unique keys.
213
+ */
214
+ createIterationsMap(iterations) {
215
+ return iterations.reduce((map, iterationItem) => {
216
+ if (iterationItem.iteration) {
217
+ const key = `${iterationItem.lastRunId}-${iterationItem.lastResultId}`;
218
+ map[key] = iterationItem;
219
+ }
220
+ return map;
221
+ }, {});
222
+ }
223
+ /**
224
+ * Fetches test data for all suites, including test points and test cases.
225
+ */
226
+ async fetchTestData(suites, projectName, testPlanId) {
227
+ return Promise.all(suites.map((suite) => Promise.all([
228
+ this.fetchTestPoints(projectName, testPlanId, suite.testSuiteId),
229
+ this.fetchTestCasesBySuiteId(projectName, testPlanId, suite.testSuiteId),
230
+ ])
231
+ .then(([testPointsItems, testCasesItems]) => ({ ...suite, testPointsItems, testCasesItems }))
232
+ .catch((error) => {
233
+ logger_1.default.error(`Error occurred for suite ${suite.testSuiteId}: ${error.message}`);
234
+ return suite;
235
+ })));
236
+ }
237
+ /**
238
+ * Fetches iterations for all test points within the given test data.
239
+ */
240
+ async fetchAllIterations(testData, projectName) {
241
+ const pointsToFetch = testData
242
+ .filter((item) => item.testPointsItems && item.testPointsItems.length > 0)
243
+ .flatMap((item) => {
244
+ const { testSuiteId, testPointsItems } = item;
245
+ const validPoints = testPointsItems.filter((point) => point.lastRunId && point.lastResultId);
246
+ return validPoints.map((point) => this.fetchIterationData(projectName, testSuiteId, point));
247
+ });
248
+ return Promise.all(pointsToFetch);
249
+ }
250
+ /**
251
+ * Fetches iteration data for a specific test point.
252
+ */
253
+ async fetchIterationData(projectName, testSuiteId, point) {
254
+ const { lastRunId, lastResultId } = point;
255
+ const iterations = await this.fetchIterations(projectName, lastRunId.toString(), lastResultId.toString());
256
+ return {
257
+ testSuiteId,
258
+ lastRunId,
259
+ lastResultId,
260
+ //Currently supporting only the
261
+ iteration: iterations.length > 0 ? iterations[iterations.length - 1] : undefined,
262
+ };
263
+ }
264
+ /**
265
+ * Fetching all the linked wi for the given test case
266
+ * @param testCaseId Test case id number
267
+ * @returns Array of linked Work items
268
+ */
269
+ async fetchLinkedWi(project, testCaseId) {
270
+ try {
271
+ // Construct the base URL and fetch linked work items
272
+ const vstmrUrl = new URL(this.orgUrl);
273
+ vstmrUrl.hostname = 'vstmr.dev.azure.com';
274
+ const getLinkedWiUrl = `${vstmrUrl.toString()}${project}/_apis/testresults/results/workitems?workItemCategory=all&testCaseId=${testCaseId}`;
275
+ // Fetch linked work items
276
+ const { value: linkedWorkItems } = await tfs_1.TFSServices.getItemContent(getLinkedWiUrl, this.token);
277
+ // Check if linkedWorkItems is an array
278
+ if (!Array.isArray(linkedWorkItems)) {
279
+ throw new Error('Unexpected format for linked work items data');
280
+ }
281
+ if (linkedWorkItems.length === 0) {
282
+ return [];
283
+ }
284
+ // Prepare list of work item IDs
285
+ const idsString = linkedWorkItems.map((item) => item.id).join(',');
286
+ // Construct URL to fetch work item details
287
+ const getWiDataUrl = `${this.orgUrl.toString()}${project}/_apis/wit/workItems?ids=${idsString}&$expand=1`;
288
+ // Fetch work item details
289
+ const { value: wi } = await tfs_1.TFSServices.getItemContent(getWiDataUrl, this.token);
290
+ // Validate response and return formatted data
291
+ if (!Array.isArray(wi)) {
292
+ throw new Error('Unexpected format for work items data');
293
+ }
294
+ //Filter out wi in Closed or resolved states
295
+ const filteredWi = wi.filter(({ fields }) => {
296
+ const { 'System.WorkItemType': workItemType, 'System.State': state } = fields;
297
+ return ((workItemType === 'Change Request' || workItemType === 'Bug') &&
298
+ state !== 'Closed' &&
299
+ state !== 'Resolved');
300
+ });
301
+ return filteredWi?.length > 0 ? this.MapLinkedWorkItem(filteredWi, project) : [];
302
+ }
303
+ catch (error) {
304
+ logger_1.default.error('Error fetching linked work items:', error);
305
+ return []; // Return an empty array or handle it as needed
306
+ }
307
+ }
308
+ /**
309
+ * Mapping the linked work item of the OpenPcr table
310
+ * @param wis Work item list
311
+ * @param project
312
+ * @returns array of mapped workitems
313
+ */
314
+ MapLinkedWorkItem(wis, project) {
315
+ return wis.map((item) => {
316
+ const { id, fields } = item;
317
+ return {
318
+ pcrId: id,
319
+ workItemType: fields['System.WorkItemType'],
320
+ title: fields['System.Title'],
321
+ severity: fields['Microsoft.VSTS.Common.Severity'] || '',
322
+ pcrUrl: `${this.orgUrl}${project}/_workitems/edit/${id}`,
323
+ };
324
+ });
325
+ }
326
+ /**
327
+ * Fetching Open PCRs data
328
+ */
329
+ async fetchOpenPcrData(testItems, projectName, combinedResults) {
330
+ const linkedWorkItemsPromises = testItems.map((summaryItem) => this.fetchLinkedWi(projectName, summaryItem.testId)
331
+ .then((linkItems) => ({
332
+ ...summaryItem,
333
+ linkItems,
334
+ }))
335
+ .catch((error) => {
336
+ logger_1.default.error(`Error occurred for testCase ${summaryItem.testId}: ${error.message}`);
337
+ return { ...summaryItem, linkItems: [] };
338
+ }));
339
+ const linkedWorkItems = await Promise.all(linkedWorkItemsPromises);
340
+ const flatOpenPcrsItems = linkedWorkItems
341
+ .filter((item) => item.linkItems.length > 0)
342
+ .flatMap((item) => {
343
+ const { linkItems, ...restItem } = item;
344
+ return linkItems.map((linkedItem) => ({ ...restItem, ...linkedItem }));
345
+ });
346
+ if (flatOpenPcrsItems?.length > 0) {
347
+ // Add openPCR to combined results
348
+ combinedResults.push({
349
+ contentControl: 'open-pcr-content-control',
350
+ data: flatOpenPcrsItems,
351
+ skin: 'open-pcr-table',
352
+ });
353
+ }
354
+ }
355
+ /**
356
+ * Combines the results of test group result summary, test results summary, and detailed results summary into a single key-value pair array.
357
+ */
358
+ async getCombinedResultsSummary(testPlanId, projectName, selectedSuiteIds, addConfiguration = false, isHierarchyGroupName = false, includeOpenPCRs = false, includeTestLog = false) {
359
+ const combinedResults = [];
360
+ //TODO: add support for fetching all the data of the attachments
361
+ try {
362
+ // Fetch test suites
363
+ const suites = await this.fetchTestSuites(testPlanId, projectName, selectedSuiteIds, isHierarchyGroupName);
364
+ // Prepare test data for summaries
365
+ const testPointsPromises = suites.map((suite) => this.fetchTestPoints(projectName, testPlanId, suite.testSuiteId)
366
+ .then((testPointsItems) => ({ ...suite, testPointsItems }))
367
+ .catch((error) => {
368
+ logger_1.default.error(`Error occurred for suite ${suite.testSuiteId}: ${error.message}`);
369
+ return { ...suite, testPointsItems: [] };
370
+ }));
371
+ const testPoints = await Promise.all(testPointsPromises);
372
+ // 1. Calculate Test Group Result Summary
373
+ const summarizedResults = testPoints
374
+ .filter((testPoint) => testPoint.testPointsItems && testPoint.testPointsItems.length > 0)
375
+ .map((testPoint) => {
376
+ const groupResultSummary = this.calculateGroupResultSummary(testPoint.testPointsItems || []);
377
+ return { ...testPoint, groupResultSummary };
378
+ });
379
+ const totalSummary = this.calculateTotalSummary(summarizedResults);
380
+ const testGroupArray = summarizedResults.map((item) => ({
381
+ testGroupName: item.testGroupName,
382
+ ...item.groupResultSummary,
383
+ }));
384
+ testGroupArray.push({ testGroupName: 'Total', ...totalSummary });
385
+ // Add test group result summary to combined results
386
+ combinedResults.push({
387
+ contentControl: 'test-group-summary-content-control',
388
+ data: testGroupArray,
389
+ skin: 'test-result-test-group-summary-table',
390
+ });
391
+ // 2. Calculate Test Results Summary
392
+ const flattenedTestPoints = this.flattenTestPoints(testPoints);
393
+ const testResultsSummary = flattenedTestPoints.map((testPoint) => this.formatTestResult(testPoint, addConfiguration));
394
+ // Add test results summary to combined results
395
+ combinedResults.push({
396
+ contentControl: 'test-result-summary-content-control',
397
+ data: testResultsSummary,
398
+ skin: 'test-result-table',
399
+ });
400
+ // 3. Calculate Detailed Results Summary
401
+ const testData = await this.fetchTestData(suites, projectName, testPlanId);
402
+ const iterations = await this.fetchAllIterations(testData, projectName);
403
+ const detailedResultsSummary = this.alignStepsWithIterations(testData, iterations);
404
+ // Add detailed results summary to combined results
405
+ combinedResults.push({
406
+ contentControl: 'detailed-test-result-content-control',
407
+ data: detailedResultsSummary,
408
+ skin: 'detailed-test-result-table',
409
+ });
410
+ /* TODO: Add it later after the design of the appendix... also add the add attachment boolean here to see its needed or not...
411
+ //4. Fetch all attachment data
412
+ const iterationDataForAttachments = iterations.map((iterationItem) => {
413
+ return {
414
+ suiteId: iterationItem.suiteId,
415
+ runId: iterationItem.lastRunId,
416
+ resultId: iterationItem.lastResultId,
417
+ iteration: iterationItem.iteration,
418
+ };
419
+ });
420
+
421
+ combinedResults.push({
422
+ contentControl: 'str-attachment',
423
+ data: iterationDataForAttachments,
424
+ skin: 'test-run-attachment-list',
425
+ });
426
+ */
427
+ if (includeOpenPCRs) {
428
+ //5. Open PCRs data (only if enabled)
429
+ await this.fetchOpenPcrData(testResultsSummary, projectName, combinedResults);
430
+ }
431
+ //6. Test Log (only if enabled)
432
+ if (includeTestLog) {
433
+ //TODO: implement Test log data fetching
434
+ }
435
+ return combinedResults;
436
+ }
437
+ catch (error) {
438
+ logger_1.default.error(`Error during getCombinedResultsSummary: ${error.message}`);
439
+ return combinedResults; // Return whatever is computed even in case of error
440
+ }
441
+ }
442
+ /**
443
+ * Calculates a summary of test group results.
444
+ */
445
+ calculateGroupResultSummary(testPointsItems) {
446
+ const summary = {
447
+ passed: 0,
448
+ failed: 0,
449
+ notApplicable: 0,
450
+ blocked: 0,
451
+ notRun: 0,
452
+ total: testPointsItems.length,
453
+ successPercentage: '0.00%',
454
+ };
455
+ testPointsItems.forEach((item) => {
456
+ switch (item.outcome) {
457
+ case 'passed':
458
+ summary.passed++;
459
+ break;
460
+ case 'failed':
461
+ summary.failed++;
462
+ break;
463
+ case 'notApplicable':
464
+ summary.notApplicable++;
465
+ break;
466
+ case 'blocked':
467
+ summary.blocked++;
468
+ break;
469
+ default:
470
+ summary.notRun++;
471
+ }
472
+ });
473
+ summary.successPercentage =
474
+ summary.total > 0 ? `${((summary.passed / summary.total) * 100).toFixed(2)}%` : '0.00%';
475
+ return summary;
476
+ }
477
+ /**
478
+ * Calculates the total summary of all test group results.
479
+ */
480
+ calculateTotalSummary(results) {
481
+ const totalSummary = results.reduce((acc, { groupResultSummary }) => {
482
+ acc.passed += groupResultSummary.passed;
483
+ acc.failed += groupResultSummary.failed;
484
+ acc.notApplicable += groupResultSummary.notApplicable;
485
+ acc.blocked += groupResultSummary.blocked;
486
+ acc.notRun += groupResultSummary.notRun;
487
+ acc.total += groupResultSummary.total;
488
+ return acc;
489
+ }, {
490
+ passed: 0,
491
+ failed: 0,
492
+ notApplicable: 0,
493
+ blocked: 0,
494
+ notRun: 0,
495
+ total: 0,
496
+ successPercentage: '0.00%',
497
+ });
498
+ totalSummary.successPercentage =
499
+ totalSummary.total > 0 ? `${((totalSummary.passed / totalSummary.total) * 100).toFixed(2)}%` : '0.00%';
500
+ return totalSummary;
501
+ }
502
+ /**
503
+ * Flattens the test points for easier access.
504
+ */
505
+ flattenTestPoints(testPoints) {
506
+ return testPoints
507
+ .filter((point) => point.testPointsItems && point.testPointsItems.length > 0)
508
+ .flatMap((point) => {
509
+ const { testPointsItems, ...restOfPoint } = point;
510
+ return testPointsItems.map((item) => ({ ...restOfPoint, ...item }));
511
+ });
512
+ }
513
+ /**
514
+ * Formats a test result for display.
515
+ */
516
+ formatTestResult(testPoint, addConfiguration) {
517
+ const formattedResult = {
518
+ testGroupName: testPoint.testGroupName,
519
+ testId: testPoint.testCaseId,
520
+ testName: testPoint.testCaseName,
521
+ runStatus: this.convertRunStatus(testPoint.outcome),
522
+ };
523
+ if (addConfiguration) {
524
+ formattedResult.configuration = testPoint.configurationName;
525
+ }
526
+ return formattedResult;
527
+ }
528
+ }
529
+ exports.default = ResultDataProvider;
530
+ //# sourceMappingURL=ResultDataProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResultDataProvider.js","sourceRoot":"","sources":["../../src/modules/ResultDataProvider.ts"],"names":[],"mappings":";;AAAA,wCAA6C;AAC7C,iDAA+C;AAC/C,iCAAiC;AACjC,4CAAqC;AAGrC,MAAqB,kBAAkB;IACrC,MAAM,GAAW,EAAE,CAAC;IACpB,KAAK,GAAW,EAAE,CAAC;IAEnB,YAAY,MAAc,EAAE,KAAa;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,eAAe,CAC3B,UAAkB,EAClB,WAA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