From de318c686d4ef72e456dbf2c028d10d14d336b30 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Mon, 8 Mar 2021 16:40:20 +0000 Subject: [PATCH] Use inline elements on run summary page --- .../analysis/core/model/StaticAnalysisLabelProvider.java | 2 +- .../java/io/jenkins/plugins/analysis/core/model/Summary.java | 2 +- .../io/jenkins/plugins/analysis/core/model/SummaryTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/StaticAnalysisLabelProvider.java b/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/StaticAnalysisLabelProvider.java index dd83d60736..2ab700b9cd 100644 --- a/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/StaticAnalysisLabelProvider.java +++ b/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/StaticAnalysisLabelProvider.java @@ -234,7 +234,7 @@ public String getLargeIconUrl() { */ public ContainerTag getTitle(final AnalysisResult result, final boolean hasErrors) { String icon = hasErrors ? ERROR_ICON : INFO_ICON; - return div(join(getName() + ": ", + return span(join(getName() + ": ", getWarningsCount(result), a().withHref(getId() + "/info").with( new UnescapedText(new SvgTag(icon, jenkins).withClasses("info-page-decorator").render())))).withId( diff --git a/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/Summary.java b/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/Summary.java index b52b3dff06..9cd007283b 100644 --- a/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/Summary.java +++ b/plugin/src/main/java/io/jenkins/plugins/analysis/core/model/Summary.java @@ -66,7 +66,7 @@ public Summary(final StaticAnalysisLabelProvider labelProvider, final AnalysisRe * @return the summary */ public String create() { - return div(labelProvider.getTitle(analysisResult, !analysisResult.getErrorMessages().isEmpty()), + return span(labelProvider.getTitle(analysisResult, !analysisResult.getErrorMessages().isEmpty()), createDescription()) .withId(labelProvider.getId() + "-summary") .renderFormatted(); diff --git a/plugin/src/test/java/io/jenkins/plugins/analysis/core/model/SummaryTest.java b/plugin/src/test/java/io/jenkins/plugins/analysis/core/model/SummaryTest.java index 86d20b1a71..79efd33488 100644 --- a/plugin/src/test/java/io/jenkins/plugins/analysis/core/model/SummaryTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/analysis/core/model/SummaryTest.java @@ -83,7 +83,7 @@ void shouldHaveCorrectIDsForDivs() { AnalysisResult analysisResult = createAnalysisResult(EMPTY_ORIGINS, 0, 0, EMPTY_ERRORS, 0); String createdHtml = createSummary(analysisResult).create(); - assertThat(createdHtml).contains("
"); + assertThat(createdHtml).contains(""); assertThat(createdHtml).contains("id=\"test-title\""); }