From 0e1e9db48f270574a1781e42008edaae0bc54abf Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 22 Mar 2022 11:08:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E6=A0=91=E4=B8=8D=E5=B1=95=E7=A4=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1011526 --user=王孝刚 【接口测试】-接口定义中-导入的接口模块默认全部为空了+左侧更多操作中创建接口后默认模块是空,以上两种情况导致左侧树不统计接口数量 https://www.tapd.cn/55049933/s/1123106 --- .../api/service/ApiAutomationService.java | 2 +- .../api/service/ApiDefinitionService.java | 4 ++-- .../api/service/ApiModuleService.java | 6 +++--- .../api/service/ApiScenarioModuleService.java | 4 ++-- .../track/service/TestCaseNodeService.java | 15 +++------------ .../track/service/TestCaseService.java | 2 +- .../xmind/pojo/TestCaseXmindData.java | 2 +- .../db/migration/V110__v1.19_release.sql | 17 +---------------- .../resources/i18n/messages_en_US.properties | 2 -- .../resources/i18n/messages_zh_CN.properties | 2 -- .../resources/i18n/messages_zh_TW.properties | 2 -- .../automation/scenario/ApiScenarioModule.vue | 8 +------- .../definition/components/module/ApiModule.vue | 8 +------- .../track/case/components/TestCaseEdit.vue | 3 --- .../track/case/components/TestCaseList.vue | 1 - .../track/common/TestCaseNodeTree.vue | 6 ++---- .../comonents/functional/TestPlanFunctional.vue | 7 ------- .../functional/TestPlanFunctionalRelevance.vue | 3 --- .../comonents/load/TestCaseLoadRelevance.vue | 3 --- .../track/review/view/TestCaseReviewView.vue | 7 ------- .../view/components/TestReviewFunction.vue | 7 ------- .../review/view/components/TestReviewLoad.vue | 7 ------- .../view/components/TestReviewRelevance.vue | 3 --- frontend/src/i18n/en-US.js | 8 ++++---- frontend/src/i18n/zh-CN.js | 6 +++--- frontend/src/i18n/zh-TW.js | 6 +++--- 26 files changed, 28 insertions(+), 113 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 40d991090c..f672114de4 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -1314,7 +1314,7 @@ public class ApiAutomationService { private void replenishScenarioModuleIdPath(String request, ApiScenarioModuleMapper apiScenarioModuleMapper, ApiScenarioWithBLOBs item) { ApiScenarioModuleExample example = new ApiScenarioModuleExample(); - example.createCriteria().andProjectIdEqualTo(request).andNameEqualTo("UNPLANNED"); + example.createCriteria().andProjectIdEqualTo(request).andNameEqualTo("未规划场景"); List modules = apiScenarioModuleMapper.selectByExample(example); if (CollectionUtils.isNotEmpty(modules)) { item.setApiScenarioModuleId(modules.get(0).getId()); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index b629487b8b..4c686f25d1 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -1114,7 +1114,7 @@ public class ApiDefinitionService { private void setModule(ApiDefinitionWithBLOBs item) { if (item != null && StringUtils.isEmpty(item.getModuleId()) || "default-module".equals(item.getModuleId())) { ApiModuleExample example = new ApiModuleExample(); - example.createCriteria().andProjectIdEqualTo(item.getProjectId()).andProtocolEqualTo(item.getProtocol()).andNameEqualTo("UNPLANNED"); + example.createCriteria().andProjectIdEqualTo(item.getProjectId()).andProtocolEqualTo(item.getProtocol()).andNameEqualTo("未规划接口"); List modules = apiModuleMapper.selectByExample(example); if (CollectionUtils.isNotEmpty(modules)) { item.setModuleId(modules.get(0).getId()); @@ -2031,7 +2031,7 @@ public class ApiDefinitionService { public void initModulePathAndId(String projectId, ApiDefinitionWithBLOBs test) { ApiModuleExample example = new ApiModuleExample(); - example.createCriteria().andProjectIdEqualTo(projectId).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("UNPLANNED"); + example.createCriteria().andProjectIdEqualTo(projectId).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("未规划接口"); List modules = apiModuleMapper.selectByExample(example); if (CollectionUtils.isNotEmpty(modules)) { test.setModuleId(modules.get(0).getId()); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java index 210928f046..fb94f2353f 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java @@ -527,12 +527,12 @@ public class ApiModuleService extends NodeTreeService { public ApiModule getDefaultNode(String projectId,String protocol) { ApiModuleExample example = new ApiModuleExample(); - example.createCriteria().andProjectIdEqualTo(projectId).andProtocolEqualTo(protocol).andNameEqualTo("UNPLANNED").andParentIdIsNull(); + example.createCriteria().andProjectIdEqualTo(projectId).andProtocolEqualTo(protocol).andNameEqualTo("未规划接口").andParentIdIsNull(); List list = apiModuleMapper.selectByExample(example); if (CollectionUtils.isEmpty(list)) { ApiModule record = new ApiModule(); record.setId(UUID.randomUUID().toString()); - record.setName("UNPLANNED"); + record.setName("未规划接口"); record.setProtocol(protocol); record.setPos(1.0); record.setLevel(1); @@ -549,7 +549,7 @@ public class ApiModuleService extends NodeTreeService { public ApiModule getDefaultNodeUnCreateNew(String projectId,String protocol) { ApiModuleExample example = new ApiModuleExample(); - example.createCriteria().andProjectIdEqualTo(projectId).andProtocolEqualTo(protocol).andNameEqualTo("UNPLANNED").andParentIdIsNull(); + example.createCriteria().andProjectIdEqualTo(projectId).andProtocolEqualTo(protocol).andNameEqualTo("未规划接口").andParentIdIsNull(); List list = apiModuleMapper.selectByExample(example); if (CollectionUtils.isEmpty(list)) { return null; diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java index 5bc73cb2ad..208d1cc11d 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java @@ -454,12 +454,12 @@ public class ApiScenarioModuleService extends NodeTreeService list = apiScenarioModuleMapper.selectByExample(example); if (CollectionUtils.isEmpty(list)) { ApiScenarioModule record = new ApiScenarioModule(); record.setId(UUID.randomUUID().toString()); - record.setName("UNPLANNED"); + record.setName("未规划场景"); record.setPos(1.0); record.setLevel(1); record.setCreateTime(System.currentTimeMillis()); diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java index 437ada2085..0483f54306 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java @@ -121,13 +121,13 @@ public class TestCaseNodeService extends NodeTreeService { public TestCaseNode getDefaultNode(String projectId) { TestCaseNodeExample example = new TestCaseNodeExample(); - example.createCriteria().andProjectIdEqualTo(projectId).andNameEqualTo("UNPLANNED").andParentIdIsNull(); + example.createCriteria().andProjectIdEqualTo(projectId).andNameEqualTo("未规划用例").andParentIdIsNull(); List list = testCaseNodeMapper.selectByExample(example); if (CollectionUtils.isEmpty(list)) { NodeNumDTO record = new NodeNumDTO(); record.setId(UUID.randomUUID().toString()); record.setCreateUser(SessionUtils.getUserId()); - record.setName("UNPLANNED"); + record.setName("未规划用例"); record.setPos(1.0); record.setLevel(1); record.setCreateTime(System.currentTimeMillis()); @@ -420,7 +420,6 @@ public class TestCaseNodeService extends NodeTreeService { Iterator itemIterator = nodeNameList.iterator(); Boolean hasNode = false; String rootNodeName; - String path; if (nodeNameList.size() <= 1) { throw new ExcelException(Translator.get("test_case_create_module_fail") + ":" + item); @@ -428,16 +427,11 @@ public class TestCaseNodeService extends NodeTreeService { itemIterator.next(); itemIterator.remove(); rootNodeName = itemIterator.next().trim(); - path = "/" + rootNodeName; - if (StringUtils.equals(rootNodeName, Translator.get("unplanned_case"))) { - rootNodeName = "UNPLANNED"; - path = "/未规划用例"; - } //原来没有,新建的树nodeTrees也不包含 for (TestCaseNodeDTO nodeTree : nodeTrees) { if (StringUtils.equals(rootNodeName, nodeTree.getName())) { hasNode = true; - createNodeByPathIterator(itemIterator, path, nodeTree, + createNodeByPathIterator(itemIterator, "/" + rootNodeName, nodeTree, pathMap, projectId, 2); } } @@ -696,9 +690,6 @@ public class TestCaseNodeService extends NodeTreeService { TestCaseNode testCaseNode = testCaseNodeMapper.selectByPrimaryKey(moduleId); LinkedList returnList = new LinkedList<>(); - if (StringUtils.equals(testCaseNode.getName(), "UNPLANNED")) { - testCaseNode.setName("未规划用例"); - } while (testCaseNode != null) { returnList.addFirst(testCaseNode); if (testCaseNode.getParentId() == null) { diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index 7e071a4d3a..d4470c1373 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -168,7 +168,7 @@ public class TestCaseService { private void setNode(TestCaseWithBLOBs testCase) { if (StringUtils.isEmpty(testCase.getNodeId()) || "default-module".equals(testCase.getNodeId())) { TestCaseNodeExample example = new TestCaseNodeExample(); - example.createCriteria().andProjectIdEqualTo(testCase.getProjectId()).andNameEqualTo("UNPLANNED"); + example.createCriteria().andProjectIdEqualTo(testCase.getProjectId()).andNameEqualTo("未规划用例"); List nodes = testCaseNodeMapper.selectByExample(example); if (CollectionUtils.isNotEmpty(nodes)) { testCase.setNodeId(nodes.get(0).getId()); diff --git a/backend/src/main/java/io/metersphere/xmind/pojo/TestCaseXmindData.java b/backend/src/main/java/io/metersphere/xmind/pojo/TestCaseXmindData.java index e039beb007..fc12f1f1f7 100644 --- a/backend/src/main/java/io/metersphere/xmind/pojo/TestCaseXmindData.java +++ b/backend/src/main/java/io/metersphere/xmind/pojo/TestCaseXmindData.java @@ -65,7 +65,7 @@ public class TestCaseXmindData { } } if (!matching) { - TestCaseXmindData child = new TestCaseXmindData(caseNode.getId(), dataList.get(0).getNodePath()); + TestCaseXmindData child = new TestCaseXmindData(caseNode.getId(), caseNode.getName()); child.setTestCaseList(dataList); this.children.add(child); } diff --git a/backend/src/main/resources/db/migration/V110__v1.19_release.sql b/backend/src/main/resources/db/migration/V110__v1.19_release.sql index cd514bc1de..81ad4985d6 100644 --- a/backend/src/main/resources/db/migration/V110__v1.19_release.sql +++ b/backend/src/main/resources/db/migration/V110__v1.19_release.sql @@ -684,19 +684,4 @@ delete from api_scenario_report where report_type = 'API_INTEGRATED'; -ALTER TABLE api_definition MODIFY COLUMN path varchar (1000); - -update api_scenario_module -set name = 'UNPLANNED' -where name = '未规划场景' - and `level` = 1; - -update api_module -set name = 'UNPLANNED' -where name = '未规划接口' - and `level` = 1; - -update test_case_node -set name = 'UNPLANNED' -where name = '未规划用例' - and `level` = 1; \ No newline at end of file +ALTER TABLE api_definition MODIFY COLUMN path varchar (1000); \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 01f527da87..e7d5b692ea 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -309,5 +309,3 @@ error_code_is_unique=Error code is not unique no_version_exists=version not exists jira_auth_error=Account name or password (Token) is wrong - -unplanned_case=Unplanned Case \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 38dd3c940d..578568e42f 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -307,5 +307,3 @@ issue_jira_info_error=请检查服务集成信息或Jira项目ID error_code_is_unique=错误代码不可重复 no_version_exists=不存在版本!请先创建项目的版本 jira_auth_error=账号名或密码(Token)错误 - -unplanned_case=未规划用例 \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index d529da4857..4200718eac 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -308,5 +308,3 @@ error_code_is_unique=錯誤代碼不可重複 no_version_exists=不存在版本!請先創建項目的版本 jira_auth_error=賬號名或密碼(Token)錯誤 - -unplanned_case=未規劃用例 \ No newline at end of file diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue index ef8f93044f..37221f80fa 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue @@ -186,14 +186,8 @@ if (response.data != undefined && response.data != null) { this.data = response.data; this.data.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('api_test.automation.unplanned_scenario') : node.name - node.label = node.label === 'UNPLANNED' ? this.$t('api_test.automation.unplanned_scenario') : node.label + node.name = node.name === '未规划场景' ? this.$t('api_test.automation.unplanned_scenario') : node.name buildTree(node, {path: ''}); - if (node.children && node.children.length > 0) { - node.children.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('api_test.automation.unplanned_scenario') : node.name - }) - } }); this.$emit('setModuleOptions', this.data); this.$emit('setNodeTree', this.data); diff --git a/frontend/src/business/components/api/definition/components/module/ApiModule.vue b/frontend/src/business/components/api/definition/components/module/ApiModule.vue index 84df62ca15..07f924dddf 100644 --- a/frontend/src/business/components/api/definition/components/module/ApiModule.vue +++ b/frontend/src/business/components/api/definition/components/module/ApiModule.vue @@ -179,14 +179,8 @@ export default { if (response.data != undefined && response.data != null) { this.data = response.data; this.data.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('api_test.definition.unplanned_api') : node.name; - node.label = node.label === 'UNPLANNED' ? this.$t('api_test.definition.unplanned_api') : node.label + node.name = node.name === '未规划接口' ? this.$t('api_test.definition.unplanned_api') : node.name buildTree(node, {path: ''}); - if (node.children && node.children.length > 0) { - node.children.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('api_test.definition.unplanned_api') : node.name - }) - } }); this.$emit('setModuleOptions', this.data); this.$emit('setNodeTree', this.data); diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index b56a3a5aeb..2c5885a991 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -755,9 +755,6 @@ export default { param.nodeId = this.form.module; if (!this.publicEnable) { param.nodePath = getNodePath(this.form.module, this.moduleOptions); - if (param.nodePath === '/未规划用例' || param.nodePath === '/Unplanned Case' || param.nodePath === '/未規劃用例') { - param.nodePath = '/未规划用例'; - } if (this.projectId) { param.projectId = this.projectId; } diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index dc423c51ff..930f16f106 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -775,7 +775,6 @@ export default { this.page.total = data.itemCount; this.page.data = data.listObject; this.page.data.forEach(item => { - (item.nodePath === '/未规划用例' || item.nodePath === '/Unplanned Case' || item.nodePath === '/未規劃用例') ? item.nodePath = "/" + this.$t('test_track.unplanned_case') : item.nodePath if (item.customFields) { item.customFields = JSON.parse(item.customFields); } diff --git a/frontend/src/business/components/track/common/TestCaseNodeTree.vue b/frontend/src/business/components/track/common/TestCaseNodeTree.vue index 5572d9be9b..03e1d899ac 100644 --- a/frontend/src/business/components/track/common/TestCaseNodeTree.vue +++ b/frontend/src/business/components/track/common/TestCaseNodeTree.vue @@ -9,7 +9,7 @@ :delete-permission="['PROJECT_TRACK_CASE:READ+DELETE']" :add-permission="['PROJECT_TRACK_CASE:READ+CREATE']" :update-permission="['PROJECT_TRACK_CASE:READ+EDIT']" - :default-label="$t('test_track.unplanned_case')" + :default-label="$t('api_test.unplanned_case')" @add="add" @edit="edit" @drag="drag" @@ -175,8 +175,7 @@ export default { this.result = getTestCaseNodes(this.projectId, data => { this.treeNodes = data; this.treeNodes.forEach(node => { - node.name === 'UNPLANNED' ? node.name = this.$t('test_track.unplanned_case') : node.name; - node.label === 'UNPLANNED' ? node.label = this.$t('test_track.unplanned_case') : node.label; + node.name = node.name === '未规划用例' ? this.$t('api_test.unplanned_case') : node.name buildTree(node, {path: ''}); }); this.setModuleOptions(); @@ -253,7 +252,6 @@ export default { setModuleOptions() { let moduleOptions = []; this.treeNodes.forEach(node => { - node.name === 'UNPLANNED' ? node.name = this.$t('test_track.unplanned_case') : node.name buildNodePath(node, {path: ''}, moduleOptions); }); this.$store.commit('setTestCaseModuleOptions', moduleOptions); diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctional.vue b/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctional.vue index cc555ee1c7..fb8a302d8c 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctional.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctional.vue @@ -147,13 +147,6 @@ export default { } this.result = this.$get(url, response => { this.treeNodes = response.data; - this.treeNodes.forEach(nodes => { - if (nodes.children && nodes.children.length > 0) { - nodes.children.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name - }) - } - }); }); } }, diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctionalRelevance.vue b/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctionalRelevance.vue index 6dd57d1221..470eb4cb4e 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctionalRelevance.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/TestPlanFunctionalRelevance.vue @@ -87,9 +87,6 @@ export default { vueObj.$refs.nodeTree.result = this.$post("/case/node/list/all/plan", {testPlanId: this.planId, projectId: vueObj.projectId}, response => { vueObj.treeNodes = response.data; - vueObj.treeNodes.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name - }); }); vueObj.selectNodeIds = []; } diff --git a/frontend/src/business/components/track/plan/view/comonents/load/TestCaseLoadRelevance.vue b/frontend/src/business/components/track/plan/view/comonents/load/TestCaseLoadRelevance.vue index 4cc828b84d..f2841cb363 100644 --- a/frontend/src/business/components/track/plan/view/comonents/load/TestCaseLoadRelevance.vue +++ b/frontend/src/business/components/track/plan/view/comonents/load/TestCaseLoadRelevance.vue @@ -282,9 +282,6 @@ export default { }; this.result = this.$post("/case/node/list/all/plan", param, response => { this.treeNodes = response.data; - this.treeNodes.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name - }); }); } }, diff --git a/frontend/src/business/components/track/review/view/TestCaseReviewView.vue b/frontend/src/business/components/track/review/view/TestCaseReviewView.vue index e521012d14..b10966b55e 100644 --- a/frontend/src/business/components/track/review/view/TestCaseReviewView.vue +++ b/frontend/src/business/components/track/review/view/TestCaseReviewView.vue @@ -156,13 +156,6 @@ export default { if (this.reviewId) { this.result = this.$get("/case/node/list/review/" + this.reviewId, response => { this.treeNodes = response.data; - this.treeNodes.forEach(nodes => { - if (nodes.children && nodes.children.length > 0) { - nodes.children.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name - }) - } - }); }); } }, diff --git a/frontend/src/business/components/track/review/view/components/TestReviewFunction.vue b/frontend/src/business/components/track/review/view/components/TestReviewFunction.vue index 6b92b529b0..a6b4fda907 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewFunction.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewFunction.vue @@ -134,13 +134,6 @@ export default { if (this.reviewId) { this.result = this.$get("/case/node/list/review/" + this.reviewId, response => { this.treeNodes = response.data; - this.treeNodes.forEach(nodes => { - if (nodes.children && nodes.children.length > 0) { - nodes.children.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name - }) - } - }); }); } }, diff --git a/frontend/src/business/components/track/review/view/components/TestReviewLoad.vue b/frontend/src/business/components/track/review/view/components/TestReviewLoad.vue index 034c05e8ac..7c3da2528f 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewLoad.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewLoad.vue @@ -92,13 +92,6 @@ export default { if (this.planId) { this.result = this.$get("/case/node/list/plan/" + this.planId, response => { this.treeNodes = response.data; - this.treeNodes.forEach(nodes => { - if (nodes.children && nodes.children.length > 0) { - nodes.children.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name - }) - } - }); // 性能测试与模块无关,过滤项目下模块 this.treeNodes.map(node => node.children = null); }); diff --git a/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue b/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue index 29710cf877..9b14d89988 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue @@ -364,9 +364,6 @@ export default { this.result = this.$post("/case/node/list/all/review", {reviewId: this.reviewId, projectId: this.projectId}, response => { this.treeNodes = response.data; - this.treeNodes.forEach(node => { - node.name = node.name === 'UNPLANNED' ? this.$t('test_track.unplanned_case') : node.name - }); }); this.selectNodeIds = []; }, diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index e64fe076c6..b9f3b991a9 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -328,7 +328,7 @@ export default { monitor: "Monitor", all_label: { case: "All Case", - review: "All Review" + review: "all" }, image: 'Image', tag: 'Tag', @@ -1114,6 +1114,7 @@ export default { copied: "copied", key: "Key", value: "Value", + unplanned_case: "Unplanned Case", create_performance_test: "Create Performance Test", create_performance_test_batch: "Batch Create Performance Test", batch_copy: "Batch Copy", @@ -1350,9 +1351,9 @@ export default { reference_info: "Reference info", scenario_test: "Scenario test", scenario_list: "Scenario List", - all_scenario: 'All Scenario', - unplanned_scenario: 'Unplanned Scenario', add_scenario: "Add scenario", + all_scenario: "All scenario", + unplanned_scenario: "Unplanned Scenario", scenario_name: "Scenario Name", case_level: "Case Level", tag: "Tag", @@ -1939,7 +1940,6 @@ export default { date: "Date" }, test_track: { - unplanned_case: 'Unplanned Case', sync_add_api_load: 'Synchronously add associated api and load tests', next: 'Next', total_size: 'Total {0}', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 110f562213..1ba09a653b 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -1124,6 +1124,7 @@ export default { create_performance_test_batch: "批量创建性能测试", batch_copy: "批量复制", export_config: "导出", + unplanned_case: "未规划用例", enable_validate_tip: "没有可用请求", copy: "复制测试", please_select_case: "请选择用例", @@ -1355,9 +1356,9 @@ export default { reference_info: "请选择接口或用例", scenario_test: "场景", scenario_list: "场景列表", - unplanned_scenario: '未规划场景', - all_scenario: '全部场景', add_scenario: "创建场景", + all_scenario: "全部场景", + unplanned_scenario: "未规划场景", scenario_name: "场景名称", case_level: "用例等级", tag: "标签", @@ -1944,7 +1945,6 @@ export default { date: "日期" }, test_track: { - unplanned_case: '未规划用例', sync_add_api_load: '同步添加关联的接口和性能测试', next: '下一条', total_size: '共 {0} 条', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index a03d0be030..cce97be84b 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -1125,6 +1125,7 @@ export default { batch_copy: "批量復製", export_config: "導出", enable_validate_tip: "沒有可用請求", + unplanned_case: "未規劃用例", copy: "復製測試", please_select_case: "請選擇用例", fail_to_stop: "失敗停止", @@ -1355,9 +1356,9 @@ export default { reference_info: "請選擇接口或用例", scenario_test: "場景", scenario_list: "場景列表", - all_scenario: '全部場景', - unplanned_scenario: '未規劃場景', add_scenario: "創建場景", + all_scenario: "全部場景", + unplanned_scenario: "未規劃場景", scenario_name: "場景名稱", case_level: "用例等級", tag: "標簽", @@ -1944,7 +1945,6 @@ export default { date: "日期" }, test_track: { - unplanned_case: '未規劃用例', sync_add_api_load: '同步添加關聯的接口和性能測試', next: '下一條', total_size: '共 {0} 條',