fix(接口测试): 修复禁用父级步骤,子步骤无法执行的缺陷

--bug=1033054 --user=王孝刚 【接口测试】接口自动化-A步骤下有子级步骤-禁用A步骤-单独执行子级步骤-一直显示测试中 https://www.tapd.cn/55049933/s/1446411
This commit is contained in:
wxg0103 2023-12-20 18:55:05 +08:00 committed by Craftsman
parent f2b2a95df4
commit 7103eb8bd5
1 changed files with 11 additions and 10 deletions

View File

@ -1849,17 +1849,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 (runScenario && !runScenario.stepScenario) {
let enableArray = 0;
for (let i = 0; i < this.scenarioDefinition.length; i++) {
if (!this.scenarioDefinition[i].enable) {
enableArray ++;
}
}
if (enableArray > 0 && enableArray === this.scenarioDefinition.length) {
this.$warning(this.$t('api_test.definition.request.debug_warning'));
this.debugLoading = false;
return;
}
}
if (!enableArray) {
this.$warning(this.$t('api_test.definition.request.debug_warning'));
this.debugLoading = false;
return;
}
this.stopDebug = '';