fix(测试跟踪): 脑图一键展开没有展开临时节点

--bug=1015426 --user=陈建星 【测试跟踪】github#15841,未设置标签,点击保存后,用例全没了 https://www.tapd.cn/55049933/s/1215543
This commit is contained in:
chenjianxing 2022-07-29 16:06:01 +08:00 committed by jianxing
parent eee4da5c60
commit 294dbdb82a
2 changed files with 4 additions and 5 deletions

View File

@ -214,7 +214,7 @@ name: "TestCaseMinder",
listenBeforeExecCommand((even) => {
if (even.commandName === 'expandtolevel') {
let level = Number.parseInt(even.commandArgs);
handleExpandToLevel(level, even.minder.getRoot(), this.getParam(), getTestCasesForMinder);
handleExpandToLevel(level, even.minder.getRoot(), this.getParam(), getTestCasesForMinder, null, getMinderExtraNode);
}
if (handleMinderIssueDelete(even.commandName)) return; //

View File

@ -107,14 +107,13 @@ export function loadSelectNodes(param, getCaseFuc, setParamCallback, getExtraNod
});
}
export function handleExpandToLevel(level, node, param, getCaseFuc, setParamCallback) {
loadNode(node, param, getCaseFuc, setParamCallback);
export function handleExpandToLevel(level, node, param, getCaseFuc, setParamCallback, getExtraNodeFuc) {
loadNode(node, param, getCaseFuc, setParamCallback, getExtraNodeFuc);
level--;
if (level > 0) {
if (node.children) {
node.children.forEach(item => {
handleExpandToLevel(level, item, param, getCaseFuc, setParamCallback);
handleExpandToLevel(level, item, param, getCaseFuc, setParamCallback, getExtraNodeFuc);
});
}
}