fix(接口测试): 修复当前项目场景默认环境选择问题

--bug=1028762 --user=赵勇 【接口测试】场景详情-引用场景-当前项目和更多项目环境均为空-未勾选原环境-调试/生成报告-引用场景步骤执行成功 https://www.tapd.cn/55049933/s/1403899

Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
fit2-zhao 2023-08-15 16:31:56 +08:00 committed by fit2-zhao
parent b1c0630ddc
commit ab6f9f65db
2 changed files with 3 additions and 7 deletions

View File

@ -88,10 +88,6 @@ public class MsScenario extends MsTestElement {
this.environmentMap.put(RunModeConstants.HIS_PRO_ID.toString(), environmentId); this.environmentMap.put(RunModeConstants.HIS_PRO_ID.toString(), environmentId);
} }
} }
if (this.environmentMap != null && !this.environmentMap.isEmpty()) {
this.setEnv(this.environmentMap, envConfig);
config.setConfig(envConfig);
}
} else { } else {
Map<String, EnvironmentConfig> map = config.getConfig(); Map<String, EnvironmentConfig> map = config.getConfig();
for (EnvironmentConfig evnConfig : map.values()) { for (EnvironmentConfig evnConfig : map.values()) {

View File

@ -2051,10 +2051,10 @@ export default {
this.scenarioDefinition = obj.hashTree; this.scenarioDefinition = obj.hashTree;
this.$nextTick(() => { this.$nextTick(() => {
let data = this.scenarioDefinition; let data = this.scenarioDefinition;
if (data.hashTree) { if (data && data instanceof Array) {
this.sort(data.hashTree); this.sort(data);
let domainMap = new Map(); let domainMap = new Map();
this.getEnvDomain(data.hashTree, domainMap); this.getEnvDomain(data, domainMap);
this.margeDomain(this.scenarioDefinition, domainMap); this.margeDomain(this.scenarioDefinition, domainMap);
this.cancelBatchProcessing(); this.cancelBatchProcessing();
} }