diff --git a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue index 7c15a8ad22..bfa5f47835 100644 --- a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue +++ b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue @@ -464,6 +464,14 @@ name: "TestCaseMinder", let steps = []; let stepNum = 1; if (node.children) { + let prerequisiteNodes = node.children.filter(childNode => childNode.data.resource && childNode.data.resource.indexOf(this.$t('test_track.case.prerequisite')) > -1); + if (prerequisiteNodes.length > 1) { + this.throwError('[' + testCase.name + ']' + this.$t('test_track.case.exists_multiple_prerequisite_node')); + } + let remarkNodes = node.children.filter(childNode => childNode.data.resource && childNode.data.resource.indexOf(this.$t('commons.remark')) > -1); + if (remarkNodes.length > 1) { + this.throwError('[' + testCase.name + ']' + this.$t('test_track.case.exists_multiple_remark_node')); + } node.children.forEach((childNode) => { let childData = childNode.data; if (childData.type === 'issue') return; diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index d157e4cd15..40d91bab99 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -2222,7 +2222,9 @@ export default { export_tip: "Switch to Case List and check Use Case Export" }, case_desc: "Case Desc", - passing_rate: 'Case Pass Rate' + passing_rate: 'Case Pass Rate', + exists_multiple_prerequisite_node: "Exists multiple precondition node", + exists_multiple_remark_node: "Exists multiple remark node", }, plan: { test_plan: "Plan", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index e393782426..4eba5d7740 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -2223,6 +2223,8 @@ export default { passing_rate: '用例通过率', version: "版本", sync_to_new_version: "复制以下信息到新版本", + exists_multiple_prerequisite_node: "下存在多个前置条件", + exists_multiple_remark_node: "下存在多个备注", }, plan: { test_plan: "测试计划", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index d4948b3cd7..b537c0b320 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -2217,6 +2217,8 @@ export default { case_desc: "用例描述", passing_rate: '用例通過率', sync_to_new_version: "復製以下信息到新版本", + exists_multiple_prerequisite_node: "下存在多個前置條件", + exists_multiple_remark_node: "下存在多個備註" }, plan: { test_plan: "測試計劃",