refactor(接口测试): 场景批量执行选择资源池增加校验

This commit is contained in:
wxg0103 2022-04-13 15:51:07 +08:00 committed by fit2-zhao
parent 48bd009f18
commit a2164cc46c
8 changed files with 23 additions and 0 deletions

View File

@ -158,6 +158,10 @@ export default {
this.$warning(this.$t('commons.input_name'));
return;
}
if (this.runConfig.runWithinResourcePool && this.runConfig.resourcePoolId == null) {
this.$warning(this.$t('workspace.env_group.please_select_run_within_resource_pool'));
return;
}
this.$emit("handleRunBatch", this.runConfig);
this.close();
},

View File

@ -384,6 +384,10 @@ export default {
this.$warning(this.$t('workspace.env_group.please_select_env_for_current_scenario'));
return;
}
if (this.runConfig.runWithinResourcePool && this.runConfig.resourcePoolId == null) {
this.$warning(this.$t('workspace.env_group.please_select_run_within_resource_pool'));
return;
}
}
param.config = JSON.stringify(this.runConfig);
let url = '/api/automation/schedule/create';

View File

@ -141,6 +141,10 @@ export default {
this.$warning(this.$t('commons.input_name'));
return;
}
if (this.runConfig.runWithinResourcePool && this.runConfig.resourcePoolId == null) {
this.$warning(this.$t('workspace.env_group.please_select_run_within_resource_pool'));
return;
}
this.$emit("handleRunBatch", this.runConfig);
this.close();
},

View File

@ -201,6 +201,10 @@ export default {
});
},
handleCommand(command){
if (this.runConfig.runWithinResourcePool && this.runConfig.resourcePoolId == null) {
this.$warning(this.$t('workspace.env_group.please_select_run_within_resource_pool'));
return;
}
if (command === 'run') {
this.runConfig.isRun = true
this.handleRunBatch();

View File

@ -363,6 +363,10 @@ export default {
if (!param.workspaceId) {
param.workspaceId = getCurrentWorkspaceId();
}
if (this.runConfig.runWithinResourcePool && this.runConfig.resourcePoolId == null) {
this.$warning(this.$t('workspace.env_group.please_select_run_within_resource_pool'));
return;
}
param.config = JSON.stringify(this.runConfig);
let url = '/api/automation/schedule/create';
if (this.scheduleTaskType === "TEST_PLAN_TEST") {

View File

@ -605,6 +605,7 @@ export default {
confirm: "Confirm",
please_select_env_for_current_scenario: "please select env for current scenario",
please_select_env_for_current_plan: "please select env for current plan",
please_select_run_within_resource_pool: "Please select a resource pool",
lack_env: "Environment group is missing environment",
lack_necessary_environment: "This environment group lacks the necessary project environment",
available_group: 'available',

View File

@ -607,6 +607,7 @@ export default {
confirm: "确 定",
please_select_env_for_current_scenario: "请为当前场景选择一个运行环境!",
please_select_env_for_current_plan: "请为当前测试计划选择一个运行环境!",
please_select_run_within_resource_pool: "请选择一个资源池",
lack_env: "环境组缺少环境!",
lack_necessary_environment: "此环境组缺少必要的项目环境!",
available_group: '可用环境组',

View File

@ -607,6 +607,7 @@ export default {
confirm: "確 定",
please_select_env_for_current_scenario: "請為當前場景選擇一個運行環境!",
please_select_env_for_current_plan: "請為當前测试计划選擇一個運行環境!",
please_select_run_within_resource_pool: "請選擇一個資源池",
lack_env: "環境組缺少環境!",
lack_necessary_environment: "此環境組缺少必要的項目環境!",
available_group: '可用環境組',