From 857bfefa9df644cbede24164fd547afb826f4335 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Tue, 14 Mar 2023 11:41:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=97=B6=E8=B5=84=E6=BA=90=E6=B1=A0=E6=B2=A1=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E3=80=81=E5=A4=B1=E8=B4=A5=E9=87=8D=E8=B7=91=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=B2=A1=E9=9A=90=E8=97=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1024375 --user=宋天阳 【测试跟踪】测试计划最终报告导出,不显示“失败重跑”按钮 https://www.tapd.cn/55049933/s/1349388 --- .../controller/ShareController.java | 12 - .../controller/TestPlanController.java | 11 - .../plan/service/TestPlanReportService.java | 8 + .../frontend/src/api/remote/plan/test-plan.js | 20 -- .../report/detail/TestPlanApiReport.vue | 268 +++++++++++++----- .../report/detail/TestPlanOverviewReport.vue | 1 - .../report/detail/TestPlanReportContent.vue | 17 +- .../ui/TestCaseUiScenarioRelevance.vue | 88 +++--- 8 files changed, 249 insertions(+), 176 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java b/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java index b510f59eb1..7ea473a470 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java @@ -78,16 +78,4 @@ public class ShareController { HttpHeaderUtils.clearUser(); return reportExtInfo; } - - @GetMapping("test/plan/ext/plan/{shareId}/{planId}") - public ExecutionModeDTO getExtPlan(@PathVariable String shareId, @PathVariable String planId) throws JsonProcessingException { - shareInfoService.validate(shareId, planId); - if (SessionUtils.getUser() == null) { - HttpHeaderUtils.runAsUser("admin"); - } - // testPlanService.getExtInfoByPlanId 这个方法逻辑有问题。分不清楚干嘛用的。方法删了,调用地方先注释了。 - // TestPlanExtReportDTO reportExtInfo = testPlanService.getExtInfoByPlanId(planId); - HttpHeaderUtils.clearUser(); - return new ExecutionModeDTO(); - } } diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java index 84aadfbd35..5135e32d3a 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java @@ -14,7 +14,6 @@ import io.metersphere.dto.TestPlanRerunParametersDTO; import io.metersphere.i18n.Translator; import io.metersphere.log.annotation.MsAuditLog; import io.metersphere.notice.annotation.SendNotice; -import io.metersphere.plan.dto.ExecutionModeDTO; import io.metersphere.plan.dto.TestCaseReportStatusResultDTO; import io.metersphere.plan.dto.TestPlanDTO; import io.metersphere.plan.dto.TestPlanReportDataStruct; @@ -380,14 +379,4 @@ public class TestPlanController { public void resetStatus(@PathVariable String planId) { testPlanService.resetStatus(planId); } - - @GetMapping("/ext/report/{reportId}") - public ExecutionModeDTO getExtReport(@PathVariable String reportId) throws JsonProcessingException { - return new ExecutionModeDTO(); - } - - @GetMapping("/ext/plan/{planId}") - public ExecutionModeDTO getExtPlan(@PathVariable String planId) throws JsonProcessingException { - return new ExecutionModeDTO(); - } } diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java index 42cea3214d..807c641d76 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java @@ -1124,7 +1124,11 @@ public class TestPlanReportService { }); String resourcePoolNames = StringUtils.join(resourcePoolName.toArray(), StringUtils.SPACE); report.setResourcePool(resourcePoolNames); + } else { + report.setResourcePool("LOCAL"); } + } else { + report.setResourcePool("LOCAL"); } return report; } @@ -1156,7 +1160,11 @@ public class TestPlanReportService { }); String resourcePoolNames = StringUtils.join(resourcePoolName.toArray(), StringUtils.SPACE); testPlanReportDTO.setResourcePool(resourcePoolNames); + } else { + testPlanReportDTO.setResourcePool("LOCAL"); } + } else { + testPlanReportDTO.setResourcePool("LOCAL"); } // 环境组/运行环境 if (StringUtils.isNotEmpty(runInfoDTO.getEnvGroupId())) { diff --git a/test-track/frontend/src/api/remote/plan/test-plan.js b/test-track/frontend/src/api/remote/plan/test-plan.js index b2d743ecc0..d6ebd61423 100644 --- a/test-track/frontend/src/api/remote/plan/test-plan.js +++ b/test-track/frontend/src/api/remote/plan/test-plan.js @@ -390,23 +390,3 @@ export function reportSocket(reportId) { export function testPlanLoadCaseEditStatus(planId) { return post(BASE_URL + `edit/status/${planId}`, new Promise(() => {})); } - -export function getTestPlanExtReport(planId, reportId) { - if (reportId) { - return get(BASE_URL + "ext/report/" + reportId); - } else if (planId) { - return get(BASE_URL + "ext/plan/" + planId); - } else { - return new Promise(() => {}); - } -} - -export function getShareTestPlanExtReport(shareId, planId, reportId) { - if (reportId) { - return get("/share" + BASE_URL + `ext/report/${shareId}/${reportId}`); - } else if (planId) { - return get("/share" + BASE_URL + `ext/plan/${shareId}/${planId}`); - } else { - return new Promise(() => {}); - } -} diff --git a/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanApiReport.vue b/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanApiReport.vue index cafa61339a..e7cd8eff50 100644 --- a/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanApiReport.vue +++ b/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanApiReport.vue @@ -1,56 +1,152 @@