diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 9382a41cfe..a5855a2bdd 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -1437,7 +1437,7 @@ export default { this.reportId = this.debugReportId; }, runDebug(runScenario) { - if(this.debugLoading){ + if (this.debugLoading) { return; } this.debugLoading = true; @@ -1445,6 +1445,18 @@ export default { this.debugLoading = false; return; } + let enableArray; + for (let i = 0; i < this.scenarioDefinition.length; i++) { + if (this.scenarioDefinition[i].enable) { + enableArray = this.scenarioDefinition[i]; + break; + } + } + if (!enableArray) { + this.$warning(this.$t('api_test.definition.request.debug_warning')); + this.debugLoading = false; + return; + } this.stopDebug = ""; this.clearDebug(); this.validatePluginData(this.scenarioDefinition); diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index d8fca969a1..d60f85a820 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -1255,6 +1255,7 @@ export default { batch_copy_end: "Batch Copy Over", delete_case_confirm: "Confirm case deletion", delete_confirm_step: "Confirm deletion step", + debug_warning: "No steps to turn on", assertions_rule: "Assertion rule", scenario_assertions: "Scenario assertion rule", pre_operation: "Pre operation", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index a9364abb0c..aa17ee2354 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -1261,6 +1261,7 @@ export default { batch_copy_end: "批量复制完成", delete_case_confirm: "确认删除用例", delete_confirm_step: "确认删除步骤", + debug_warning: "没有开启的步骤", assertions_rule: "断言规则", scenario_assertions: "场景断言", pre_operation: "前置操作", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index e8a998c190..ad263f23cf 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -1261,6 +1261,7 @@ export default { batch_copy_end: "批量復製完成", delete_case_confirm: "確認刪除用例", delete_confirm_step: "確認刪除步驟", + debug_warning: "沒有開啟的步驟", assertions_rule: "斷言規則", scenario_assertions: "場景斷言", pre_operation: "前置操作",