From f768c5c85278338d737a1f7d62d64d1912d52d42 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 28 Feb 2023 14:32:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E8=84=91=E5=9B=BE=E4=B8=B4=E6=97=B6=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E4=BF=AE=E6=94=B9=E6=88=90=E6=A8=A1=E5=9D=97=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=85=B6=E5=AD=90=E6=A8=A1=E5=9D=97=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1021999 --user=陈建星 【测试跟踪】github#21368,用例在脑图模式下,将已经带有case的模块B1拖动到新建的非模块脑图分支B2下保存,会导致B1下的用例丢失 https://www.tapd.cn/55049933/s/1343916 --- test-track/frontend/src/business/common/minder/minderUtils.js | 2 -- test-track/frontend/src/business/module/TestCaseNodeTree.vue | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test-track/frontend/src/business/common/minder/minderUtils.js b/test-track/frontend/src/business/common/minder/minderUtils.js index eca538ef14..bc2c38051e 100644 --- a/test-track/frontend/src/business/common/minder/minderUtils.js +++ b/test-track/frontend/src/business/common/minder/minderUtils.js @@ -532,7 +532,6 @@ export function handleAfterSave(rootNode) { rootNode.data.changed = false; rootNode.data.contextChanged = false; rootNode.data.originId = null; - rootNode.data.isExtraNode = false; if (isModuleNode(rootNode)) { rootNode.data.type = 'node'; } else if (isCaseNodeData(rootNode.data)) { @@ -550,7 +549,6 @@ export function handleSaveError(rootNode) { rootNode.data.id = rootNode.data.originId; } rootNode.data.originId = null; - rootNode.data.isExtraNode = false; if (rootNode.children) { for (let i = 0; i < rootNode.children.length; i++) { handleSaveError(rootNode.children[i]); diff --git a/test-track/frontend/src/business/module/TestCaseNodeTree.vue b/test-track/frontend/src/business/module/TestCaseNodeTree.vue index 07d9248996..372b16e6f1 100644 --- a/test-track/frontend/src/business/module/TestCaseNodeTree.vue +++ b/test-track/frontend/src/business/module/TestCaseNodeTree.vue @@ -211,7 +211,8 @@ export default { if (this.$refs.nodeTree) { this.$refs.nodeTree.filter(this.condition.filterText); } - if (this.routeModuleId) { + let isCurrentNodeEqualsRouteModule = this.currentNode && this.currentNode.data && this.currentNode.data.id === this.routeModuleId; + if (this.routeModuleId && !isCurrentNodeEqualsRouteModule) { if (this.$refs.nodeTree) { this.$refs.nodeTree.setCurrentKeyById(this.routeModuleId); }