fix(接口测试): 报告断言统计错误修改

--bug=1017948 --user=赵勇 【接口测试】场景报告,右上角统计的断言数量显示不对 https://www.tapd.cn/55049933/s/1260434
This commit is contained in:
fit2-zhao 2022-10-13 13:35:51 +08:00 committed by f2c-ci-robot[bot]
parent 3325519075
commit 0bca1f8c24
2 changed files with 4 additions and 4 deletions

View File

@ -299,13 +299,13 @@ export default {
};
},
fail() {
return ((this.content.error && this.content.total) ? (this.content.error / this.content.total * 100).toFixed(0) : 0) + "%";
return (this.content.error / this.content.total * 100).toFixed(0) + "%";
},
assertions() {
return (this.content.passAssertion ? this.content.passAssertion : 0) + " / " + (this.content.totalAssertions ? this.content.totalAssertions : 0);
return this.content.passAssertions + " / " + this.content.totalAssertions;
},
errorCodeAssertions() {
return (this.content.errorCode ? this.content.errorCode : 0) + " / " + (this.content.totalAssertions ? this.content.totalAssertions : 0);
return this.content.errorCode + " / " + this.content.totalAssertions;
},
showUnExecuteReport() {
return (this.content.scenarioStepPending && this.content.scenarioStepPending > 0)

View File

@ -355,9 +355,9 @@ export default {
}
updateDefinition(null, null, bodyFiles, this.api).then(() => {
this.$success(this.$t('commons.save_success'));
this.$emit('saveApi', this.api);
if (this.syncTabs.indexOf(this.api.id) === -1) {
this.syncTabs.push(this.api.id);
this.$emit('syncApi', this.api);
}
});
},