Skip to content

Commit 20598ae

Browse files
Create test for DEVSIX-2002
1 parent bf12826 commit 20598ae

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

src/test/java/com/itextpdf/html2pdf/Html2PdfTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ This file is part of the iText (R) project.
4545
import com.itextpdf.io.util.UrlUtil;
4646
import com.itextpdf.kernel.utils.CompareTool;
4747
import com.itextpdf.test.ExtendedITextTest;
48+
import com.itextpdf.test.annotations.LogMessage;
49+
import com.itextpdf.test.annotations.LogMessages;
4850
import com.itextpdf.test.annotations.type.IntegrationTest;
4951

5052
import java.io.File;
@@ -118,4 +120,15 @@ public void helloDivDocumentTest() throws IOException, InterruptedException {
118120
Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hello_div.pdf", sourceFolder + "cmp_hello_div.pdf", destinationFolder, "diff03_"));
119121
}
120122

123+
@Test
124+
@LogMessages(messages = {
125+
@LogMessage(messageTemplate = LogMessageConstant.WORKER_UNABLE_TO_PROCESS_OTHER_WORKER)
126+
})
127+
public void aBlockInPTagTest() throws IOException, InterruptedException {
128+
//TODO after DEVSIX-2002 fix change cmp_ file and remove expected LogMessage annotation
129+
HtmlConverter.convertToPdf(new File(sourceFolder + "aBlockInPTag.html"), new File(destinationFolder + "aBlockInPTag.pdf"));
130+
System.out.println("html: file:///" + UrlUtil.toNormalizedURI(sourceFolder + "aBlockInPTag.html").getPath() + "\n");
131+
Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "aBlockInPTag.pdf", sourceFolder + "cmp_aBlockInPTag.pdf", destinationFolder, "diff03_"));
132+
}
133+
121134
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<html>
2+
<body>
3+
<p>
4+
<a style="display:block">test</a>
5+
</p>
6+
</body>
7+
</html>
Binary file not shown.

0 commit comments

Comments
 (0)