fix(接口定义): 修复自定义请求转存为接口后,没有选环境但case可执行的缺陷
--bug=1018314 --user=王孝刚 【接口测试】接口场景自定义请求转接口后自带CASE,但运行环境显示为NULL,且可以直接运行 https://www.tapd.cn/55049933/s/1265809
This commit is contained in:
parent
97725c4495
commit
fb42e27062
|
@ -483,7 +483,7 @@ export default {
|
||||||
},
|
},
|
||||||
singleRun(data) {
|
singleRun(data) {
|
||||||
let methods = ["SQL", "DUBBO", "dubbo://", "TCP"];
|
let methods = ["SQL", "DUBBO", "dubbo://", "TCP"];
|
||||||
if (data.apiMethod && methods.indexOf(data.apiMethod) === -1 && this.environment === undefined) {
|
if (data.apiMethod && methods.indexOf(data.apiMethod) === -1 && (!this.environment || this.environment === undefined)) {
|
||||||
this.$warning(this.$t('api_test.environment.select_environment'));
|
this.$warning(this.$t('api_test.environment.select_environment'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,7 +252,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.api = api;
|
this.api = api;
|
||||||
if(this.currentApi && api) {
|
if (this.currentApi && api) {
|
||||||
Object.assign(this.currentApi, api);
|
Object.assign(this.currentApi, api);
|
||||||
}
|
}
|
||||||
this.addCase();
|
this.addCase();
|
||||||
|
@ -575,7 +575,7 @@ export default {
|
||||||
},
|
},
|
||||||
singleRun(row) {
|
singleRun(row) {
|
||||||
let methods = ["SQL", "DUBBO", "dubbo://", "TCP"];
|
let methods = ["SQL", "DUBBO", "dubbo://", "TCP"];
|
||||||
if (row.apiMethod && methods.indexOf(row.apiMethod) === -1 && this.environment === undefined) {
|
if (row.apiMethod && methods.indexOf(row.apiMethod) === -1 && (!this.environment || this.environment === undefined)) {
|
||||||
this.$warning(this.$t('api_test.environment.select_environment'));
|
this.$warning(this.$t('api_test.environment.select_environment'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue