fix(接口自动化): 修复引用case内容同步问题

--bug=1007941 --user=赵勇 【Github】1.14.1版本,接口自动化场景引用接口测试用例,然后在修改接口测试用例里的参数,自动化场景里引用的此用例没有被修改,还需要手动到场景里进行修改 #7726 https://www.tapd.cn/55049933/s/1068081
This commit is contained in:
fit2-zhao 2021-11-16 12:37:57 +08:00 committed by fit2-zhao
parent aa40f9ffc9
commit 8f27fedcfe
1 changed files with 6 additions and 0 deletions

View File

@ -374,6 +374,11 @@ export default {
let enable = this.request.enable;
this.$get("/api/testcase/get/" + this.request.id, response => {
if (response.data) {
let hashTree = [];
if (this.request.hashTree) {
hashTree = JSON.parse(JSON.stringify(this.request.hashTree));
}
Object.assign(this.request, JSON.parse(response.data.request));
this.request.name = response.data.name;
this.request.referenced = "REF";
this.request.enable = enable;
@ -395,6 +400,7 @@ export default {
this.request.projectId = response.data.projectId;
let req = JSON.parse(response.data.request);
if (req && this.request) {
this.request.hashTree = hashTree;
this.mergeHashTree(req.hashTree);
}
this.reload();