fix(接口测试): 修复场景调试丢失测试中信息的缺陷

--bug=1028173 --user=王孝刚 【接口测试】github#25873,v2.10.3-lts 接口自动化调试时
步骤中丢失了测试中的提示信息 https://www.tapd.cn/55049933/s/1398164
This commit is contained in:
wxg0103 2023-07-26 19:02:31 +08:00 committed by fit2-zhao
parent 7f4c0a1a04
commit 68807547e6
1 changed files with 24 additions and 0 deletions

View File

@ -1247,6 +1247,29 @@ export default {
});
}
},
nodeTesting(arr, resultData) {
arr.forEach((item) => {
if (item.data && item.data.id + '_' + item.data.parentIndex === resultData) {
item.data.testing = true;
this.runningEditParent(item.parent);
}
if (item.childNodes && item.childNodes.length > 0) {
this.nodeTesting(item.childNodes, resultData);
}
});
},
testing(resultData) {
if (this.$refs.stepTree && this.$refs.stepTree.root) {
this.$refs.stepTree.root.childNodes.forEach((item) => {
if (item.data && item.data.id + '_' + item.data.parentIndex === resultData) {
item.data.testing = true;
}
if (item.childNodes && item.childNodes.length > 0) {
this.nodeTesting(item.childNodes, resultData);
}
});
}
},
onDebugMessage(e) {
//
if (e && e.data === 'CONN_SUCCEEDED') {
@ -1257,6 +1280,7 @@ export default {
this.messageWebSocket.close();
this.errorRefresh();
}
this.testing(e.data);
if (e.data && e.data.startsWith('result_')) {
let data = JSON.parse(e.data.substring(7));
this.reqTotal += 1;