fix(接口测试): 调试时先建立ws链接,避免接收不到结果数据

This commit is contained in:
BugKing 2021-12-24 16:14:23 +08:00
parent 3bae6e7b88
commit c9a3d013fe
2 changed files with 6 additions and 6 deletions

View File

@ -73,9 +73,9 @@ export default {
scenarioId: this.runData.id, testElement: testPlan, projectId: getCurrentProjectID(), environmentMap: strMapToObj(map),
environmentType: this.environmentType, environmentGroupId: this.environmentGroupId, environmentJson: JSON.stringify(strMapToObj(map))
};
this.$emit('runRefresh', {});
saveScenario('/api/automation/run/debug', reqObj, this.runData.hashTree, this, (response) => {
this.runId = response.data;
this.$emit('runRefresh', {});
});
},
}

View File

@ -137,13 +137,13 @@ export default {
} else {
url = "/api/definition/run";
}
if (this.debug) {
this.debugSocket();
} else {
this.initWebSocket();
}
this.$fileUpload(url, null, bodyFiles, reqObj, response => {
this.requestResult = response.data;
if (this.debug) {
this.debugSocket();
} else {
this.initWebSocket();
}
this.$emit('autoCheckStatus'); //
}, error => {
this.$emit('errorRefresh', {});