Skip to content

Commit e3aa7a2

Browse files
committed
Add new ignored test
DEVSIX-1320
1 parent 2762266 commit e3aa7a2

File tree

1 file changed

+42
-8
lines changed

1 file changed

+42
-8
lines changed

layout/src/test/java/com/itextpdf/layout/TableBorderTest.java

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ This file is part of the iText (R) project.
4545
import com.itextpdf.io.LogMessageConstant;
4646
import com.itextpdf.kernel.color.Color;
4747
import com.itextpdf.kernel.geom.PageSize;
48-
import com.itextpdf.kernel.geom.Rectangle;
4948
import com.itextpdf.kernel.pdf.PdfDocument;
5049
import com.itextpdf.kernel.pdf.PdfWriter;
5150
import com.itextpdf.kernel.utils.CompareTool;
@@ -56,12 +55,8 @@ This file is part of the iText (R) project.
5655
import com.itextpdf.layout.element.Cell;
5756
import com.itextpdf.layout.element.Paragraph;
5857
import com.itextpdf.layout.element.Table;
59-
import com.itextpdf.layout.layout.LayoutArea;
60-
import com.itextpdf.layout.layout.LayoutContext;
61-
import com.itextpdf.layout.layout.LayoutResult;
6258
import com.itextpdf.layout.property.Property;
6359
import com.itextpdf.layout.property.UnitValue;
64-
import com.itextpdf.layout.renderer.TableRenderer;
6560
import com.itextpdf.test.ExtendedITextTest;
6661
import com.itextpdf.test.annotations.LogMessage;
6762
import com.itextpdf.test.annotations.LogMessages;
@@ -1084,7 +1079,7 @@ public void tableWithHeaderFooterTest06A() throws IOException, InterruptedExcept
10841079
cmpFileName = sourceFolder + cmpPrefix + fileName;
10851080

10861081
PdfDocument pdfDocument = new PdfDocument(new PdfWriter(outFileName));
1087-
Document doc = new Document(pdfDocument, PageSize.A6.rotate(), false);
1082+
Document doc = new Document(pdfDocument, PageSize.A6.rotate(), false);
10881083

10891084
Table table = new Table(5);
10901085
Cell cell = new Cell(1, 5).add(new Paragraph("Table XYZ (Continued)")).setHeight(30).setBorderBottom(new SolidBorder(Color.RED, 20));
@@ -1107,7 +1102,7 @@ public void tableWithHeaderFooterTest06B() throws IOException, InterruptedExcept
11071102
cmpFileName = sourceFolder + cmpPrefix + fileName;
11081103

11091104
PdfDocument pdfDocument = new PdfDocument(new PdfWriter(outFileName));
1110-
Document doc = new Document(pdfDocument, PageSize.A6.rotate(), false);
1105+
Document doc = new Document(pdfDocument, PageSize.A6.rotate(), false);
11111106

11121107
Table table = new Table(5);
11131108
Cell cell = new Cell(1, 5).add(new Paragraph("Table XYZ (Continued)")).setHeight(30).setBorderBottom(new SolidBorder(Color.RED, 20));
@@ -1450,7 +1445,46 @@ public void tableWithHeaderFooterTest16() throws IOException, InterruptedExcepti
14501445
doc.close();
14511446
Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, destinationFolder, testName + "_diff"));
14521447
}
1453-
1448+
1449+
@Ignore("DEVSIX-1320")
1450+
@Test
1451+
public void tableWithHeaderFooterTest17() throws IOException, InterruptedException {
1452+
String testName = "tableWithHeaderFooterTest17.pdf";
1453+
String outFileName = destinationFolder + testName;
1454+
String cmpFileName = sourceFolder + "cmp_" + testName;
1455+
1456+
PdfDocument pdfDoc = new PdfDocument(new PdfWriter(outFileName));
1457+
Document doc = new Document(pdfDoc);
1458+
1459+
String textByron =
1460+
"When a man hath no freedom to fight for at home,\n" +
1461+
" Let him combat for that of his neighbours;\n" +
1462+
"Let him think of the glories of Greece and of Rome,\n" +
1463+
" And get knocked on the head for his labours.\n" +
1464+
"\n" +
1465+
"To do good to Mankind is the chivalrous plan,\n" +
1466+
" And is always as nobly requited;\n" +
1467+
"Then battle for Freedom wherever you can,\n" +
1468+
" And, if not shot or hanged, you'll get knighted.";
1469+
1470+
1471+
Table table = new Table(2);
1472+
table.setKeepTogether(true);
1473+
1474+
int bigRowspan = 5;
1475+
table.addCell(new Cell(bigRowspan, 1).add("Big cell").setBorder(new SolidBorder(Color.GREEN, 20)));
1476+
for (int i = 0; i < bigRowspan; i++) {
1477+
table.addCell(i + " " + textByron);
1478+
}
1479+
1480+
1481+
doc.add(new Paragraph("Try to break me!"));
1482+
doc.add(table);
1483+
1484+
doc.close();
1485+
Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, destinationFolder, testName + "_diff"));
1486+
}
1487+
14541488
@Test
14551489
@LogMessages(messages = {
14561490
@LogMessage(messageTemplate = LogMessageConstant.ELEMENT_DOES_NOT_FIT_AREA, count = 2)

0 commit comments

Comments
 (0)