提交 c7c55541 编写于 作者: S shiziyuan9527 提交者: fit2-zhao

refactor(场景自动化): 调试前检查运行环境

上级 b3d3955c
......@@ -784,16 +784,16 @@
},
runDebug() {
/*触发执行操作*/
this.$refs['currentScenario'].validate((valid) => {
if (valid) {
let definition = JSON.parse(JSON.stringify(this.currentScenario));
definition.hashTree = this.scenarioDefinition;
this.getEnv(JSON.stringify(definition)).then(() => {
let sign = this.$refs.envPopover.checkEnv(this.isFullUrl);
if (!sign) {
return;
}
this.$refs['currentScenario'].validate((valid) => {
if (valid) {
Promise.all([
this.editScenario()]).then(val => {
if (val) {
this.editScenario().then(() => {
this.debugData = {
id: this.currentScenario.id,
name: this.currentScenario.name,
......@@ -806,8 +806,8 @@
hashTree: this.scenarioDefinition
};
this.reportId = getUUID().substring(0, 8);
}
});
})
})
}
})
},
......@@ -976,12 +976,15 @@
});
},
getEnv(definition) {
return new Promise((resolve) => {
this.$post("/api/automation/getApiScenarioEnv", {definition: definition}, res => {
if (res.data) {
this.projectIds = new Set(res.data.projectIds);
this.isFullUrl = res.data.fullUrl;
}
resolve();
})
});
},
getApiScenario() {
this.loading = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册