Skip to content

Commit 185b6b5

Browse files
committed
Add test for case with empty tr
Test for case when empty tr tag breaks construction of table with rowspan and border collapsing DEVSIX-5290
1 parent cdef7e6 commit 185b6b5

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

src/test/java/com/itextpdf/html2pdf/element/TableTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,13 @@ public void cellWithRowspanShouldBeConsideredWhileCalculatingColumnWidths() thro
559559
runTest("cellWithRowspanShouldBeConsideredWhileCalculatingColumnWidths");
560560
}
561561

562+
563+
@Test
564+
// TODO DEVSIX-5290 change cmp after the correction
565+
public void emptyTrRowspanBorderCollapsingTest() throws IOException, InterruptedException {
566+
runTest("emptyTrRowspanBorderCollapsing");
567+
}
568+
562569
@Test
563570
public void tagsFlushingErrorWhenConvertedFromHtmlTest() throws IOException {
564571
String file = sourceFolder + "tagsFlushingErrorWhenConvertedFromHtml.html";
Binary file not shown.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style>
5+
table {
6+
border-collapse: collapse;
7+
}
8+
9+
td {
10+
border: 1px solid #000;
11+
}
12+
</style>
13+
</head>
14+
<body>
15+
<div>
16+
<table>
17+
<tbody>
18+
<tr>
19+
<td rowspan="3">
20+
sentiments
21+
</td>
22+
<td colspan="2">
23+
discovered
24+
</td>
25+
</tr>
26+
<tr>
27+
</tr>
28+
<tr>
29+
<td colspan="1">
30+
middleton
31+
</td>
32+
<td colspan="1">
33+
3267437394
34+
</td>
35+
</tr>
36+
</tbody>
37+
</table>
38+
</div>
39+
</body>
40+
</html>

0 commit comments

Comments
 (0)