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') }}