From fbdffc975c3302c764a3515b1e082c0d3795cc9e Mon Sep 17 00:00:00 2001 From: zhangdahai112 Date: Wed, 31 Aug 2022 14:12:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(UI=20=E8=87=AA=E5=8A=A8=E5=8C=96):=20?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=89=B9=E9=87=8F=E5=B1=95=E5=BC=80=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=EF=BC=8C=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=85=B7=E4=BD=93?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016036 --user=张大海 【UI测试】UI测试报告,失败tab页,点击批量展开步骤,不显示具体报错信息 https://www.tapd.cn/55049933/s/1236517 --- .../api/service/ApiScenarioReportStructureService.java | 3 ++- .../components/api/automation/report/SysnApiReportDetail.vue | 3 +++ .../api/automation/report/components/ScenarioResult.vue | 2 ++ .../api/automation/report/components/ScenarioResults.vue | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java index fb7e234dda..c1b3aaea8d 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java @@ -564,7 +564,8 @@ public class ApiScenarioReportStructureService { private ApiScenarioReportDTO getReport(String reportId, boolean selectContent) { ApiScenarioReport mainReport = apiScenarioReportMapper.selectByPrimaryKey(reportId); List reportResults = null; - if (selectContent) { + if (selectContent || mainReport.getReportType().startsWith(SystemConstants.TestTypeEnum.UI.name())) { + // UI 报告不执行懒加载 ApiScenarioReportResultExample example = new ApiScenarioReportResultExample(); example.createCriteria().andReportIdEqualTo(reportId); reportResults = reportResultMapper.selectByExampleWithBLOBs(example); diff --git a/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue b/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue index 863df198f5..4b47e29af3 100644 --- a/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue +++ b/frontend/src/business/components/api/automation/report/SysnApiReportDetail.vue @@ -337,6 +337,9 @@ export default { }, getReport() { let url = "/api/scenario/report/get/" + this.reportId; + if (this.report.reportType === "UI_INDEPENDENT") { + url += "?selectReportContent=true"; + } this.$get(url, response => { this.report = response.data || {}; if (response.data) { diff --git a/frontend/src/business/components/api/automation/report/components/ScenarioResult.vue b/frontend/src/business/components/api/automation/report/components/ScenarioResult.vue index 2a594cb5d8..88b08a1efd 100644 --- a/frontend/src/business/components/api/automation/report/components/ScenarioResult.vue +++ b/frontend/src/business/components/api/automation/report/components/ScenarioResult.vue @@ -20,6 +20,7 @@ @@ -59,6 +60,7 @@ export default { props: { scenario: Object, node: Object, + treeNode: Object, console: String, isActive: Boolean, isShare:Boolean, diff --git a/frontend/src/business/components/api/automation/report/components/ScenarioResults.vue b/frontend/src/business/components/api/automation/report/components/ScenarioResults.vue index f67aeecfdd..9d074fd4ae 100644 --- a/frontend/src/business/components/api/automation/report/components/ScenarioResults.vue +++ b/frontend/src/business/components/api/automation/report/components/ScenarioResults.vue @@ -15,7 +15,7 @@ highlight-current class="ms-tree ms-report-tree" ref="resultsTree"> -