@elisra-devops/docgen-data-provider 1.72.0 → 1.74.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.d.ts +38 -0
- package/bin/modules/ResultDataProvider.js +688 -7
- package/bin/modules/ResultDataProvider.js.map +1 -1
- package/bin/tests/modules/ResultDataProvider.test.js +438 -0
- package/bin/tests/modules/ResultDataProvider.test.js.map +1 -1
- package/package.json +1 -1
- package/src/modules/ResultDataProvider.ts +850 -7
- package/src/tests/modules/ResultDataProvider.test.ts +555 -0
|
@@ -22,6 +22,7 @@ import { OpenPcrRequest } from '../models/tfs-data';
|
|
|
22
22
|
* Instantiate the class with the organization URL and token, and use the provided methods to fetch and process test data.
|
|
23
23
|
*/
|
|
24
24
|
export default class ResultDataProvider {
|
|
25
|
+
private static readonly MEWP_L2_COVERAGE_COLUMNS;
|
|
25
26
|
orgUrl: string;
|
|
26
27
|
token: string;
|
|
27
28
|
private limit;
|
|
@@ -60,11 +61,48 @@ export default class ResultDataProvider {
|
|
|
60
61
|
planName: string;
|
|
61
62
|
rows: any[];
|
|
62
63
|
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Builds MEWP L2 requirement coverage rows for audit reporting.
|
|
66
|
+
* Rows are one Requirement-TestCase pair; uncovered requirements are emitted with empty test-case columns.
|
|
67
|
+
*/
|
|
68
|
+
getMewpL2CoverageFlatResults(testPlanId: string, projectName: string, selectedSuiteIds: number[] | undefined, linkedQueryRequest?: any): Promise<{
|
|
69
|
+
sheetName: string;
|
|
70
|
+
columnOrder: string[];
|
|
71
|
+
rows: any[];
|
|
72
|
+
}>;
|
|
63
73
|
/**
|
|
64
74
|
* Mapping each attachment to a proper URL for downloading it
|
|
65
75
|
* @param runResults Array of run results
|
|
66
76
|
*/
|
|
67
77
|
mapAttachmentsUrl(runResults: any[], project: string): any[];
|
|
78
|
+
private buildMewpCoverageSheetName;
|
|
79
|
+
private createMewpCoverageRow;
|
|
80
|
+
private buildMewpCoverageRows;
|
|
81
|
+
private buildMewpTestCaseTitleMap;
|
|
82
|
+
private extractMewpTestCaseId;
|
|
83
|
+
private buildTestCaseStepsXmlMap;
|
|
84
|
+
private extractStepsXmlFromWorkItemFields;
|
|
85
|
+
private classifyRequirementStepOutcome;
|
|
86
|
+
private accumulateRequirementCountsFromStepText;
|
|
87
|
+
private extractRequirementCodesFromText;
|
|
88
|
+
private normalizeRequirementStepText;
|
|
89
|
+
private toRequirementKey;
|
|
90
|
+
private fetchMewpL2Requirements;
|
|
91
|
+
private extractMewpQueryHref;
|
|
92
|
+
private fetchMewpL2RequirementsFromQuery;
|
|
93
|
+
private upsertMewpRequirement;
|
|
94
|
+
private hydrateMewpRequirementsFromWorkItems;
|
|
95
|
+
private getMewpWorkItemType;
|
|
96
|
+
private isMewpRequirementType;
|
|
97
|
+
private isMewpTestCaseType;
|
|
98
|
+
private fetchMewpRequirementTypeNames;
|
|
99
|
+
private fetchWorkItemsByIds;
|
|
100
|
+
private extractLinkedTestCaseIdsFromRequirement;
|
|
101
|
+
private extractMewpRequirementIdentifier;
|
|
102
|
+
private deriveMewpResponsibility;
|
|
103
|
+
private resolveMewpResponsibility;
|
|
104
|
+
private normalizeMewpRequirementCode;
|
|
105
|
+
private toMewpComparableText;
|
|
68
106
|
private fetchTestPlanName;
|
|
69
107
|
/**
|
|
70
108
|
* Fetches test suites for a given test plan and project, optionally filtering by selected suite IDs.
|