fix(接口测试): 修复单步骤调试清空其他已有步骤结果问题

【【接口测试】场景步骤单独调试-调试步骤2结果会清空步骤1结果】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001026372

Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
fit2-zhao 2023-05-22 10:06:14 +08:00 committed by fit2-zhao
parent 8c728e250b
commit b2abc5d4d4
1 changed files with 7 additions and 2 deletions

View File

@ -1752,9 +1752,9 @@ export default {
this.$error('场景包含插件步骤,对应场景已经删除不能调试!');
return;
}
this.clearResult(this.scenarioDefinition);
let hasRequest = runScenario && runScenario.hasRequest;
if (!hasRequest) {
this.clearResult(this.scenarioDefinition);
this.clearNodeStatus(this.$refs.stepTree.root.childNodes);
}
this.saved = runScenario && runScenario.stepScenario ? false : true;
@ -2183,9 +2183,14 @@ export default {
this.debugLoading = false;
this.debugVisible = false;
this.loading = false;
this.runScenario = undefined;
this.message = 'stop';
this.debugData = {};
let hasRequest = this.runScenario && this.runScenario.hasRequest;
if (hasRequest && this.runScenario.hashTree) {
this.runScenario.hashTree[0].requestResult = [];
this.runScenario.hashTree[0].testing = false;
}
this.runScenario = undefined;
},
showScenarioParameters() {
this.$refs.scenarioParameters.open(this.currentScenario.variables, this.currentScenario.headers);