@elisra-devops/docgen-data-provider 1.46.0 → 1.48.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/helpers/helper.d.ts +5 -23
- package/bin/helpers/helper.js +48 -141
- package/bin/helpers/helper.js.map +1 -1
- package/bin/modules/TestDataProvider.d.ts +2 -2
- package/bin/modules/TestDataProvider.js +56 -11
- package/bin/modules/TestDataProvider.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/helper.ts +57 -215
- package/src/modules/TestDataProvider.ts +93 -20
package/bin/helpers/helper.d.ts
CHANGED
|
@@ -27,6 +27,9 @@ export declare class Trace {
|
|
|
27
27
|
links: Array<Links>;
|
|
28
28
|
}
|
|
29
29
|
export declare class Helper {
|
|
30
|
+
static level: number;
|
|
31
|
+
static first: boolean;
|
|
32
|
+
static suitList: Array<suiteData>;
|
|
30
33
|
/**
|
|
31
34
|
* Finds test suites recursively starting from a given suite ID
|
|
32
35
|
* @param planId - The test plan ID
|
|
@@ -35,31 +38,10 @@ export declare class Helper {
|
|
|
35
38
|
* @param suits - Array of all test suites
|
|
36
39
|
* @param foundId - Starting suite ID to search from
|
|
37
40
|
* @param recursive - Whether to search recursively or just direct children
|
|
38
|
-
* @param
|
|
41
|
+
* @param flatSuiteTestCases - If true and there's only one level 1 suite with children, flatten the hierarchy by one level
|
|
39
42
|
* @returns Array of suiteData objects representing the hierarchy
|
|
40
43
|
*/
|
|
41
|
-
static findSuitesRecursive(planId: string, url: string, project: string, suits: any[], foundId: string, recursive: boolean,
|
|
42
|
-
/**
|
|
43
|
-
* Recursively builds the suite hierarchy
|
|
44
|
-
*/
|
|
45
|
-
private static buildSuiteHierarchy;
|
|
46
|
-
/**
|
|
47
|
-
* Creates a suiteData object from a suite
|
|
48
|
-
*/
|
|
49
|
-
private static createSuiteData;
|
|
50
|
-
/**
|
|
51
|
-
* Determines if hierarchy should be flattened based on conditions:
|
|
52
|
-
* - There is exactly one level 1 suite (direct child of root)
|
|
53
|
-
* - That suite has children (level 2+ suites)
|
|
54
|
-
*/
|
|
55
|
-
private static shouldFlattenHierarchy;
|
|
56
|
-
/**
|
|
57
|
-
* Flattens the hierarchy by one level:
|
|
58
|
-
* - Removes the single level 1 suite
|
|
59
|
-
* - Promotes all level 2+ suites up by one level
|
|
60
|
-
* - Updates parentSuiteId of new level 1 suites to point to root
|
|
61
|
-
*/
|
|
62
|
-
private static flattenHierarchyByOneLevel;
|
|
44
|
+
static findSuitesRecursive(planId: string, url: string, project: string, suits: any[], foundId: string, recursive: boolean, isTopLevel?: boolean): Array<suiteData>;
|
|
63
45
|
static levelList: Array<Workitem>;
|
|
64
46
|
static LevelBuilder(results: Query, foundId: string): Array<Workitem>;
|
|
65
47
|
private static buildWorkItemHierarchy;
|
package/bin/helpers/helper.js
CHANGED
|
@@ -31,154 +31,58 @@ class Helper {
|
|
|
31
31
|
* @param suits - Array of all test suites
|
|
32
32
|
* @param foundId - Starting suite ID to search from
|
|
33
33
|
* @param recursive - Whether to search recursively or just direct children
|
|
34
|
-
* @param
|
|
34
|
+
* @param flatSuiteTestCases - If true and there's only one level 1 suite with children, flatten the hierarchy by one level
|
|
35
35
|
* @returns Array of suiteData objects representing the hierarchy
|
|
36
36
|
*/
|
|
37
|
-
static findSuitesRecursive(planId, url, project, suits, foundId, recursive,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const result = [];
|
|
44
|
-
const visited = new Set();
|
|
45
|
-
// Find the starting suite
|
|
46
|
-
const startingSuite = suiteMap.get(foundId);
|
|
47
|
-
if (!startingSuite) {
|
|
48
|
-
console.log(`[findSuitesRecursive] ERROR: Starting suite ${foundId} not found in suite map`);
|
|
49
|
-
return result;
|
|
37
|
+
static findSuitesRecursive(planId, url, project, suits, foundId, recursive, isTopLevel = true) {
|
|
38
|
+
// Only reset static state on the top-level call
|
|
39
|
+
if (isTopLevel) {
|
|
40
|
+
this.suitList = new Array();
|
|
41
|
+
this.level = 0; // Start at 0 so top-level suites get level 1
|
|
42
|
+
this.first = true;
|
|
50
43
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
44
|
+
for (let i = 0; i < suits.length; i++) {
|
|
45
|
+
if (suits[i].parentSuiteId != 0) {
|
|
46
|
+
// Child suites (parentSuiteId != 0)
|
|
47
|
+
if (suits[i].parentSuiteId == foundId) {
|
|
48
|
+
// Found children of the selected suite - add them to results
|
|
49
|
+
let suit = new suiteData(suits[i].title, suits[i].id, foundId, this.level + 2);
|
|
50
|
+
suit.url =
|
|
51
|
+
url + project + '/_testManagement?planId=' + planId + '&suiteId=' + suits[i].id + '&_a=tests';
|
|
52
|
+
this.suitList.push(suit);
|
|
53
|
+
if (recursive == false) {
|
|
54
|
+
return this.suitList;
|
|
55
|
+
}
|
|
56
|
+
this.level++; // Increment level before recursive call
|
|
57
|
+
this.findSuitesRecursive(planId, url, project, suits, suits[i].id, true, false);
|
|
58
|
+
this.level--; // Decrement level after recursive call
|
|
59
|
+
}
|
|
60
|
+
else if (suits[i].id == foundId && this.first) {
|
|
61
|
+
// Found the selected nested suite itself - add it to results
|
|
62
|
+
let suit = new suiteData(suits[i].title, suits[i].id, suits[i].parentSuiteId, this.level + 1);
|
|
63
|
+
suit.url =
|
|
64
|
+
url + project + '/_testManagement?planId=' + planId + '&suiteId=' + suits[i].id + '&_a=tests';
|
|
65
|
+
this.suitList.push(suit);
|
|
66
|
+
this.first = false;
|
|
67
|
+
if (recursive == false) {
|
|
68
|
+
return this.suitList;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
72
71
|
}
|
|
73
72
|
else {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
// Find all direct children of the current parent
|
|
85
|
-
const children = Array.from(suiteMap.values()).filter((suite) => suite.parentSuiteId.toString() === parentId && !visited.has(suite.id.toString()));
|
|
86
|
-
for (const child of children) {
|
|
87
|
-
const childId = child.id.toString();
|
|
88
|
-
if (visited.has(childId)) {
|
|
89
|
-
continue; // Skip if already processed
|
|
90
|
-
}
|
|
91
|
-
// Create suite data for this child
|
|
92
|
-
const childSuiteData = this.createSuiteData(child, planId, url, project, currentLevel);
|
|
93
|
-
result.push(childSuiteData);
|
|
94
|
-
visited.add(childId);
|
|
95
|
-
// If recursive is false, only get direct children
|
|
96
|
-
if (!recursive && currentLevel > 0) {
|
|
97
|
-
continue;
|
|
98
|
-
}
|
|
99
|
-
// Recursively process children of this suite
|
|
100
|
-
if (recursive) {
|
|
101
|
-
this.buildSuiteHierarchy(suiteMap, childId, planId, url, project, result, visited, currentLevel + 1, recursive);
|
|
73
|
+
// Root suites (parentSuiteId = 0) - these do NOT get added to results
|
|
74
|
+
if (suits[i].id == foundId && Helper.first) {
|
|
75
|
+
console.log(`[findSuitesRecursive] DEBUG: Found root suite - NOT adding to results, just marking as processed: ${suits[i].title}`);
|
|
76
|
+
let suit = new suiteData(suits[i].title, suits[i].id, foundId, this.level);
|
|
77
|
+
suit.url = url + project + '/_workitems/edit/' + suits[i].id;
|
|
78
|
+
Helper.first = false;
|
|
79
|
+
if (recursive == false) {
|
|
80
|
+
return this.suitList;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
102
83
|
}
|
|
103
84
|
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Creates a suiteData object from a suite
|
|
107
|
-
*/
|
|
108
|
-
static createSuiteData(suiteInfo, planId, url, project, level) {
|
|
109
|
-
const suite = new suiteData(suiteInfo.title, suiteInfo.id.toString(), suiteInfo.parentSuiteId.toString(), level);
|
|
110
|
-
// Generate appropriate URL based on suite type
|
|
111
|
-
if (suiteInfo.parentSuiteId === 0) {
|
|
112
|
-
// Root suite - link to work item
|
|
113
|
-
suite.url = `${url}/${project}/_workitems/edit/${suiteInfo.id}`;
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
// Child suite - link to test management
|
|
117
|
-
suite.url = `${url}/${project}/_testManagement?planId=${planId}&suiteId=${suiteInfo.id}&_a=tests`;
|
|
118
|
-
}
|
|
119
|
-
return suite;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Determines if hierarchy should be flattened based on conditions:
|
|
123
|
-
* - There is exactly one level 1 suite (direct child of root)
|
|
124
|
-
* - That suite has children (level 2+ suites)
|
|
125
|
-
*/
|
|
126
|
-
static shouldFlattenHierarchy(result, suiteMap, rootId) {
|
|
127
|
-
console.log(`[shouldFlattenHierarchy] Checking flattening conditions for rootId: ${rootId}`);
|
|
128
|
-
console.log(`[shouldFlattenHierarchy] Total result suites: ${result.length}`);
|
|
129
|
-
// Find all level 1 suites (direct children of root) - they have level 1
|
|
130
|
-
const level1Suites = result.filter((suite) => suite.level === 1);
|
|
131
|
-
console.log(`[shouldFlattenHierarchy] Found ${level1Suites.length} level 1 suites:`, level1Suites.map(s => `${s.name} (ID: ${s.id})`));
|
|
132
|
-
// Must have exactly one level 1 suite
|
|
133
|
-
if (level1Suites.length !== 1) {
|
|
134
|
-
console.log(`[shouldFlattenHierarchy] CONDITION FAILED: Not exactly one level 1 suite (found ${level1Suites.length})`);
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
const singleLevel1Suite = level1Suites[0];
|
|
138
|
-
console.log(`[shouldFlattenHierarchy] Single level 1 suite: ${singleLevel1Suite.name} (ID: ${singleLevel1Suite.id})`);
|
|
139
|
-
// Check if this suite has children by looking for suites with this suite as parent
|
|
140
|
-
const childrenInResult = result.filter((suite) => suite.parent === singleLevel1Suite.id);
|
|
141
|
-
console.log(`[shouldFlattenHierarchy] Found ${childrenInResult.length} children of level 1 suite:`, childrenInResult.map(s => `${s.name} (ID: ${s.id}, level: ${s.level})`));
|
|
142
|
-
// The suite must have children
|
|
143
|
-
const hasChildren = childrenInResult.length > 0;
|
|
144
|
-
console.log(`[shouldFlattenHierarchy] Suite has children: ${hasChildren}`);
|
|
145
|
-
console.log(`[shouldFlattenHierarchy] FLATTENING CONDITIONS ${hasChildren ? 'MET' : 'NOT MET'}`);
|
|
146
|
-
return hasChildren;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Flattens the hierarchy by one level:
|
|
150
|
-
* - Removes the single level 1 suite
|
|
151
|
-
* - Promotes all level 2+ suites up by one level
|
|
152
|
-
* - Updates parentSuiteId of new level 1 suites to point to root
|
|
153
|
-
*/
|
|
154
|
-
static flattenHierarchyByOneLevel(result, rootId) {
|
|
155
|
-
console.log(`[flattenHierarchyByOneLevel] Starting flattening process for rootId: ${rootId}`);
|
|
156
|
-
console.log(`[flattenHierarchyByOneLevel] Input suites:`, result.map(s => `${s.name} (ID: ${s.id}, level: ${s.level}, parent: ${s.parent})`));
|
|
157
|
-
// Find the single level 1 suite to remove (level = 1)
|
|
158
|
-
const level1Suite = result.find((suite) => suite.level === 1);
|
|
159
|
-
if (!level1Suite) {
|
|
160
|
-
console.log(`[flattenHierarchyByOneLevel] ERROR: No level 1 suite found to remove`);
|
|
161
|
-
return result;
|
|
162
|
-
}
|
|
163
|
-
const level1SuiteId = level1Suite.id;
|
|
164
|
-
console.log(`[flattenHierarchyByOneLevel] Removing level 1 suite: ${level1Suite.name} (ID: ${level1SuiteId})`);
|
|
165
|
-
// Filter out the level 1 suite and adjust levels/parents for remaining suites
|
|
166
|
-
const flattenedResult = result
|
|
167
|
-
.filter((suite) => suite.id !== level1SuiteId) // Remove the level 1 suite
|
|
168
|
-
.map((suite) => {
|
|
169
|
-
const newSuite = new suiteData(suite.name, suite.id, suite.parent, suite.level - 1);
|
|
170
|
-
newSuite.url = suite.url;
|
|
171
|
-
// If this was a level 2 suite (child of the removed level 1 suite),
|
|
172
|
-
// update its parent to point to the root
|
|
173
|
-
if (suite.parent === level1SuiteId) {
|
|
174
|
-
console.log(`[flattenHierarchyByOneLevel] Updating parent of ${suite.name} from ${level1SuiteId} to ${rootId}`);
|
|
175
|
-
newSuite.parent = rootId;
|
|
176
|
-
}
|
|
177
|
-
console.log(`[flattenHierarchyByOneLevel] Processed suite: ${newSuite.name} (ID: ${newSuite.id}, level: ${suite.level} -> ${newSuite.level}, parent: ${suite.parent} -> ${newSuite.parent})`);
|
|
178
|
-
return newSuite;
|
|
179
|
-
});
|
|
180
|
-
console.log(`[flattenHierarchyByOneLevel] Flattening complete. Result:`, flattenedResult.map(s => `${s.name} (ID: ${s.id}, level: ${s.level}, parent: ${s.parent})`));
|
|
181
|
-
return flattenedResult;
|
|
85
|
+
return this.suitList;
|
|
182
86
|
}
|
|
183
87
|
static LevelBuilder(results, foundId) {
|
|
184
88
|
// Reset the level list for each call
|
|
@@ -206,5 +110,8 @@ class Helper {
|
|
|
206
110
|
}
|
|
207
111
|
}
|
|
208
112
|
exports.Helper = Helper;
|
|
113
|
+
Helper.level = 1;
|
|
114
|
+
Helper.first = true;
|
|
115
|
+
Helper.suitList = new Array();
|
|
209
116
|
Helper.levelList = new Array();
|
|
210
117
|
//# sourceMappingURL=helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../src/helpers/helper.ts"],"names":[],"mappings":";;;AAEA,MAAa,SAAS;IAMpB,YAAY,IAAY,EAAE,EAAU,EAAE,MAAc,EAAE,KAAa;QACjE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAZ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
14
|
GetTestSuites(project: string, planId: string): Promise<any>;
|
|
15
15
|
GetTestSuitesForPlan(project: string, planid: string): Promise<any>;
|
|
16
|
-
GetTestSuitesByPlan(project: string, planId: string, recursive: boolean,
|
|
17
|
-
GetTestSuiteById(project: string, planId: string, suiteId: string, recursive: boolean,
|
|
16
|
+
GetTestSuitesByPlan(project: string, planId: string, recursive: boolean, suiteIdsFilter?: number[]): Promise<any>;
|
|
17
|
+
GetTestSuiteById(project: string, planId: string, suiteId: string, recursive: boolean, suiteIdsFilter?: number[]): Promise<any>;
|
|
18
18
|
GetTestCasesBySuites(project: string, planId: string, suiteId: string, recursive: boolean, includeRequirements: boolean, CustomerRequirementId: boolean, isByRelatedLinkedMom: boolean, stepResultDetailsMap?: Map<string, any>, testCaseToLinkedMomLookup?: Map<number, any>, preFilteredSuites?: Array<suiteData>): Promise<any>;
|
|
19
19
|
StructureTestCase(project: string, testCases: any, suite: suiteData, includeRequirements: boolean, CustomerRequirementId: boolean, isByRelatedLinkedMom: boolean, requirementToTestCaseTraceMap: Map<string, string[]>, testCaseToRequirementsTraceMap: Map<string, string[]>, stepResultDetailsMap?: Map<string, any>, testCaseToLinkedMomLookup?: Map<number, Set<any>>): Promise<any[]>;
|
|
20
20
|
private createNewRequirement;
|
|
@@ -75,29 +75,74 @@ class TestDataProvider {
|
|
|
75
75
|
let url = this.orgUrl + '/' + project + '/_api/_testManagement/GetTestSuitesForPlan?__v=5&planId=' + planid;
|
|
76
76
|
return await this.fetchWithCache(url);
|
|
77
77
|
}
|
|
78
|
-
async GetTestSuitesByPlan(project, planId, recursive,
|
|
78
|
+
async GetTestSuitesByPlan(project, planId, recursive, suiteIdsFilter // NEW: Pass through suite filter
|
|
79
79
|
) {
|
|
80
|
-
let suiteId
|
|
81
|
-
|
|
80
|
+
let suiteId;
|
|
81
|
+
if (suiteIdsFilter && suiteIdsFilter.length > 0) {
|
|
82
|
+
// When we have suite filtering, we need to find the "root" suite among the filtered suites
|
|
83
|
+
// This is the suite that is highest in the hierarchy (i.e., its parent is not in the filter)
|
|
84
|
+
// First get all suites to analyze the hierarchy
|
|
85
|
+
let allTestSuites = await this.GetTestSuitesForPlan(project, planId);
|
|
86
|
+
let allSuites = allTestSuites.testSuites;
|
|
87
|
+
// Create a map for quick lookup
|
|
88
|
+
const suiteMap = new Map();
|
|
89
|
+
allSuites.forEach((suite) => suiteMap.set(suite.id, suite));
|
|
90
|
+
// Find ALL top-level suites in the filter (those whose parent is not in the filter)
|
|
91
|
+
// These represent separate hierarchies that need to be processed independently
|
|
92
|
+
const topLevelSuites = [];
|
|
93
|
+
for (const filterSuiteId of suiteIdsFilter) {
|
|
94
|
+
const suite = suiteMap.get(filterSuiteId) || suiteMap.get(parseInt(filterSuiteId.toString()));
|
|
95
|
+
if (suite) {
|
|
96
|
+
// Check if this suite's parent is NOT in our filter (making it a top-level suite for our selection)
|
|
97
|
+
const parentInFilter = suiteIdsFilter.some(id => id.toString() === suite.parentSuiteId.toString() ||
|
|
98
|
+
parseInt(id.toString()) === suite.parentSuiteId);
|
|
99
|
+
if (!parentInFilter && suite.parentSuiteId !== 0) {
|
|
100
|
+
topLevelSuites.push(filterSuiteId.toString());
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (topLevelSuites.length === 0) {
|
|
105
|
+
// Fallback: use first suite if no clear top-level suites found
|
|
106
|
+
const selectedSuiteId = suiteIdsFilter[0].toString();
|
|
107
|
+
return this.GetTestSuiteById(project, planId, selectedSuiteId, recursive, suiteIdsFilter);
|
|
108
|
+
}
|
|
109
|
+
else if (topLevelSuites.length === 1) {
|
|
110
|
+
// Single hierarchy: use existing logic
|
|
111
|
+
const selectedSuiteId = topLevelSuites[0];
|
|
112
|
+
return this.GetTestSuiteById(project, planId, selectedSuiteId, recursive, suiteIdsFilter);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
// Multiple hierarchies: process each separately and combine results
|
|
116
|
+
const allSuites = [];
|
|
117
|
+
for (const topLevelSuiteId of topLevelSuites) {
|
|
118
|
+
const hierarchySuites = await this.GetTestSuiteById(project, planId, topLevelSuiteId, recursive, suiteIdsFilter);
|
|
119
|
+
allSuites.push(...hierarchySuites);
|
|
120
|
+
}
|
|
121
|
+
return allSuites;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
suiteId = (Number(planId) + 1).toString();
|
|
126
|
+
}
|
|
127
|
+
return this.GetTestSuiteById(project, planId, suiteId, recursive, suiteIdsFilter);
|
|
82
128
|
}
|
|
83
|
-
async GetTestSuiteById(project, planId, suiteId, recursive,
|
|
129
|
+
async GetTestSuiteById(project, planId, suiteId, recursive, suiteIdsFilter) {
|
|
84
130
|
let testSuites = await this.GetTestSuitesForPlan(project, planId);
|
|
85
|
-
// Start with all suites
|
|
86
131
|
let filteredSuites = testSuites.testSuites;
|
|
87
|
-
//
|
|
132
|
+
// Apply suite filtering if provided
|
|
88
133
|
if (suiteIdsFilter && suiteIdsFilter.length > 0) {
|
|
89
|
-
// Convert filter IDs to strings once for efficient comparison
|
|
90
134
|
const filterAsStrings = suiteIdsFilter.map(id => id.toString());
|
|
91
|
-
filteredSuites =
|
|
135
|
+
filteredSuites = testSuites.testSuites.filter((suite) => {
|
|
92
136
|
const suiteIdString = suite.id.toString();
|
|
93
|
-
//
|
|
137
|
+
// Check if suite ID matches the starting suite
|
|
94
138
|
const isStartingSuite = suiteIdString === suiteId;
|
|
95
139
|
// Check if suite ID is in the target filter list
|
|
96
140
|
const isTargetSuite = filterAsStrings.includes(suiteIdString);
|
|
97
|
-
|
|
141
|
+
const shouldInclude = isStartingSuite || isTargetSuite;
|
|
142
|
+
return shouldInclude;
|
|
98
143
|
});
|
|
99
144
|
}
|
|
100
|
-
let dataSuites = helper_1.Helper.findSuitesRecursive(planId, this.orgUrl, project, filteredSuites, suiteId, recursive
|
|
145
|
+
let dataSuites = helper_1.Helper.findSuitesRecursive(planId, this.orgUrl, project, filteredSuites, suiteId, recursive);
|
|
101
146
|
return dataSuites;
|
|
102
147
|
}
|
|
103
148
|
async GetTestCasesBySuites(project, planId, suiteId, recursive, includeRequirements, CustomerRequirementId, isByRelatedLinkedMom, stepResultDetailsMap, testCaseToLinkedMomLookup, preFilteredSuites) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestDataProvider.js","sourceRoot":"","sources":["../../src/modules/TestDataProvider.ts"],"names":[],"mappings":";;AAAA,wCAA6C;AAC7C,8CAAsD;AACtD,iDAA6F;AAC7F,iDAA8C;AAC9C,iCAAiC;AACjC,4CAAqC;AACrC,wEAAkD;AAClD,kEAA2D;AAC3D,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAElC,MAAqB,gBAAgB;IAQnC,YAAY,MAAc,EAAE,KAAa;QAPzC,WAAM,GAAW,EAAE,CAAC;QACpB,UAAK,GAAW,EAAE,CAAC;QAEX,UAAK,GAAG,IAAI,GAAG,EAAe,CAAC,CAAC,0BAA0B;QAC1D,UAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;QAghBnB,aAAQ,GAAG,CAAC,GAA0B,EAAE,GAAW,EAAE,KAAa,EAAE,EAAE;;YAC5E,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBAClB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACnB,CAAC;YACD,MAAA,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,0CAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC,CAAC;QAjhBA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,oBAAoB,GAAG,IAAI,8BAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACrD,IAAI,CAAC,kBAAkB,GAAG,IAAI,GAAG,EAAe,CAAC;IACnD,CAAC;IAEO,KAAK,C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,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/E,OAAO,GAAG,CAAC;IACb,CAAC;IAED,KAAK,CAAC,wBAAwB,CAAC,WAAmB,EAAE,UAAkB;QACpE,gBAAM,CAAC,IAAI,CAAC,8BAA8B,WAAW,sBAAsB,UAAU,EAAE,CAAC,CAAC;QACzF,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,GAAG,WAAW,oBAAoB,CAAC;QAC3D,IAAI,IAAI,GAAG;YACT,YAAY,EAAE;gBACZ,WAAW,EAAE,CAAC,UAAU,CAAC;aAC1B;SACF,CAAC;QACF,IAAI,GAAG,GAAG,MAAM,iBAAW,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7E,OAAO,GAAG,CAAC;IACb,CAAC;IASD;;OAEG;IACI,UAAU;QACf,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnB,gBAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAChC,CAAC;CACF;AA5mBD,mCA4mBC"}
|
package/package.json
CHANGED
package/src/helpers/helper.ts
CHANGED
|
@@ -35,6 +35,10 @@ export class Trace {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export class Helper {
|
|
38
|
+
static level: number = 1;
|
|
39
|
+
static first: boolean = true;
|
|
40
|
+
public static suitList: Array<suiteData> = new Array<suiteData>();
|
|
41
|
+
|
|
38
42
|
/**
|
|
39
43
|
* Finds test suites recursively starting from a given suite ID
|
|
40
44
|
* @param planId - The test plan ID
|
|
@@ -43,7 +47,7 @@ export class Helper {
|
|
|
43
47
|
* @param suits - Array of all test suites
|
|
44
48
|
* @param foundId - Starting suite ID to search from
|
|
45
49
|
* @param recursive - Whether to search recursively or just direct children
|
|
46
|
-
* @param
|
|
50
|
+
* @param flatSuiteTestCases - If true and there's only one level 1 suite with children, flatten the hierarchy by one level
|
|
47
51
|
* @returns Array of suiteData objects representing the hierarchy
|
|
48
52
|
*/
|
|
49
53
|
public static findSuitesRecursive(
|
|
@@ -53,231 +57,69 @@ export class Helper {
|
|
|
53
57
|
suits: any[],
|
|
54
58
|
foundId: string,
|
|
55
59
|
recursive: boolean,
|
|
56
|
-
|
|
60
|
+
isTopLevel: boolean = true
|
|
57
61
|
): Array<suiteData> {
|
|
58
|
-
console.log(`[findSuitesRecursive] Starting with foundId: ${foundId}, flatTreeByOneLevel: ${flatTreeByOneLevel}`);
|
|
59
|
-
console.log(`[findSuitesRecursive] Total suits provided: ${suits.length}`);
|
|
60
|
-
|
|
61
|
-
// Create a map for faster lookups
|
|
62
|
-
const suiteMap = new Map<string, any>();
|
|
63
|
-
suits.forEach((suite) => suiteMap.set(suite.id.toString(), suite));
|
|
64
|
-
|
|
65
|
-
const result: Array<suiteData> = [];
|
|
66
|
-
const visited = new Set<string>();
|
|
67
|
-
|
|
68
|
-
// Find the starting suite
|
|
69
|
-
const startingSuite = suiteMap.get(foundId);
|
|
70
|
-
if (!startingSuite) {
|
|
71
|
-
console.log(`[findSuitesRecursive] ERROR: Starting suite ${foundId} not found in suite map`);
|
|
72
|
-
return result;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
console.log(`[findSuitesRecursive] Starting suite found: ${startingSuite.title} (ID: ${startingSuite.id}, parentSuiteId: ${startingSuite.parentSuiteId})`);
|
|
76
|
-
|
|
77
|
-
// Skip root suites (parentSuiteId = 0) - we don't want them in results
|
|
78
|
-
// Just mark them as visited so we can process their children
|
|
79
|
-
if (startingSuite.parentSuiteId === 0) {
|
|
80
|
-
console.log(`[findSuitesRecursive] Starting suite is root (parentSuiteId = 0), marking as visited`);
|
|
81
|
-
visited.add(foundId);
|
|
82
|
-
}
|
|
83
62
|
|
|
84
|
-
// Build the hierarchy
|
|
85
|
-
const startingLevel = startingSuite.parentSuiteId === 0 ? 1 : 0;
|
|
86
|
-
console.log(`[findSuitesRecursive] Building hierarchy starting at level: ${startingLevel}`);
|
|
87
63
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
result,
|
|
95
|
-
visited,
|
|
96
|
-
startingLevel,
|
|
97
|
-
recursive
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
console.log(`[findSuitesRecursive] Hierarchy built, result count: ${result.length}`);
|
|
101
|
-
console.log(`[findSuitesRecursive] Result suites:`, result.map(s => `${s.name} (ID: ${s.id}, level: ${s.level}, parent: ${s.parent})`));
|
|
64
|
+
// Only reset static state on the top-level call
|
|
65
|
+
if (isTopLevel) {
|
|
66
|
+
this.suitList = new Array<suiteData>();
|
|
67
|
+
this.level = 0; // Start at 0 so top-level suites get level 1
|
|
68
|
+
this.first = true;
|
|
69
|
+
}
|
|
102
70
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
71
|
+
for (let i = 0; i < suits.length; i++) {
|
|
72
|
+
|
|
73
|
+
if (suits[i].parentSuiteId != 0) {
|
|
74
|
+
// Child suites (parentSuiteId != 0)
|
|
75
|
+
if (suits[i].parentSuiteId == foundId) {
|
|
76
|
+
|
|
77
|
+
// Found children of the selected suite - add them to results
|
|
78
|
+
let suit: suiteData = new suiteData(suits[i].title, suits[i].id, foundId, this.level + 2);
|
|
79
|
+
suit.url =
|
|
80
|
+
url + project + '/_testManagement?planId=' + planId + '&suiteId=' + suits[i].id + '&_a=tests';
|
|
81
|
+
this.suitList.push(suit);
|
|
82
|
+
if (recursive == false) {
|
|
83
|
+
return this.suitList;
|
|
84
|
+
}
|
|
85
|
+
this.level++; // Increment level before recursive call
|
|
86
|
+
this.findSuitesRecursive(planId, url, project, suits, suits[i].id, true, false);
|
|
87
|
+
this.level--; // Decrement level after recursive call
|
|
88
|
+
} else if (suits[i].id == foundId && this.first) {
|
|
89
|
+
|
|
90
|
+
// Found the selected nested suite itself - add it to results
|
|
91
|
+
let suit: suiteData = new suiteData(
|
|
92
|
+
suits[i].title,
|
|
93
|
+
suits[i].id,
|
|
94
|
+
suits[i].parentSuiteId,
|
|
95
|
+
this.level + 1
|
|
96
|
+
);
|
|
97
|
+
suit.url =
|
|
98
|
+
url + project + '/_testManagement?planId=' + planId + '&suiteId=' + suits[i].id + '&_a=tests';
|
|
99
|
+
this.suitList.push(suit);
|
|
100
|
+
this.first = false;
|
|
101
|
+
if (recursive == false) {
|
|
102
|
+
return this.suitList;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
111
105
|
} else {
|
|
112
|
-
|
|
106
|
+
// Root suites (parentSuiteId = 0) - these do NOT get added to results
|
|
107
|
+
if (suits[i].id == foundId && Helper.first) {
|
|
108
|
+
console.log(`[findSuitesRecursive] DEBUG: Found root suite - NOT adding to results, just marking as processed: ${suits[i].title}`);
|
|
109
|
+
let suit: suiteData = new suiteData(suits[i].title, suits[i].id, foundId, this.level);
|
|
110
|
+
suit.url = url + project + '/_workitems/edit/' + suits[i].id;
|
|
111
|
+
Helper.first = false;
|
|
112
|
+
if (recursive == false) {
|
|
113
|
+
return this.suitList;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
118
|
|
|
116
|
-
|
|
117
|
-
return result;
|
|
119
|
+
return this.suitList;
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
/**
|
|
121
|
-
* Recursively builds the suite hierarchy
|
|
122
|
-
*/
|
|
123
|
-
private static buildSuiteHierarchy(
|
|
124
|
-
suiteMap: Map<string, any>,
|
|
125
|
-
parentId: string,
|
|
126
|
-
planId: string,
|
|
127
|
-
url: string,
|
|
128
|
-
project: string,
|
|
129
|
-
result: Array<suiteData>,
|
|
130
|
-
visited: Set<string>,
|
|
131
|
-
currentLevel: number,
|
|
132
|
-
recursive: boolean
|
|
133
|
-
): void {
|
|
134
|
-
// Find all direct children of the current parent
|
|
135
|
-
const children = Array.from(suiteMap.values()).filter(
|
|
136
|
-
(suite) => suite.parentSuiteId.toString() === parentId && !visited.has(suite.id.toString())
|
|
137
|
-
);
|
|
138
|
-
|
|
139
|
-
for (const child of children) {
|
|
140
|
-
const childId = child.id.toString();
|
|
141
|
-
|
|
142
|
-
if (visited.has(childId)) {
|
|
143
|
-
continue; // Skip if already processed
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Create suite data for this child
|
|
147
|
-
const childSuiteData = this.createSuiteData(child, planId, url, project, currentLevel);
|
|
148
|
-
result.push(childSuiteData);
|
|
149
|
-
visited.add(childId);
|
|
150
|
-
|
|
151
|
-
// If recursive is false, only get direct children
|
|
152
|
-
if (!recursive && currentLevel > 0) {
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
122
|
|
|
156
|
-
// Recursively process children of this suite
|
|
157
|
-
if (recursive) {
|
|
158
|
-
this.buildSuiteHierarchy(
|
|
159
|
-
suiteMap,
|
|
160
|
-
childId,
|
|
161
|
-
planId,
|
|
162
|
-
url,
|
|
163
|
-
project,
|
|
164
|
-
result,
|
|
165
|
-
visited,
|
|
166
|
-
currentLevel + 1,
|
|
167
|
-
recursive
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Creates a suiteData object from a suite
|
|
175
|
-
*/
|
|
176
|
-
private static createSuiteData(
|
|
177
|
-
suiteInfo: any,
|
|
178
|
-
planId: string,
|
|
179
|
-
url: string,
|
|
180
|
-
project: string,
|
|
181
|
-
level: number
|
|
182
|
-
): suiteData {
|
|
183
|
-
const suite = new suiteData(
|
|
184
|
-
suiteInfo.title,
|
|
185
|
-
suiteInfo.id.toString(),
|
|
186
|
-
suiteInfo.parentSuiteId.toString(),
|
|
187
|
-
level
|
|
188
|
-
);
|
|
189
|
-
|
|
190
|
-
// Generate appropriate URL based on suite type
|
|
191
|
-
if (suiteInfo.parentSuiteId === 0) {
|
|
192
|
-
// Root suite - link to work item
|
|
193
|
-
suite.url = `${url}/${project}/_workitems/edit/${suiteInfo.id}`;
|
|
194
|
-
} else {
|
|
195
|
-
// Child suite - link to test management
|
|
196
|
-
suite.url = `${url}/${project}/_testManagement?planId=${planId}&suiteId=${suiteInfo.id}&_a=tests`;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
return suite;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Determines if hierarchy should be flattened based on conditions:
|
|
204
|
-
* - There is exactly one level 1 suite (direct child of root)
|
|
205
|
-
* - That suite has children (level 2+ suites)
|
|
206
|
-
*/
|
|
207
|
-
private static shouldFlattenHierarchy(
|
|
208
|
-
result: Array<suiteData>,
|
|
209
|
-
suiteMap: Map<string, any>,
|
|
210
|
-
rootId: string
|
|
211
|
-
): boolean {
|
|
212
|
-
console.log(`[shouldFlattenHierarchy] Checking flattening conditions for rootId: ${rootId}`);
|
|
213
|
-
console.log(`[shouldFlattenHierarchy] Total result suites: ${result.length}`);
|
|
214
|
-
|
|
215
|
-
// Find all level 1 suites (direct children of root) - they have level 1
|
|
216
|
-
const level1Suites = result.filter((suite) => suite.level === 1);
|
|
217
|
-
console.log(`[shouldFlattenHierarchy] Found ${level1Suites.length} level 1 suites:`, level1Suites.map(s => `${s.name} (ID: ${s.id})`));
|
|
218
|
-
|
|
219
|
-
// Must have exactly one level 1 suite
|
|
220
|
-
if (level1Suites.length !== 1) {
|
|
221
|
-
console.log(`[shouldFlattenHierarchy] CONDITION FAILED: Not exactly one level 1 suite (found ${level1Suites.length})`);
|
|
222
|
-
return false;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const singleLevel1Suite = level1Suites[0];
|
|
226
|
-
console.log(`[shouldFlattenHierarchy] Single level 1 suite: ${singleLevel1Suite.name} (ID: ${singleLevel1Suite.id})`);
|
|
227
|
-
|
|
228
|
-
// Check if this suite has children by looking for suites with this suite as parent
|
|
229
|
-
const childrenInResult = result.filter((suite) => suite.parent === singleLevel1Suite.id);
|
|
230
|
-
console.log(`[shouldFlattenHierarchy] Found ${childrenInResult.length} children of level 1 suite:`, childrenInResult.map(s => `${s.name} (ID: ${s.id}, level: ${s.level})`));
|
|
231
|
-
|
|
232
|
-
// The suite must have children
|
|
233
|
-
const hasChildren = childrenInResult.length > 0;
|
|
234
|
-
console.log(`[shouldFlattenHierarchy] Suite has children: ${hasChildren}`);
|
|
235
|
-
console.log(`[shouldFlattenHierarchy] FLATTENING CONDITIONS ${hasChildren ? 'MET' : 'NOT MET'}`);
|
|
236
|
-
|
|
237
|
-
return hasChildren;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Flattens the hierarchy by one level:
|
|
242
|
-
* - Removes the single level 1 suite
|
|
243
|
-
* - Promotes all level 2+ suites up by one level
|
|
244
|
-
* - Updates parentSuiteId of new level 1 suites to point to root
|
|
245
|
-
*/
|
|
246
|
-
private static flattenHierarchyByOneLevel(result: Array<suiteData>, rootId: string): Array<suiteData> {
|
|
247
|
-
console.log(`[flattenHierarchyByOneLevel] Starting flattening process for rootId: ${rootId}`);
|
|
248
|
-
console.log(`[flattenHierarchyByOneLevel] Input suites:`, result.map(s => `${s.name} (ID: ${s.id}, level: ${s.level}, parent: ${s.parent})`));
|
|
249
|
-
|
|
250
|
-
// Find the single level 1 suite to remove (level = 1)
|
|
251
|
-
const level1Suite = result.find((suite) => suite.level === 1);
|
|
252
|
-
if (!level1Suite) {
|
|
253
|
-
console.log(`[flattenHierarchyByOneLevel] ERROR: No level 1 suite found to remove`);
|
|
254
|
-
return result;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
const level1SuiteId = level1Suite.id;
|
|
258
|
-
console.log(`[flattenHierarchyByOneLevel] Removing level 1 suite: ${level1Suite.name} (ID: ${level1SuiteId})`);
|
|
259
|
-
|
|
260
|
-
// Filter out the level 1 suite and adjust levels/parents for remaining suites
|
|
261
|
-
const flattenedResult = result
|
|
262
|
-
.filter((suite) => suite.id !== level1SuiteId) // Remove the level 1 suite
|
|
263
|
-
.map((suite) => {
|
|
264
|
-
const newSuite = new suiteData(suite.name, suite.id, suite.parent, suite.level - 1);
|
|
265
|
-
newSuite.url = suite.url;
|
|
266
|
-
|
|
267
|
-
// If this was a level 2 suite (child of the removed level 1 suite),
|
|
268
|
-
// update its parent to point to the root
|
|
269
|
-
if (suite.parent === level1SuiteId) {
|
|
270
|
-
console.log(`[flattenHierarchyByOneLevel] Updating parent of ${suite.name} from ${level1SuiteId} to ${rootId}`);
|
|
271
|
-
newSuite.parent = rootId;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
console.log(`[flattenHierarchyByOneLevel] Processed suite: ${newSuite.name} (ID: ${newSuite.id}, level: ${suite.level} -> ${newSuite.level}, parent: ${suite.parent} -> ${newSuite.parent})`);
|
|
275
|
-
return newSuite;
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
console.log(`[flattenHierarchyByOneLevel] Flattening complete. Result:`, flattenedResult.map(s => `${s.name} (ID: ${s.id}, level: ${s.level}, parent: ${s.parent})`));
|
|
279
|
-
return flattenedResult;
|
|
280
|
-
}
|
|
281
123
|
|
|
282
124
|
public static levelList: Array<Workitem> = new Array<Workitem>();
|
|
283
125
|
|
|
@@ -84,11 +84,82 @@ export default class TestDataProvider {
|
|
|
84
84
|
project: string,
|
|
85
85
|
planId: string,
|
|
86
86
|
recursive: boolean,
|
|
87
|
-
|
|
88
|
-
suiteIdsFilter?: number[] // NEW: Pass through suite filter
|
|
87
|
+
suiteIdsFilter?: number[] // NEW: Pass through suite filter
|
|
89
88
|
): Promise<any> {
|
|
90
|
-
let suiteId
|
|
91
|
-
|
|
89
|
+
let suiteId: string;
|
|
90
|
+
|
|
91
|
+
if (suiteIdsFilter && suiteIdsFilter.length > 0) {
|
|
92
|
+
// When we have suite filtering, we need to find the "root" suite among the filtered suites
|
|
93
|
+
// This is the suite that is highest in the hierarchy (i.e., its parent is not in the filter)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
// First get all suites to analyze the hierarchy
|
|
98
|
+
let allTestSuites = await this.GetTestSuitesForPlan(project, planId);
|
|
99
|
+
let allSuites = allTestSuites.testSuites;
|
|
100
|
+
|
|
101
|
+
// Create a map for quick lookup
|
|
102
|
+
const suiteMap = new Map();
|
|
103
|
+
allSuites.forEach((suite: any) => suiteMap.set(suite.id, suite));
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
// Find ALL top-level suites in the filter (those whose parent is not in the filter)
|
|
108
|
+
// These represent separate hierarchies that need to be processed independently
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
const topLevelSuites: string[] = [];
|
|
112
|
+
|
|
113
|
+
for (const filterSuiteId of suiteIdsFilter) {
|
|
114
|
+
const suite = suiteMap.get(filterSuiteId) || suiteMap.get(parseInt(filterSuiteId.toString()));
|
|
115
|
+
if (suite) {
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
// Check if this suite's parent is NOT in our filter (making it a top-level suite for our selection)
|
|
119
|
+
const parentInFilter = suiteIdsFilter.some(id =>
|
|
120
|
+
id.toString() === suite.parentSuiteId.toString() ||
|
|
121
|
+
parseInt(id.toString()) === suite.parentSuiteId
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
if (!parentInFilter && suite.parentSuiteId !== 0) {
|
|
125
|
+
|
|
126
|
+
topLevelSuites.push(filterSuiteId.toString());
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
if (topLevelSuites.length === 0) {
|
|
134
|
+
// Fallback: use first suite if no clear top-level suites found
|
|
135
|
+
const selectedSuiteId = suiteIdsFilter[0].toString();
|
|
136
|
+
|
|
137
|
+
return this.GetTestSuiteById(project, planId, selectedSuiteId, recursive, suiteIdsFilter);
|
|
138
|
+
} else if (topLevelSuites.length === 1) {
|
|
139
|
+
// Single hierarchy: use existing logic
|
|
140
|
+
const selectedSuiteId = topLevelSuites[0];
|
|
141
|
+
|
|
142
|
+
return this.GetTestSuiteById(project, planId, selectedSuiteId, recursive, suiteIdsFilter);
|
|
143
|
+
} else {
|
|
144
|
+
// Multiple hierarchies: process each separately and combine results
|
|
145
|
+
|
|
146
|
+
const allSuites: any[] = [];
|
|
147
|
+
|
|
148
|
+
for (const topLevelSuiteId of topLevelSuites) {
|
|
149
|
+
|
|
150
|
+
const hierarchySuites = await this.GetTestSuiteById(project, planId, topLevelSuiteId, recursive, suiteIdsFilter);
|
|
151
|
+
|
|
152
|
+
allSuites.push(...hierarchySuites);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
return allSuites;
|
|
157
|
+
}
|
|
158
|
+
} else {
|
|
159
|
+
suiteId = (Number(planId) + 1).toString();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return this.GetTestSuiteById(project, planId, suiteId, recursive, suiteIdsFilter);
|
|
92
163
|
}
|
|
93
164
|
|
|
94
165
|
async GetTestSuiteById(
|
|
@@ -96,40 +167,47 @@ export default class TestDataProvider {
|
|
|
96
167
|
planId: string,
|
|
97
168
|
suiteId: string,
|
|
98
169
|
recursive: boolean,
|
|
99
|
-
flatTreeByOneLevel: boolean = false,
|
|
100
170
|
suiteIdsFilter?: number[]
|
|
101
171
|
): Promise<any> {
|
|
102
|
-
let testSuites = await this.GetTestSuitesForPlan(project, planId);
|
|
103
172
|
|
|
104
|
-
|
|
173
|
+
|
|
174
|
+
let testSuites = await this.GetTestSuitesForPlan(project, planId);
|
|
105
175
|
let filteredSuites = testSuites.testSuites;
|
|
176
|
+
|
|
177
|
+
|
|
106
178
|
|
|
107
|
-
//
|
|
179
|
+
// Apply suite filtering if provided
|
|
108
180
|
if (suiteIdsFilter && suiteIdsFilter.length > 0) {
|
|
109
|
-
// Convert filter IDs to strings once for efficient comparison
|
|
110
181
|
const filterAsStrings = suiteIdsFilter.map(id => id.toString());
|
|
182
|
+
|
|
111
183
|
|
|
112
|
-
filteredSuites =
|
|
184
|
+
filteredSuites = testSuites.testSuites.filter((suite: any) => {
|
|
113
185
|
const suiteIdString = suite.id.toString();
|
|
114
186
|
|
|
115
|
-
//
|
|
187
|
+
// Check if suite ID matches the starting suite
|
|
116
188
|
const isStartingSuite = suiteIdString === suiteId;
|
|
117
189
|
|
|
118
190
|
// Check if suite ID is in the target filter list
|
|
119
191
|
const isTargetSuite = filterAsStrings.includes(suiteIdString);
|
|
120
192
|
|
|
121
|
-
|
|
193
|
+
const shouldInclude = isStartingSuite || isTargetSuite;
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
return shouldInclude;
|
|
122
197
|
});
|
|
198
|
+
|
|
199
|
+
|
|
123
200
|
}
|
|
124
201
|
|
|
202
|
+
|
|
203
|
+
|
|
125
204
|
let dataSuites: any = Helper.findSuitesRecursive(
|
|
126
205
|
planId,
|
|
127
206
|
this.orgUrl,
|
|
128
207
|
project,
|
|
129
208
|
filteredSuites,
|
|
130
209
|
suiteId,
|
|
131
|
-
recursive
|
|
132
|
-
flatTreeByOneLevel
|
|
210
|
+
recursive
|
|
133
211
|
);
|
|
134
212
|
|
|
135
213
|
return dataSuites;
|
|
@@ -157,12 +235,7 @@ export default class TestDataProvider {
|
|
|
157
235
|
if (preFilteredSuites && preFilteredSuites.length > 0) {
|
|
158
236
|
suitesTestCasesList = preFilteredSuites;
|
|
159
237
|
} else {
|
|
160
|
-
suitesTestCasesList = await this.GetTestSuiteById(
|
|
161
|
-
project,
|
|
162
|
-
planId,
|
|
163
|
-
suiteId,
|
|
164
|
-
recursive
|
|
165
|
-
);
|
|
238
|
+
suitesTestCasesList = await this.GetTestSuiteById(project, planId, suiteId, recursive);
|
|
166
239
|
}
|
|
167
240
|
|
|
168
241
|
// Create array of promises that each return their test cases
|