fix(接口测试): 修复循环控制器调试结果状态未标记问题

--bug=1013753 --user=赵勇 【接口测试】循环控制器-次数循环,点执行按钮没标识error/success https://www.tapd.cn/55049933/s/1171866
This commit is contained in:
fit2-zhao 2022-06-01 18:00:38 +08:00 committed by f2c-ci-robot[bot]
parent 2fc5d24e01
commit b0c4a6a5ea
1 changed files with 14 additions and 0 deletions

View File

@ -188,6 +188,7 @@ export default {
onDebugMessage(e) {
if (e.data && e.data.startsWith("result_")) {
let data = JSON.parse(e.data.substring(7));
this.debugCode(data);
let resourceId = data.resourceId.split("_")[0];
if (this.requestResult.has(resourceId)) {
this.requestResult.get(resourceId).push(data);
@ -204,6 +205,16 @@ export default {
this.reload();
}
},
debugCode(data){
if(data && this.node && this.node.data) {
if (data.error > 0) {
this.node.data.code = "error";
} else {
this.node.data.code = this.node.data.code !== 'error' ? "success" : "error";
}
}
this.reload();
},
getCode() {
if (this.node && this.node.data.code && this.node.data.debug) {
if (this.node.data.code && this.node.data.code === 'error') {
@ -279,6 +290,9 @@ export default {
this.node.data.debug = true;
}
this.reportId = getUUID().substring(0, 8);
this.node.data.code="";
this.node.data.testing = false;
this.node.data.debug = true;
},
remove() {