From 25e61b14a602e3fc3fdcfe086255bfad7ff403ba Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Mon, 19 Aug 2024 18:08:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E7=94=A8=E4=BE=8B=E5=B7=B2=E8=A2=AB=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=82=B9=E5=87=BB=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1045364 --user=王旭 【测试计划】执行功能用例-用例已被取消-点击报错 https://www.tapd.cn/55049933/s/1565276 --- .../plan/service/TestPlanFunctionalCaseService.java | 3 +++ .../test-plan/testPlan/detail/featureCase/detail/index.vue | 1 + 2 files changed, 4 insertions(+) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java index 1957fdc9d5..0e5d4e7ea9 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java @@ -723,6 +723,9 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService { public TestPlanCaseDetailResponse getFunctionalCaseDetail(String id, String userId) { TestPlanFunctionalCase planFunctionalCase = testPlanFunctionalCaseMapper.selectByPrimaryKey(id); + if(planFunctionalCase == null){ + throw new MSException(Translator.get("resource_not_exist")); + } String caseId = planFunctionalCase.getFunctionalCaseId(); FunctionalCaseDetailDTO functionalCaseDetail = functionalCaseService.getFunctionalCaseDetail(caseId, userId, false); String caseDetailSteps = functionalCaseDetail.getSteps(); diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/index.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/index.vue index cf9324592d..5d59448c11 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/index.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/index.vue @@ -433,6 +433,7 @@ } catch (error) { // eslint-disable-next-line no-console console.log(error); + loadCaseList(); } finally { caseDetailLoading.value = false; }