@@ -47,19 +47,27 @@ This file is part of the iText (R) project.
4747import com .itextpdf .html2pdf .HtmlConverter ;
4848import com .itextpdf .html2pdf .css .media .MediaDeviceDescription ;
4949import com .itextpdf .html2pdf .css .media .MediaType ;
50+ import com .itextpdf .io .LogMessageConstant ;
5051import com .itextpdf .kernel .utils .CompareTool ;
52+ import com .itextpdf .test .annotations .LogMessage ;
53+ import com .itextpdf .test .annotations .LogMessages ;
5154import com .itextpdf .test .annotations .type .IntegrationTest ;
5255import org .junit .Assert ;
5356import org .junit .BeforeClass ;
57+ import org .junit .Rule ;
5458import org .junit .Test ;
5559import org .junit .experimental .categories .Category ;
60+ import org .junit .rules .ExpectedException ;
5661
5762import java .io .File ;
5863import java .io .IOException ;
5964
6065@ Category (IntegrationTest .class )
6166public class PageBreakTest extends ExtendedHtmlConversionITextTest {
6267
68+ @ Rule
69+ public ExpectedException junitExpectedException = ExpectedException .none (); //Member of testing class. Add if it isn't there.
70+
6371 public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/PageBreakTest/" ;
6472 public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/PageBreakTest/" ;
6573
@@ -123,6 +131,14 @@ public void pageBreakBeforeTable01Test() throws IOException, InterruptedExceptio
123131 runTest ("page-break-before-table01" );
124132 }
125133
134+ @ Test
135+ @ LogMessages (messages = {@ LogMessage (messageTemplate = LogMessageConstant .CLIP_ELEMENT )})
136+ /* Test will fail after fix in DEVSIX-2024 */
137+ public void pageBreakInConstrainedDivTest () throws IOException , InterruptedException {
138+ junitExpectedException .expect (UnsupportedOperationException .class );
139+ runTest ("pageBreakInConstrainedDivTest" );
140+ }
141+
126142 private void runTest (String name ) throws IOException , InterruptedException {
127143 String htmlPath = sourceFolder + name + ".html" ;
128144 String pdfPath = destinationFolder + name + ".pdf" ;
0 commit comments