避免异常状态导致无限循环

This commit is contained in:
q4speed 2020-05-22 17:56:19 +08:00
parent 907da39d8d
commit 2f1a299f27
1 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@
let url = "/api/report/get/" + this.reportId; let url = "/api/report/get/" + this.reportId;
this.$get(url, response => { this.$get(url, response => {
this.report = response.data || {}; this.report = response.data || {};
if (this.isCompleted) { if (this.isNotRunning) {
this.content = JSON.parse(this.report.content); this.content = JSON.parse(this.report.content);
this.getFails(); this.getFails();
this.loading = false; this.loading = false;
@ -73,7 +73,7 @@
} }
}, },
getFails() { getFails() {
if (this.isCompleted) { if (this.isNotRunning) {
this.fails = []; this.fails = [];
this.content.scenarios.forEach((scenario) => { this.content.scenarios.forEach((scenario) => {
let failScenario = Object.assign({}, scenario); let failScenario = Object.assign({}, scenario);
@ -108,8 +108,8 @@
path() { path() {
return "/api/test/edit?id=" + this.report.testId; return "/api/test/edit?id=" + this.report.testId;
}, },
isCompleted() { isNotRunning() {
return "Completed" === this.report.status; return "Running" !== this.report.status;
} }
} }
} }