Skip to content

Commit 1a68bb1

Browse files
committed
Add tests for flex direction with align items/content
DEVSIX-9012
1 parent c43eb48 commit 1a68bb1

File tree

208 files changed

+4828
-245
lines changed

Some content is hidden

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

208 files changed

+4828
-245
lines changed

src/test/java/com/itextpdf/html2pdf/css/FlexColumnReverseTest.java

Lines changed: 164 additions & 40 deletions
Large diffs are not rendered by default.

src/test/java/com/itextpdf/html2pdf/css/FlexColumnTest.java

Lines changed: 239 additions & 44 deletions
Large diffs are not rendered by default.

src/test/java/com/itextpdf/html2pdf/css/FlexPagingTest.java

Lines changed: 0 additions & 161 deletions
This file was deleted.
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2025 Apryse Group NV
4+
Authors: Apryse Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
package com.itextpdf.html2pdf.css;
24+
25+
import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest;
26+
import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant;
27+
import com.itextpdf.test.annotations.LogMessage;
28+
import com.itextpdf.test.annotations.LogMessages;
29+
30+
import java.io.IOException;
31+
import org.junit.jupiter.api.BeforeAll;
32+
import org.junit.jupiter.api.Tag;
33+
import org.junit.jupiter.api.Test;
34+
35+
@Tag("IntegrationTest")
36+
public class FlexRowReverseTest extends ExtendedHtmlConversionITextTest {
37+
38+
public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/FlexRowReverseTest/";
39+
public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/FlexRowReverseTest/";
40+
41+
@BeforeAll
42+
public static void beforeClass() {
43+
createOrClearDestinationFolder(DESTINATION_FOLDER);
44+
}
45+
46+
@Test
47+
@LogMessages(messages = {
48+
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.FLEX_PROPERTY_IS_NOT_SUPPORTED_YET, count = 51)
49+
})
50+
public void flexDirRowReverseAlignContentBaselineTest() throws IOException, InterruptedException {
51+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-baseline", SOURCE_FOLDER, DESTINATION_FOLDER);
52+
}
53+
54+
@Test
55+
public void flexDirRowReverseAlignContentCenterTest() throws IOException, InterruptedException {
56+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-center", SOURCE_FOLDER, DESTINATION_FOLDER);
57+
}
58+
59+
@Test
60+
@LogMessages(messages = {
61+
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.FLEX_PROPERTY_IS_NOT_SUPPORTED_YET)
62+
})
63+
public void flexDirRowReverseAlignContentEndTest() throws IOException, InterruptedException {
64+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-end", SOURCE_FOLDER, DESTINATION_FOLDER);
65+
}
66+
67+
@Test
68+
@LogMessages(messages = {
69+
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.FLEX_PROPERTY_IS_NOT_SUPPORTED_YET)
70+
})
71+
public void flexDirRowReverseAlignContentFirstBaselineTest() throws IOException, InterruptedException {
72+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-first-baseline", SOURCE_FOLDER, DESTINATION_FOLDER);
73+
}
74+
75+
@Test
76+
public void flexDirRowReverseAlignContentFlexEndTest() throws IOException, InterruptedException {
77+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-flex-end", SOURCE_FOLDER, DESTINATION_FOLDER);
78+
}
79+
80+
@Test
81+
public void flexDirRowReverseAlignContentFlexStartTest() throws IOException, InterruptedException {
82+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-flex-start", SOURCE_FOLDER, DESTINATION_FOLDER);
83+
}
84+
85+
@Test
86+
public void flexDirRowReverseAlignContentNormalTest() throws IOException, InterruptedException {
87+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-normal", SOURCE_FOLDER, DESTINATION_FOLDER);
88+
}
89+
90+
@Test
91+
public void flexDirRowReverseAlignContentSpaceAroundTest() throws IOException, InterruptedException {
92+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-space-around", SOURCE_FOLDER, DESTINATION_FOLDER);
93+
}
94+
95+
@Test
96+
public void flexDirRowReverseAlignContentSpaceBetweenTest() throws IOException, InterruptedException {
97+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-space-between", SOURCE_FOLDER, DESTINATION_FOLDER);
98+
}
99+
100+
@Test
101+
public void flexDirRowReverseAlignContentSpaceEvenlyTest() throws IOException, InterruptedException {
102+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-space-evenly", SOURCE_FOLDER, DESTINATION_FOLDER);
103+
}
104+
105+
@Test
106+
@LogMessages(messages = {
107+
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.FLEX_PROPERTY_IS_NOT_SUPPORTED_YET)
108+
})
109+
public void flexDirRowReverseAlignContentStartTest() throws IOException, InterruptedException {
110+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-start", SOURCE_FOLDER, DESTINATION_FOLDER);
111+
}
112+
113+
@Test
114+
public void flexDirRowReverseAlignContentStretchTest() throws IOException, InterruptedException {
115+
convertToPdfAndCompare("flex-dir-row-reverse-align-content-stretch", SOURCE_FOLDER, DESTINATION_FOLDER);
116+
}
117+
118+
@Test
119+
@LogMessages(messages = {
120+
@LogMessage(messageTemplate = Html2PdfLogMessageConstant.FLEX_PROPERTY_IS_NOT_SUPPORTED_YET, count = 51)
121+
})
122+
public void flexDirRowReverseAlignItemsBaselineTest() throws IOException, InterruptedException {
123+
convertToPdfAndCompare("flex-dir-row-reverse-align-items-baseline", SOURCE_FOLDER, DESTINATION_FOLDER);
124+
}
125+
126+
@Test
127+
public void flexDirRowReverseAlignItemsCenterTest() throws IOException, InterruptedException {
128+
convertToPdfAndCompare("flex-dir-row-reverse-align-items-center", SOURCE_FOLDER, DESTINATION_FOLDER);
129+
}
130+
131+
@Test
132+
public void flexDirRowReverseAlignItemsEndTest() throws IOException, InterruptedException {
133+
convertToPdfAndCompare("flex-dir-row-reverse-align-items-end", SOURCE_FOLDER, DESTINATION_FOLDER);
134+
}
135+
136+
@Test
137+
public void flexDirRowReverseAlignItemsFlexEndTest() throws IOException, InterruptedException {
138+
convertToPdfAndCompare("flex-dir-row-reverse-align-items-flex-end", SOURCE_FOLDER, DESTINATION_FOLDER);
139+
}
140+
141+
@Test
142+
public void flexDirRowReverseAlignItemsFlexStartTest() throws IOException, InterruptedException {
143+
convertToPdfAndCompare("flex-dir-row-reverse-align-items-flex-start", SOURCE_FOLDER, DESTINATION_FOLDER);
144+
}
145+
146+
@Test
147+
public void flexDirRowReverseAlignItemsSelfEndTest() throws IOException, InterruptedException {
148+
convertToPdfAndCompare("flex-dir-row-reverse-align-items-self-end", SOURCE_FOLDER, DESTINATION_FOLDER);
149+
}
150+
151+
@Test
152+
public void flexDirRowReverseAlignItemsSelfStartTest() throws IOException, InterruptedException {
153+
convertToPdfAndCompare("flex-dir-row-reverse-align-items-self-start", SOURCE_FOLDER, DESTINATION_FOLDER);
154+
}
155+
156+
@Test
157+
public void flexDirRowReverseAlignItemsStartTest() throws IOException, InterruptedException {
158+
convertToPdfAndCompare("flex-dir-row-reverse-align-items-start", SOURCE_FOLDER, DESTINATION_FOLDER);
159+
}
160+
161+
@Test
162+
public void flexDirRowReverseAlignItemsStretchTest() throws IOException, InterruptedException {
163+
convertToPdfAndCompare("flex-dir-row-reverse-align-items-stretch", SOURCE_FOLDER, DESTINATION_FOLDER);
164+
}
165+
}

0 commit comments

Comments
 (0)