Skip to content

Commit 31e7704

Browse files
committed
Add tests to cover how overflow x\y works and update cmp files
DEVSIX-7621
1 parent d6d7312 commit 31e7704

File tree

370 files changed

+125
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

370 files changed

+125
-16
lines changed

src/test/java/com/itextpdf/html2pdf/css/multicol/BreakTest.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ This file is part of the iText (R) project.
2424

2525
import com.itextpdf.html2pdf.ConverterProperties;
2626
import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest;
27-
import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant;
28-
import com.itextpdf.test.annotations.LogMessage;
29-
import com.itextpdf.test.annotations.LogMessages;
3027
import com.itextpdf.test.annotations.type.IntegrationTest;
3128

3229
import java.io.IOException;
3330
import org.junit.BeforeClass;
31+
import org.junit.Ignore;
3432
import org.junit.Test;
3533
import org.junit.experimental.categories.Category;
3634

@@ -129,9 +127,7 @@ public void convertBreakBeforePageInsideColumnTest() throws IOException, Interru
129127
}
130128

131129
@Test
132-
// TODO DEVSIX-7552 Column-count: support break-inside, break-after and break-before properties
133-
@LogMessages(messages = {
134-
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.ELEMENT_DOES_NOT_FIT_CURRENT_AREA)})
130+
@Ignore("TODO DEVSIX-7552 Column-count: support break-inside, break-after and break-before properties")
135131
public void convertPageBreakBeforePageInsideColumnTest() throws IOException, InterruptedException {
136132
runTest("pageBreakBeforePageInsideColumnTest");
137133
}
@@ -257,8 +253,7 @@ public void convertBreakAfterPageInsideColumnTest() throws IOException, Interrup
257253
}
258254

259255
@Test
260-
@LogMessages(messages = {
261-
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.ELEMENT_DOES_NOT_FIT_CURRENT_AREA)})
256+
@Ignore("TODO DEVSIX-7552 Column-count: support break-inside, break-after and break-before properties")
262257
public void convertPageBreakAfterPageInsideColumnTest() throws IOException, InterruptedException {
263258
runTest("pageBreakAfterPageInsideColumnTest");
264259
}

src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnCountTest.java

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ This file is part of the iText (R) project.
3333

3434
import java.io.IOException;
3535
import org.junit.BeforeClass;
36-
import org.junit.Ignore;
3736
import org.junit.Test;
3837
import org.junit.experimental.categories.Category;
3938

@@ -306,7 +305,7 @@ public void widthTest() throws IOException, InterruptedException {
306305
}
307306

308307
@Test
309-
@Ignore("DEVSIX-7630")
308+
// TODO DEVSIX-7630 Multicol width&height advanced support
310309
public void widthToBigSoOverflowsOnXAxisIntoInfinity() throws IOException, InterruptedException {
311310
runTest("widthToBigSoOverflowsOnXAxisIntoInfinity");
312311
}
@@ -332,7 +331,6 @@ public void maxWidthToSmall() throws IOException, InterruptedException {
332331
}
333332

334333
@Test
335-
@Ignore("DEVSIX-7630")
336334
public void widthToBigWrapped() throws IOException, InterruptedException {
337335
runTest("widthToBigWrapped");
338336
}
@@ -353,7 +351,7 @@ public void multiColLimitedArea2() throws IOException, InterruptedException {
353351
}
354352

355353
@Test
356-
@Ignore("DEVSIX-7630")
354+
// TODO DEVSIX-7630 Multicol width&height advanced support
357355
public void multiColLimitedArea3() throws IOException, InterruptedException {
358356
runTest("multicolLimitedArea3");
359357
}
@@ -379,11 +377,36 @@ public void multipleAttributes2() throws IOException, InterruptedException {
379377
}
380378

381379
@Test
382-
@Ignore("DEVSIX-7630")
380+
// TODO DEVSIX-7630 Multicol width&height advanced support
383381
public void heightMultiPage() throws IOException, InterruptedException {
384382
runTest("height_multipage");
385383
}
386384

385+
@Test
386+
public void biggerThanColumnDivTest() throws IOException, InterruptedException {
387+
runTest("biggerThanColumnDivTest");
388+
}
389+
390+
@Test
391+
public void biggerThanColumnImageTest() throws IOException, InterruptedException {
392+
runTest("biggerThanColumnImageTest");
393+
}
394+
395+
@Test
396+
public void biggerThanColumnImageOverflowHiddenTest() throws IOException, InterruptedException {
397+
runTest("biggerThanColumnImageOverflowHiddenTest");
398+
}
399+
400+
@Test
401+
public void biggerThanColumnImageOverflowScrollTest() throws IOException, InterruptedException {
402+
runTest("biggerThanColumnImageOverflowScrollTest");
403+
}
404+
405+
@Test
406+
public void overflowOnMulticolContainerTest() throws IOException, InterruptedException {
407+
runTest("overflowOnMulticolContainerTest");
408+
}
409+
387410
private void runTest(String testName) throws IOException, InterruptedException {
388411
convertToPdfAndCompare(testName,
389412
SOURCE_FOLDER, DESTINATION_FOLDER, false,

src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolZeroHeight001Test.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ This file is part of the iText (R) project.
2323
package com.itextpdf.html2pdf.css.w3c.css_multicol;
2424

2525
import com.itextpdf.html2pdf.css.w3c.W3CCssMulticolTest;
26+
2627
import org.junit.Ignore;
2728

28-
@Ignore("DEVSIX-7588")
29+
@Ignore("DEVSIX-7630 Multicol width&height advanced support")
2930
public class MulticolZeroHeight001Test extends W3CCssMulticolTest {
3031
@Override
3132
protected String getHtmlFileName() {
Binary file not shown.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<body>
4+
<div style="column-count: 2">
5+
<div style="width: 450px; height: 500px;border: solid black 3px;margin-top: 50px;padding-left: 40px;background-color: lightgrey;"></div>
6+
</div>
7+
</body>
8+
</html>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head> </head>
4+
5+
<body>
6+
<div style="column-count: 3; border: solid red 2px;">
7+
<p style="border: solid red 2px;">
8+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
9+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
10+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
11+
commodo consequat. Duis aute irure dolor in
12+
</p>
13+
<img src="placeholder_100x100.png" style="height: 300px; width: 300px;overflow: hidden;" />
14+
<p style="border: solid blue 2px;">
15+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
16+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
17+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
18+
commodo consequat. Duis aute irure dolor in
19+
</p>
20+
</div>
21+
</body>
22+
</html>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head> </head>
4+
5+
<body>
6+
<div style="column-count: 3; border: solid red 2px;">
7+
<p style="border: solid red 2px;">
8+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
9+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
10+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
11+
commodo consequat. Duis aute irure dolor in
12+
</p>
13+
<img src="placeholder_100x100.png" style="height: 300px; width: 300px;overflow: scroll;" />
14+
<p style="border: solid blue 2px;">
15+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
16+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
17+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
18+
commodo consequat. Duis aute irure dolor in
19+
</p>
20+
</div>
21+
</body>
22+
</html>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head> </head>
4+
5+
<body>
6+
<div style="column-count: 3; border: solid red 2px;">
7+
<p style="border: solid red 2px;">
8+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
9+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
10+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
11+
commodo consequat. Duis aute irure dolor in
12+
</p>
13+
<img src="placeholder_100x100.png" style="height: 300px; width: 300px;" />
14+
<p style="border: solid blue 2px;">
15+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
16+
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
17+
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
18+
commodo consequat. Duis aute irure dolor in
19+
</p>
20+
</div>
21+
</body>
22+
</html>
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)