refactor(接口测试): 报告步骤命名和场景步骤统一

--bug=1014239 --user=赵勇 【接口测试】github#15047场景用例执行成功后,等待控制器会变成英文 https://www.tapd.cn/55049933/s/1186534
This commit is contained in:
fit2-zhao 2022-06-20 11:59:46 +08:00 committed by fit2-zhao
parent bcdfb828c2
commit eb4d89fb4d
2 changed files with 21 additions and 3 deletions

View File

@ -10,9 +10,9 @@
</div> </div>
<el-tooltip effect="dark" :content="node.label" placement="top"> <el-tooltip effect="dark" :content="node.label" placement="top">
<el-link v-if="node.redirect" class="report-label-head" @click="isLink"> <el-link v-if="node.redirect" class="report-label-head" @click="isLink">
{{ node.label }} {{ getLable(node.label) }}
</el-link> </el-link>
<span v-else>{{ node.label }}</span> <span v-else>{{ getLable(node.label) }}</span>
</el-tooltip> </el-tooltip>
</el-card> </el-card>
</div> </div>
@ -70,6 +70,18 @@ export default {
} }
}, },
methods: { methods: {
getLable(label) {
switch (label) {
case "ConstantTimer":
return "等待控制器";
case "LoopController":
return "循环控制器";
case "Assertion":
return "场景断言";
default:
return label;
}
},
isLink() { isLink() {
let uri = "/#/api/automation?resourceId=" + this.node.resourceId; let uri = "/#/api/automation?resourceId=" + this.node.resourceId;
this.clickResource(uri) this.clickResource(uri)

View File

@ -86,10 +86,16 @@ export default {
url = '/ui/automation/run/debug'; url = '/ui/automation/run/debug';
} }
saveScenario(url, reqObj, this.runData.hashTree, this, (response) => { saveScenario(url, reqObj, this.runData.hashTree, this, (response) => {
// ui
if (url.startsWith("/api") &&response.data!== "SUCCESS") {
this.$error(response.data ? response.data : this.$t('commons.run_fail'));
this.$emit('errorRefresh');
} else {
if (!response.success &&response.data!=="SUCCESS") { if (!response.success &&response.data!=="SUCCESS") {
this.$error(response.data ? response.data : this.$t('commons.run_fail')); this.$error(response.data ? response.data : this.$t('commons.run_fail'));
this.$emit('errorRefresh'); this.$emit('errorRefresh');
} }
}
}); });
}, },
} }