Skip to content

Commit

Permalink
[SUREFIRE-2145] Don't use Sink#figure()/Sink#figureCaption() since it…
Browse files Browse the repository at this point in the history
… distorts the output

This closes #595
  • Loading branch information
michael-o committed Feb 9, 2023
1 parent c2c4180 commit bdec059
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,6 @@ private static void sinkLineBreak( Sink sink )

private static void sinkIcon( String type, Sink sink )
{
sink.figure();

if ( type.startsWith( "junit.framework" ) || "skipped".equals( type ) )
{
sink.figureGraphics( "images/icon_warning_sml.gif" );
Expand All @@ -673,8 +671,6 @@ else if ( type.startsWith( "success" ) )
{
sink.figureGraphics( "images/icon_error_sml.gif" );
}

sink.figure_();
}

private static void sinkHeader( Sink sink, String header )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void testCorruptedTestCaseFailureWithMissingErrorTypeAndMessage()
+ "<th>Success Rate</th>\n"
+ "<th>Time</th></tr>\n"
+ "<tr class=\"b\">\n"
+ "<td align=\"left\"><a href=\"#surefire.MyTest\"><figure><img src=\"images/icon_error_sml.gif\" alt=\"\" /></figure></a></td>\n"
+ "<td align=\"left\"><a href=\"#surefire.MyTest\"><img src=\"images/icon_error_sml.gif\" alt=\"\" /></a></td>\n"
+ "<td align=\"left\"><a href=\"#surefire.MyTest\">MyTest</a></td>\n"
+ "<td align=\"left\">1</td>\n"
+ "<td align=\"left\">1</td>\n"
Expand All @@ -112,7 +112,7 @@ public void testCorruptedTestCaseFailureWithMissingErrorTypeAndMessage()
assertThat( xml, containsString( toSystemNewLine(
"<table border=\"0\" class=\"bodyTable\">\n"
+ "<tr class=\"a\">\n"
+ "<td align=\"left\"><figure><img src=\"images/icon_error_sml.gif\" alt=\"\" /></figure></td>\n"
+ "<td align=\"left\"><img src=\"images/icon_error_sml.gif\" alt=\"\" /></td>\n"
+ "<td align=\"left\"><a id=\"surefire.MyTest.test\"></a>test</td></tr>\n"
+ "<tr class=\"b\">\n"
+ "<td align=\"left\"></td>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void testSurefireReportSingleError()
containsString( toSystemNewLine( "<tr class=\"b\">\n"
+ "<td align=\"left\">"
+ "<a href=\"#surefire.MyTest\">"
+ "<figure><img src=\"images/icon_error_sml.gif\" alt=\"\" /></figure>"
+ "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ "</a>"
+ "</td>\n"
+ "<td align=\"left\"><a href=\"#surefire.MyTest\">MyTest</a></td>\n"
Expand Down Expand Up @@ -318,7 +318,7 @@ public void testSurefireReportNestedClassTrimStackTrace()
containsString( toSystemNewLine( "<tr class=\"b\">\n"
+ "<td align=\"left\">"
+ "<a href=\"#surefire.MyTest\">"
+ "<figure><img src=\"images/icon_error_sml.gif\" alt=\"\" /></figure>"
+ "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ "</a>"
+ "</td>\n"
+ "<td align=\"left\"><a href=\"#surefire.MyTest\">MyTest</a></td>\n"
Expand Down Expand Up @@ -380,7 +380,7 @@ public void testSurefireReportNestedClass()
containsString( toSystemNewLine( "<tr class=\"b\">\n"
+ "<td align=\"left\">"
+ "<a href=\"#surefire.MyTest\">"
+ "<figure><img src=\"images/icon_error_sml.gif\" alt=\"\" /></figure>"
+ "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ "</a>"
+ "</td>\n"
+ "<td align=\"left\"><a href=\"#surefire.MyTest\">MyTest</a></td>\n"
Expand Down Expand Up @@ -466,7 +466,7 @@ public void testSurefireReportEnclosedTrimStackTrace()
containsString( toSystemNewLine( "<tr class=\"b\">\n"
+ "<td align=\"left\">"
+ "<a href=\"#surefire.MyTest$A\">"
+ "<figure><img src=\"images/icon_error_sml.gif\" alt=\"\" /></figure>"
+ "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ "</a>"
+ "</td>\n"
+ "<td align=\"left\"><a href=\"#surefire.MyTest$A\">MyTest$A</a></td>\n"
Expand Down Expand Up @@ -527,7 +527,7 @@ public void testSurefireReportEnclosed()
containsString( toSystemNewLine( "<tr class=\"b\">\n"
+ "<td align=\"left\">"
+ "<a href=\"#surefire.MyTest$A\">"
+ "<figure><img src=\"images/icon_error_sml.gif\" alt=\"\" /></figure>"
+ "<img src=\"images/icon_error_sml.gif\" alt=\"\" />"
+ "</a>"
+ "</td>\n"
+ "<td align=\"left\"><a href=\"#surefire.MyTest$A\">MyTest$A</a></td>\n"
Expand Down

0 comments on commit bdec059

Please sign in to comment.