fix(接口自动化): 修复引用case内容同步问题
--bug=1007941 --user=赵勇 【Github】1.14.1版本,接口自动化场景引用接口测试用例,然后在修改接口测试用例里的参数,自动化场景里引用的此用例没有被修改,还需要手动到场景里进行修改 #7726 https://www.tapd.cn/55049933/s/1068081
This commit is contained in:
parent
aa40f9ffc9
commit
8f27fedcfe
|
@ -374,6 +374,11 @@ export default {
|
||||||
let enable = this.request.enable;
|
let enable = this.request.enable;
|
||||||
this.$get("/api/testcase/get/" + this.request.id, response => {
|
this.$get("/api/testcase/get/" + this.request.id, response => {
|
||||||
if (response.data) {
|
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.name = response.data.name;
|
||||||
this.request.referenced = "REF";
|
this.request.referenced = "REF";
|
||||||
this.request.enable = enable;
|
this.request.enable = enable;
|
||||||
|
@ -395,6 +400,7 @@ export default {
|
||||||
this.request.projectId = response.data.projectId;
|
this.request.projectId = response.data.projectId;
|
||||||
let req = JSON.parse(response.data.request);
|
let req = JSON.parse(response.data.request);
|
||||||
if (req && this.request) {
|
if (req && this.request) {
|
||||||
|
this.request.hashTree = hashTree;
|
||||||
this.mergeHashTree(req.hashTree);
|
this.mergeHashTree(req.hashTree);
|
||||||
}
|
}
|
||||||
this.reload();
|
this.reload();
|
||||||
|
|
Loading…
Reference in New Issue