From 884194c027acaab358c3ffbcfb7c85dc01d99d7f Mon Sep 17 00:00:00 2001 From: danfickle Date: Thu, 21 Nov 2019 20:47:45 +1100 Subject: [PATCH] #399 #416 Add test by @VictorAtPL for empty table header/footer issue. Failing currently. Thanks @VictorAtPL [ci skip] --- .../issue-399-table-header-with-no-rows.html | 77 +++++++++++++++++++ .../VisualRegressionTest.java | 12 +++ 2 files changed, 89 insertions(+) create mode 100644 openhtmltopdf-examples/src/main/resources/visualtest/html/issue-399-table-header-with-no-rows.html diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/html/issue-399-table-header-with-no-rows.html b/openhtmltopdf-examples/src/main/resources/visualtest/html/issue-399-table-header-with-no-rows.html new file mode 100644 index 000000000..705283d2a --- /dev/null +++ b/openhtmltopdf-examples/src/main/resources/visualtest/html/issue-399-table-header-with-no-rows.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + +
+   +
+   +
+   +
+ + + + + + + + + + + + + + + + +
+   +
+   +
+   +
+ + diff --git a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java index 405a4435f..6c2ec2739 100644 --- a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java +++ b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java @@ -912,6 +912,18 @@ public void testMissingHtml5BlockElements() throws IOException { assertTrue(vt.runTest("html5-missing-block-elements")); } + /** + * Tests that a paginated table doesn't add header and footer with no rows + * on a page. + * https://github.com/danfickle/openhtmltopdf/issues/399 + */ + @Test + @Ignore // Failing for now. + public void testIssue399TableHeaderFooterWithNoRows() throws IOException { + assertTrue(vt.runTest("issue-399-table-header-with-no-rows")); + } + + // TODO: // + Elements that appear just on generated overflow pages. // + content property (page counters, etc)