Skip to content

Commit c029424

Browse files
committed
Add a test which demonstrates that height is not respected in case min-height is set
DEVSIX-1895
1 parent 1f73c3c commit c029424

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,24 @@ public void borderRadiusTest06() throws IOException, InterruptedException {
11281128
Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, destinationFolder, "diff"));
11291129
}
11301130

1131+
@Test
1132+
// TODO DEVSIX-1895 if height bigger than min-height is set,
1133+
// then the element's height should be increased up to height
1134+
public void heightShouldBeIncreasedUpToSetHeightTest01() throws IOException, InterruptedException {
1135+
String outFileName = destinationFolder + "heightShouldBeIncreasedUpToSetHeightTest01.pdf";
1136+
String cmpFileName = sourceFolder + "cmp_heightShouldBeIncreasedUpToSetHeightTest01.pdf";
1137+
PdfDocument pdfDocument = new PdfDocument(new PdfWriter(outFileName));
1138+
1139+
Document doc = new Document(pdfDocument);
1140+
1141+
Div div = new Div().setWidth(100).setMinHeight(100).setHeight(200).setBackgroundColor(ColorConstants.BLUE);
1142+
doc.add(div);
1143+
1144+
doc.close();
1145+
1146+
Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, destinationFolder, "diff"));
1147+
}
1148+
11311149
@Test
11321150
@Ignore("DEVSIX-1897")
11331151
public void paragraphVerticalAlignmentTest01() throws IOException, InterruptedException {

0 commit comments

Comments
 (0)