Skip to content

Commit 9d09a57

Browse files
ars18wrwiText-CI
authored andcommitted
Add a test which demonstrates that height is not respected in case min-height is set
DEVSIX-1895 Autoported commit. Original commit hash: [c029424e5]
1 parent 2c71bae commit 9d09a57

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

itext.tests/itext.layout.tests/itext/layout/BlockTest.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,21 @@ public virtual void BorderRadiusTest06() {
843843
, "diff"));
844844
}
845845

846+
[NUnit.Framework.Test]
847+
public virtual void HeightShouldBeIncreasedUpToSetHeightTest01() {
848+
// TODO DEVSIX-1895 if height bigger than min-height is set,
849+
// then the element's height should be increased up to height
850+
String outFileName = destinationFolder + "heightShouldBeIncreasedUpToSetHeightTest01.pdf";
851+
String cmpFileName = sourceFolder + "cmp_heightShouldBeIncreasedUpToSetHeightTest01.pdf";
852+
PdfDocument pdfDocument = new PdfDocument(new PdfWriter(outFileName));
853+
Document doc = new Document(pdfDocument);
854+
Div div = new Div().SetWidth(100).SetMinHeight(100).SetHeight(200).SetBackgroundColor(ColorConstants.BLUE);
855+
doc.Add(div);
856+
doc.Close();
857+
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
858+
, "diff"));
859+
}
860+
846861
[NUnit.Framework.Test]
847862
[NUnit.Framework.Ignore("DEVSIX-1897")]
848863
public virtual void ParagraphVerticalAlignmentTest01() {

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1f73c3c7ffd488dfd67525f44747a93afc39b811
1+
c029424e5c8169fdcea1c7b7d5b5075626edaec9

0 commit comments

Comments
 (0)