fix(接口定义): 优化重复点击case的提示
--bug=1014874 --user=王孝刚 【接口测试】多次点击接口case列表执行按钮页面提示不友好 https://www.tapd.cn/55049933/s/1202115
This commit is contained in:
parent
d62cce8c63
commit
4907534169
|
@ -54,13 +54,13 @@ export default {
|
|||
this.websocket.onmessage = this.onMessages;
|
||||
this.websocket.onerror = this.onError;
|
||||
},
|
||||
onError(){
|
||||
onError() {
|
||||
this.$emit('runRefresh', "");
|
||||
this.$error("The connection is abnormal, please check the environment configuration");
|
||||
this.$error(this.$t('api_test.automation.rerun_warning'));
|
||||
},
|
||||
onMessages(e) {
|
||||
// 确认连接建立成功,开始执行
|
||||
if(e && e.data === "CONN_SUCCEEDED"){
|
||||
if (e && e.data === "CONN_SUCCEEDED") {
|
||||
this.run();
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,10 @@ export default {
|
|||
stepArray[i].clazzName = TYPE_TO_C.get(stepArray[i].type);
|
||||
}
|
||||
if (stepArray[i].type === "Assertions" && !stepArray[i].document) {
|
||||
stepArray[i].document = {type: "JSON", data: {xmlFollowAPI: false, jsonFollowAPI: false, json: [], xml: []}};
|
||||
stepArray[i].document = {
|
||||
type: "JSON",
|
||||
data: {xmlFollowAPI: false, jsonFollowAPI: false, json: [], xml: []}
|
||||
};
|
||||
}
|
||||
if (stepArray[i] && stepArray[i].authManager && !stepArray[i].authManager.clazzName) {
|
||||
stepArray[i].authManager.clazzName = TYPE_TO_C.get(stepArray[i].authManager.type);
|
||||
|
@ -122,7 +125,14 @@ export default {
|
|||
})
|
||||
this.sort(testPlan.hashTree);
|
||||
this.requestResult.reportId = this.reportId;
|
||||
let reqObj = {id: this.reportId, testElement: testPlan, type: this.type, clazzName: this.clazzName ? this.clazzName : TYPE_TO_C.get(this.type), projectId: projectId, environmentMap: strMapToObj(this.envMap)};
|
||||
let reqObj = {
|
||||
id: this.reportId,
|
||||
testElement: testPlan,
|
||||
type: this.type,
|
||||
clazzName: this.clazzName ? this.clazzName : TYPE_TO_C.get(this.type),
|
||||
projectId: projectId,
|
||||
environmentMap: strMapToObj(this.envMap)
|
||||
};
|
||||
let bodyFiles = getBodyUploadFiles(reqObj, this.runData);
|
||||
reqObj.editCaseRequest = this.editCaseRequest;
|
||||
reqObj.debug = this.debug;
|
||||
|
|
|
@ -1440,6 +1440,7 @@ export default {
|
|||
request_error: "error",
|
||||
generate_report: "Generate report",
|
||||
rerun: "fail and rerun",
|
||||
rerun_warning: "The connection is abnormal, please check the environment configuration",
|
||||
},
|
||||
environment: {
|
||||
id: 'Environment ID',
|
||||
|
|
|
@ -1445,6 +1445,7 @@ export default {
|
|||
request_error: "失败",
|
||||
generate_report: "生成报告",
|
||||
rerun: "失败重跑",
|
||||
rerun_warning: "连接异常,请检查环境配置",
|
||||
},
|
||||
environment: {
|
||||
id: '环境ID',
|
||||
|
|
|
@ -1445,6 +1445,7 @@ export default {
|
|||
request_error: "失敗",
|
||||
generate_report: "生成報告",
|
||||
rerun: "失敗重跑",
|
||||
rerun_warning: "連接異常,請檢查環境配置",
|
||||
},
|
||||
environment: {
|
||||
id: '環境ID',
|
||||
|
|
Loading…
Reference in New Issue