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

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

View File

@ -9,7 +9,7 @@
</div>
</div>
<el-tooltip effect="dark" :content="node.label" placement="top">
<span>{{ node.label }}</span>
<span>{{ getLable(node.label) }}</span>
</el-tooltip>
</el-card>
</div>
@ -42,6 +42,7 @@
<script>
import MsRequestResult from "./RequestResult";
import {STEP} from "@/business/components/api/automation/scenario/Setting";
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const UiCommandResult = requireComponent.keys().length > 0 ? requireComponent("./ui/automation/report/UiCommandResult.vue") : {};
@ -56,7 +57,7 @@ export default {
node: Object,
console: String,
isActive: Boolean,
isShare:Boolean,
isShare: Boolean,
shareId: String,
},
@ -66,6 +67,18 @@ export default {
}
},
methods: {
getLable(label) {
switch (label) {
case "ConstantTimer":
return "等待控制器";
case "LoopController":
return "循环控制器";
case "Assertion":
return "场景断言";
default:
return label;
}
},
active() {
this.isActive = !this.isActive;
},

View File

@ -86,9 +86,15 @@ export default {
url = '/ui/automation/run/debug';
}
saveScenario(url, reqObj, this.runData.hashTree, this, (response) => {
if(!response.success && response.data !== "SUCCESS"){
// 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") {
this.$error(response.data ? response.data : this.$t('commons.run_fail'));
this.$emit('errorRefresh');
}
}
});
},