fix(接口测试): 修复批量禁用场景步骤失败的缺陷
--bug=1027696 --user=王孝刚 【接口测试】github#25507,批量禁用部分步骤,会导致同一场景下其他未禁用步骤的后置脚本被禁用 https://www.tapd.cn/55049933/s/1391818
This commit is contained in:
parent
f68e7f1090
commit
0433a12596
|
@ -2404,16 +2404,26 @@ export default {
|
|||
}
|
||||
},
|
||||
getAllResourceIds() {
|
||||
let selectNodes = [];
|
||||
let selectIds = [];
|
||||
if (this.$refs.stepTree) {
|
||||
selectNodes = this.$refs.stepTree.getCheckedNodes();
|
||||
selectNodes.forEach(item => {
|
||||
selectIds.push(item.resourceId)
|
||||
});
|
||||
}
|
||||
let resourceIds = [];
|
||||
this.filterAllStep(this.scenarioDefinition, resourceIds);
|
||||
this.filterAllStep(this.scenarioDefinition, resourceIds, selectIds);
|
||||
return resourceIds;
|
||||
},
|
||||
filterAllStep(stepArray, resourceIds) {
|
||||
filterAllStep(stepArray, resourceIds,selectIds) {
|
||||
if (stepArray) {
|
||||
stepArray.forEach(item =>{
|
||||
if (selectIds && selectIds.includes(item.resourceId)) {
|
||||
resourceIds.push(item.resourceId);
|
||||
}
|
||||
if(item.referenced !== 'REF' && item.hashTree){
|
||||
this.filterAllStep(item.hashTree,resourceIds);
|
||||
this.filterAllStep(item.hashTree,resourceIds, selectIds);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue