避免异常状态导致无限循环
This commit is contained in:
parent
907da39d8d
commit
2f1a299f27
|
@ -62,7 +62,7 @@
|
|||
let url = "/api/report/get/" + this.reportId;
|
||||
this.$get(url, response => {
|
||||
this.report = response.data || {};
|
||||
if (this.isCompleted) {
|
||||
if (this.isNotRunning) {
|
||||
this.content = JSON.parse(this.report.content);
|
||||
this.getFails();
|
||||
this.loading = false;
|
||||
|
@ -73,7 +73,7 @@
|
|||
}
|
||||
},
|
||||
getFails() {
|
||||
if (this.isCompleted) {
|
||||
if (this.isNotRunning) {
|
||||
this.fails = [];
|
||||
this.content.scenarios.forEach((scenario) => {
|
||||
let failScenario = Object.assign({}, scenario);
|
||||
|
@ -108,8 +108,8 @@
|
|||
path() {
|
||||
return "/api/test/edit?id=" + this.report.testId;
|
||||
},
|
||||
isCompleted() {
|
||||
return "Completed" === this.report.status;
|
||||
isNotRunning() {
|
||||
return "Running" !== this.report.status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue