Skip to content

Commit

Permalink
Merge pull request #841 from timja/use-inline-elements
Browse files Browse the repository at this point in the history
Use inline elements on run summary page
  • Loading branch information
uhafner authored Mar 8, 2021
2 parents 55a085f + de318c6 commit 5e4a74c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void shouldHaveCorrectIDsForDivs() {
AnalysisResult analysisResult = createAnalysisResult(EMPTY_ORIGINS, 0, 0,
EMPTY_ERRORS, 0);
String createdHtml = createSummary(analysisResult).create();
assertThat(createdHtml).contains("<div id=\"test-summary\">");
assertThat(createdHtml).contains("<span id=\"test-summary\">");
assertThat(createdHtml).contains("id=\"test-title\"");
}

Expand Down

0 comments on commit 5e4a74c

Please sign in to comment.