From dccb66f289bb00860284115cee4126ae8a79dbd6 Mon Sep 17 00:00:00 2001 From: metersphere-bot <78466014+metersphere-bot@users.noreply.github.com> Date: Tue, 21 Dec 2021 20:35:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=85=AC=E5=85=B1=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E5=BA=93bug=E4=BF=AE=E6=94=B9=20(#8684)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009040 --user=王孝刚 公共用例库bug https://www.tapd.cn/55049933/s/1084396 Co-authored-by: wxg0103 <727495428@qq.com> --- .../api/service/ApiAutomationService.java | 4 +- .../api/service/ApiTestCaseService.java | 4 +- .../automation/scenario/ApiScenarioList.vue | 4 +- .../components/case/ApiCaseItem.vue | 1 + .../components/form/CustomFiledFormItem.vue | 10 +- .../components/track/case/TestCase.vue | 59 +- .../case/components/TestCaseEditShow.vue | 949 ++++++++++++++++++ .../track/case/components/TestCaseList.vue | 15 + .../track/common/TestCaseNodeTree.vue | 3 +- frontend/src/i18n/en-US.js | 11 +- frontend/src/i18n/zh-CN.js | 3 +- frontend/src/i18n/zh-TW.js | 3 +- 12 files changed, 1047 insertions(+), 19 deletions(-) create mode 100644 frontend/src/business/components/track/case/components/TestCaseEditShow.vue 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 79129c721d..fd9e3ae2c0 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -1818,12 +1818,12 @@ public class ApiAutomationService { List scenarioNames = extApiScenarioMapper.selectNameByIdIn(scenarioIdList); if (StringUtils.isNotEmpty(deleteScenarioName) && CollectionUtils.isNotEmpty(scenarioNames)) { - String nameListStr = "【"; + String nameListStr = "["; for (String name : scenarioNames) { nameListStr += name + ","; } if (nameListStr.length() > 1) { - nameListStr = nameListStr.substring(0, nameListStr.length() - 1) + "】"; + nameListStr = nameListStr.substring(0, nameListStr.length() - 1) + "]"; } String msg = deleteScenarioName + " " + Translator.get("delete_check_reference_by") + ": " + nameListStr + " "; checkMsgList.add(msg); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java index 7923a5447b..76fe1dd978 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -962,12 +962,12 @@ public class ApiTestCaseService { String deleteCaseName = extApiTestCaseMapper.selectNameById(refreceId); if (StringUtils.isNotEmpty(deleteCaseName) && CollectionUtils.isNotEmpty(scenarioNameList)) { - String nameListStr = "【"; + String nameListStr = "["; for (String name : scenarioNameList) { nameListStr += name + ","; } if (nameListStr.length() > 1) { - nameListStr = nameListStr.substring(0, nameListStr.length() - 1) + "】"; + nameListStr = nameListStr.substring(0, nameListStr.length() - 1) + "]"; } String msg = deleteCaseName + " " + Translator.get("delete_check_reference_by") + ": " + nameListStr + " "; checkMsgList.add(msg); diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index 8b08f1dd2b..3a020f670f 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -484,7 +484,7 @@ export default { permissions: ['PROJECT_API_SCENARIO:READ+DELETE'] }, { - name: "生成依赖关系", + name: this.$t('test_track.case.generate_dependencies'), handleClick: this.generateGraph, isXPack: true, permissions: ['PROJECT_API_SCENARIO:READ+EDIT'] @@ -1057,7 +1057,7 @@ export default { if (!checkResult.deleteFlag) { alertMsg = ""; checkResult.checkMsg.forEach(item => { - alertMsg += item + ";"; + alertMsg += item; }); if (alertMsg === "") { alertMsg = this.$t('load_test.delete_threadgroup_confirm') + " ?"; diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue index 2fbd303ee3..fe37c8f16e 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue @@ -467,6 +467,7 @@ export default { if (this.validate(row)) { return; } + this.compare = []; if (this.compare.indexOf(row.id) === -1) { this.compare.push(row.id); if (this.api.saved) { diff --git a/frontend/src/business/components/common/components/form/CustomFiledFormItem.vue b/frontend/src/business/components/common/components/form/CustomFiledFormItem.vue index 41296354f1..5f144eec3d 100644 --- a/frontend/src/business/components/common/components/form/CustomFiledFormItem.vue +++ b/frontend/src/business/components/common/components/form/CustomFiledFormItem.vue @@ -6,7 +6,7 @@ - +
@@ -38,7 +38,13 @@ export default { } }, formLabelWidth: String, - form: Object + form: Object, + isPublic: { + type: Boolean, + default() { + return false; + } + } }, computed: { customFieldRowNums() { diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index 2f28e099e5..4454e0d838 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -49,6 +49,7 @@ :public-enable="true" @refreshTable="refresh" @testCaseEdit="editTestCase" + @testCaseEditShow="editTestCaseShow" @testCaseCopy="copyTestCase" @testCaseDetail="showTestCaseDetail" @getTrashList="getTrashList" @@ -101,7 +102,7 @@ :label="item.label" :name="item.name" closable> -
+
+
+ + +