fix(接口测试): 修复场景中批量删除复制的case步骤时,前后置操作,断言也被删除的缺陷
--bug=1020598 --user=王孝刚 [接口测试] #20354批量勾选一个场景里面的多个case,做批量删除,会把剩余case的后置脚本和断言清空(特殊场景) https://www.tapd.cn/55049933/s/1311240
This commit is contained in:
parent
07babd30c9
commit
677948fe7e
|
@ -996,6 +996,14 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
resetResourceId(hashTree) {
|
||||||
|
hashTree.forEach((item) => {
|
||||||
|
item.resourceId = getUUID();
|
||||||
|
if (item.hashTree && item.hashTree.length > 0) {
|
||||||
|
this.resetResourceId(item.hashTree);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
getCaseAndOpen(id, apiName, apiId) {
|
getCaseAndOpen(id, apiName, apiId) {
|
||||||
getCaseById(id).then((response) => {
|
getCaseById(id).then((response) => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
|
@ -1007,6 +1015,9 @@ export default {
|
||||||
} else if (apiCaseRequest.type === 'JDBCSampler') {
|
} else if (apiCaseRequest.type === 'JDBCSampler') {
|
||||||
apiCaseRequest.method = 'SQL';
|
apiCaseRequest.method = 'SQL';
|
||||||
}
|
}
|
||||||
|
if (apiCaseRequest.hashTree && apiCaseRequest.hashTree.length > 0) {
|
||||||
|
this.resetResourceId(apiCaseRequest.hashTree);
|
||||||
|
}
|
||||||
apiCaseRequest.name = apiName;
|
apiCaseRequest.name = apiName;
|
||||||
let obj = {
|
let obj = {
|
||||||
name: 'copy_' + data.name,
|
name: 'copy_' + data.name,
|
||||||
|
|
Loading…
Reference in New Issue