fix(接口测试): 修复dubbo协议执行时环境校验提示问题

--bug=1013290 --user=赵勇 【接口定义】sql协议,执行case时提示“请选择环境”,其实已经选了环境 https://www.tapd.cn/55049933/s/1160494
This commit is contained in:
fit2-zhao 2022-05-19 15:07:17 +08:00 committed by f2c-ci-robot[bot]
parent 142c452ed2
commit 0f61a0bb42
3 changed files with 8 additions and 4 deletions

View File

@ -905,8 +905,6 @@ export default {
this.debugReportId = getUUID().substring(0, 8);
this.messageWebSocket = getReportMessageSocket(this.debugReportId);
this.messageWebSocket.onmessage = this.onDebugMessage;
//
this.messageWebSocket.onopen = this.run();
},
runningEditParent(node) {
if (node.parent && node.parent.data && node.parent.data.id) {
@ -983,6 +981,10 @@ export default {
}
},
onDebugMessage(e) {
//
if(e && e.data === "CONN_SUCCEEDED"){
this.run();
}
if (e.data && e.data.startsWith("result_")) {
let data = JSON.parse(e.data.substring(7));
this.reqTotal += 1;

View File

@ -423,7 +423,8 @@ export default {
});
},
singleRun(data) {
if (data.apiMethod !== "SQL" && data.apiMethod !== "DUBBO" && data.apiMethod !== "dubbo://" && data.apiMethod !== "TCP" && !this.environment) {
let methods =["SQL","DUBBO","dubbo://","TCP" ];
if (data.apiMethod && methods.indexOf(data.apiMethod) === -1 && !this.environment) {
this.$warning(this.$t('api_test.environment.select_environment'));
return;
}

View File

@ -524,7 +524,8 @@ export default {
this.$emit('showExecResult', row);
},
singleRun(row) {
if (row.apiMethod !== "SQL" && row.apiMethod !== "DUBBO" && row.apiMethod !== "dubbo://" && row.apiMethod !== "TCP" && !this.environment) {
let methods =["SQL","DUBBO","dubbo://","TCP" ];
if (row.apiMethod && methods.indexOf(row.apiMethod) === -1 && !this.environment) {
this.$warning(this.$t('api_test.environment.select_environment'));
return;
}