fix(接口定义): 恢复用例执行代码,接口变更,用例不能跟着变更

This commit is contained in:
fit2-zhao 2021-03-23 14:11:48 +08:00
parent 6761a96f15
commit b7fe6101ee
2 changed files with 9 additions and 11 deletions

View File

@ -230,7 +230,8 @@
} }
data.message = true; data.message = true;
data.request.useEnvironment = this.environment; data.request.useEnvironment = this.environment;
this.saveTestCase(data); //this.saveTestCase(data);
this.$emit('singleRun', data); this.$emit('singleRun', data);
}, },
copyCase(data) { copyCase(data) {

View File

@ -222,7 +222,7 @@
} }
this.result = this.$post("/api/testcase/list", this.condition, response => { this.result = this.$post("/api/testcase/list", this.condition, response => {
if(response.data){ if (response.data) {
this.apiCaseList = response.data; this.apiCaseList = response.data;
} }
this.apiCaseList.forEach(apiCase => { this.apiCaseList.forEach(apiCase => {
@ -260,7 +260,7 @@
if (!request.hashTree) { if (!request.hashTree) {
request.hashTree = []; request.hashTree = [];
} }
if(request.backScript != null){ if (request.backScript != null) {
request.hashTree.push(request.backScript); request.hashTree.push(request.backScript);
} }
let uuid = getUUID(); let uuid = getUUID();
@ -290,14 +290,11 @@
this.singleLoading = true; this.singleLoading = true;
this.singleRunId = row.id; this.singleRunId = row.id;
row.request.name = row.id; row.request.name = row.id;
this.$get('/api/definition/get/' + row.request.id, response => {
row.request.path = response.data.path; // pathpath
row.request.useEnvironment = this.environment; row.request.useEnvironment = this.environment;
row.request.projectId = getCurrentProjectID(); row.request.projectId = getCurrentProjectID();
this.runData.push(row.request); this.runData.push(row.request);
/*触发执行操作*/ /*触发执行操作*/
this.reportId = getUUID().substring(0, 8); this.reportId = getUUID().substring(0, 8);
});
}, },
batchRun() { batchRun() {