From 787996f8068d9244647b4871bd3b8029e09cbf47 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Thu, 7 Nov 2024 19:04:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A=E6=80=BB?= =?UTF-8?q?=E7=BB=93=E4=BC=98=E5=8C=96=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/component/system-card/summary.vue | 15 ++++++++++++--- .../homePage/components/cardSettingDrawer.vue | 7 ++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/test-plan/report/detail/component/system-card/summary.vue b/frontend/src/views/test-plan/report/detail/component/system-card/summary.vue index abaff23a42..4dc97fd42b 100644 --- a/frontend/src/views/test-plan/report/detail/component/system-card/summary.vue +++ b/frontend/src/views/test-plan/report/detail/component/system-card/summary.vue @@ -106,12 +106,21 @@ // 通过率 const allSuccessCount = (allSuccessCase / allCaseTotal) * 100; const allSuccessRate = `${Number.isNaN(allSuccessCount) ? 0 : allSuccessCount.toFixed(2)}`; - // TODO 待联调 if (props.isPlanGroup) { let summaryDesc = `

${props.detail.testPlanName} 包含 ${props.detail.planCount} 个子计划。 其中 ${props.detail.passCountOfPlan} 个子计划通过, ${props.detail.failCountOfPlan} 个子计划不通过; - 包含功能测试、接口用例、场景用例, 共 ${allCaseTotal} 条用例,已执行 ${allHasExecutedCase} 条,通过用例 ${allSuccessCase} 条,通过率为 ${allSuccessRate} %;共关联缺陷 ${props.detail.bugCount} 个

`; + 包含功能测试、接口用例、场景用例, 共 ${props.detail.caseTotal} 条用例,已执行 ${allHasExecutedCase} 条,通过用例 ${allSuccessCase} 条,通过率为 ${allSuccessRate} %;共关联缺陷 ${props.detail.bugCount} 个

`; + // 计算子级别 (props.detail?.children || []).forEach((item) => { - const content = `

▪ ${item.testPlanName}子计划,包含功能测试、接口用例、场景用例, 共 ${item.caseTotal} 条用例,已执行 ${item.executeCount} 条,通过用例 ${item.passCountOfPlan} 条,通过率为 ${item.passThreshold} %,未达到通过阈值(通过阈值为${item.passThreshold}%)

`; + const funChildrenCaseDetail = getSummaryDetail(item.functionalCount); + const apiChildrenCaseDetail = getSummaryDetail(item.apiCaseCount); + const apiChildrenScenarioDetail = getSummaryDetail(item.apiScenarioCount); + const executedCase = + funChildrenCaseDetail.hasExecutedCase + + apiChildrenCaseDetail.hasExecutedCase + + apiChildrenScenarioDetail.hasExecutedCase; + const allPassCount = + funChildrenCaseDetail.success + apiChildrenCaseDetail.success + apiChildrenScenarioDetail.success; + const content = `

▪ ${item.testPlanName}子计划,包含功能测试、接口用例、场景用例, 共 ${item.caseTotal} 条用例,已执行 ${executedCase} 条,通过用例 ${allPassCount} 条,通过率为 ${item.passRate} %,未达到通过阈值(通过阈值为${item.passThreshold}%)

`; summaryDesc += content; }); return summaryDesc; diff --git a/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue b/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue index 9f9481df89..030073ee9f 100644 --- a/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue +++ b/frontend/src/views/workbench/homePage/components/cardSettingDrawer.vue @@ -44,7 +44,12 @@
{{ item.label }}
- + {{ t('workbench.homePage.halfScreen') }}