From 4e10b2eec7f95f8593ea6984ca43bf3f5f71a8a2 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 22 Mar 2021 17:45:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=84=91=E5=9B=BE=E4=BC=98=E5=85=88?= =?UTF-8?q?=E7=BA=A7=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/components/track/common/minder/TestCaseMinder.vue | 3 ++- .../src/business/components/track/common/minder/minderUtils.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue index 8e65deecc7..b61bb931f8 100644 --- a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue +++ b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue @@ -4,6 +4,7 @@ :tree-nodes="treeNodes" :data-map="dataMap" :tags="tags" + :distinct-tags="tags" @save="save" /> @@ -83,7 +84,7 @@ name: "TestCaseMinder", type: data.type ? data.type : 'functional', method: data.method ? data.method: 'manual', maintainer: data.maintainer, - priority: 'P' + (data.priority ? data.priority : 0), + priority: 'P' + (data.priority ? data.priority - 1 : 0), }; if (data.changed) isChange = true; let steps = []; diff --git a/frontend/src/business/components/track/common/minder/minderUtils.js b/frontend/src/business/components/track/common/minder/minderUtils.js index 29c77aa44c..696958b8ac 100644 --- a/frontend/src/business/components/track/common/minder/minderUtils.js +++ b/frontend/src/business/components/track/common/minder/minderUtils.js @@ -10,7 +10,7 @@ export function getTestCaseDataMap(testCase, isDisable, setParamCallback) { data: { id: item.id, text: item.name, - priority: Number.parseInt(item.priority.substring(item.priority.length - 1 )), + priority: Number.parseInt(item.priority.substring(item.priority.length - 1 )) + 1, resource: ["用例"], type: item.type, method: item.method, From 62959225a10cf8c7832a3ab1cd241a437c21a72b Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 22 Mar 2021 18:25:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E8=84=91=E5=9B=BE=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/track/common/minder/TestCaseMinder.vue | 8 ++++++++ frontend/src/i18n/en-US.js | 1 + frontend/src/i18n/zh-CN.js | 1 + frontend/src/i18n/zh-TW.js | 1 + 4 files changed, 11 insertions(+) diff --git a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue index b61bb931f8..e9c189a7fa 100644 --- a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue +++ b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue @@ -61,6 +61,9 @@ name: "TestCaseMinder", buildSaveCase(root, saveCases, parent) { let data = root.data; if (data.resource && data.resource.indexOf(this.$t('api_test.definition.request.case')) > -1) { + if (root.parent) { + console.log(root.parent); + } this._buildSaveCase(root, saveCases, parent); } else { if (root.children) { @@ -118,6 +121,11 @@ name: "TestCaseMinder", if (isChange) { saveCases.push(testCase); } + if (testCase.nodeId.length < 15) { + let tip = this.$t('test_track.case.create_case') + "'" + testCase.name + "'" + this.$t('test_track.case.minder_create_tip'); + this.$error(tip) + throw new Error(tip); + } }, } diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 176bab3a38..502c42e06a 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -1128,6 +1128,7 @@ export default { case: { list: "List", minder: "Minder", + minder_create_tip: "failed, unable to create its parent module in minder", check_select: "Please check the case", export_all_cases: 'Are you sure you want to export all use cases?', input_test_case: 'Please enter the associated case name', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 92c1487d2d..684f4abf22 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -1132,6 +1132,7 @@ export default { case: { list: "列表", minder: "脑图", + minder_create_tip: "失败, 无法在脑图创建其父模块", check_select: "请勾选用例", export_all_cases: '确定要导出全部用例吗?', input_test_case: '请输入关联用例名称', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index bcf7553560..54185a8feb 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -1130,6 +1130,7 @@ export default { case: { list: "列表", minder: "腦圖", + minder_create_tip: "失敗, 無法在腦圖創建其父模塊", check_select: "請勾選用例", export_all_cases: '確定要導出全部用例嗎?', input_test_case: '請輸入關聯用例名稱',