From d003f47c6ec5d1c62217e259e175d6df133823e4 Mon Sep 17 00:00:00 2001 From: danfickle Date: Tue, 2 Apr 2019 16:22:02 +1100 Subject: [PATCH] #340 Failing test for caption position with non-full-width table. --- .../html/text/table-caption-position.html | 20 +++++++++++++++++++ .../TextVisualRegressionTest.java | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 openhtmltopdf-examples/src/main/resources/visualtest/html/text/table-caption-position.html diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/html/text/table-caption-position.html b/openhtmltopdf-examples/src/main/resources/visualtest/html/text/table-caption-position.html new file mode 100644 index 000000000..e6d501113 --- /dev/null +++ b/openhtmltopdf-examples/src/main/resources/visualtest/html/text/table-caption-position.html @@ -0,0 +1,20 @@ + + + + + +
+ + + +
Caption
12
+
+ + diff --git a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/TextVisualRegressionTest.java b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/TextVisualRegressionTest.java index e327cab22..b3809e6f8 100644 --- a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/TextVisualRegressionTest.java +++ b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/TextVisualRegressionTest.java @@ -505,4 +505,14 @@ public void testContentPageNumbers() throws IOException { public void testContentTableOfContentsExample() throws IOException { assertTrue(run("content-toc-example")); } + + /** + * Tests that the table caption position is correct in the case when the table is not 100% width. + * Issue 340. + */ + @Test + @Ignore // Failing because the caption box is set as 100% the width of its container, regardless of the table width. + public void testTableCaptionPosition() throws IOException { + assertTrue(run("table-caption-position")); + } }