fix(接口测试): 修复case执行后立即查看执行结果,结果还是上一次执行结果的缺陷
--bug=1027128 --user=王孝刚 【接口测试】接口case-列表执行接口case-第一次成功,第二次失败,立即查看执行结果是第一次的成功信息 https://www.tapd.cn/55049933/s/1386046
This commit is contained in:
parent
f307f5abfa
commit
7206e6caf6
|
@ -442,11 +442,12 @@ export default {
|
|||
this.apiCaseList[0].execResult = status;
|
||||
this.apiCaseList[0].responseData = data;
|
||||
this.apiCaseList[0].passRate = passRate;
|
||||
this.apiCaseList[0].reportId = data.threadName;
|
||||
this.$refs.apiCaseItem.runLoading = false;
|
||||
if (this.$refs.apiCaseItem && this.$refs.apiCaseItem[0]) {
|
||||
this.$refs.apiCaseItem[0].reload();
|
||||
}
|
||||
store.currentApiCase = { refresh: true, id: data.id, status: status, passRate: passRate };
|
||||
store.currentApiCase = { refresh: true, id: data.id, status: status, passRate: passRate, reportId: data.threadName };
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -663,7 +663,7 @@ export default {
|
|||
},
|
||||
storeCurrentApiCaseRefresh() {
|
||||
if (store.currentApiCase && store.currentApiCase.refresh) {
|
||||
this.setStatus(store.currentApiCase.id, store.currentApiCase.status, store.currentApiCase.passRate);
|
||||
this.setStatus(store.currentApiCase.id, store.currentApiCase.status, store.currentApiCase.passRate, store.currentApiCase.reportId);
|
||||
}
|
||||
store.currentApiCase = {};
|
||||
},
|
||||
|
@ -743,12 +743,13 @@ export default {
|
|||
customHeader() {
|
||||
this.$refs.caseTable.openCustomHeader();
|
||||
},
|
||||
setStatus(id, status, passRate) {
|
||||
setStatus(id, status, passRate, reportId) {
|
||||
this.tableData.forEach((item) => {
|
||||
if (id && id === item.id) {
|
||||
item.status = status;
|
||||
item.execResult = status;
|
||||
item.passRate = passRate;
|
||||
item.lastResultId = reportId;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue