diff --git a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue index 8e65deecc7..e9c189a7fa 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" /> @@ -60,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) { @@ -83,7 +87,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 = []; @@ -117,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/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, 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: '請輸入關聯用例名稱',