mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Update FormattedBodyText snapshots: cover more cases and use sizeThatFits layout
This commit is contained in:
parent
099b69d2f2
commit
136ecb125c
@ -180,6 +180,15 @@ struct FormattedBodyText_Previews: PreviewProvider, TestablePreview {
|
||||
@ViewBuilder
|
||||
static var body: some View {
|
||||
let htmlStrings = [
|
||||
"""
|
||||
Plain text\n
|
||||
@bob:matrix.org\n
|
||||
#room:matrix.org\n
|
||||
!room:matrix.org\n
|
||||
https://www.matrix.org\n
|
||||
www.matrix.org\n
|
||||
matrix.org
|
||||
""",
|
||||
"""
|
||||
Text before blockquote
|
||||
<blockquote>
|
||||
@ -203,6 +212,8 @@ struct FormattedBodyText_Previews: PreviewProvider, TestablePreview {
|
||||
<code><b>Hello</b> <i>world</i></code>
|
||||
<p>Text</p>
|
||||
<code>Hello world</code>
|
||||
<p>Text</p>
|
||||
<code><a href="https://www.matrix.org">matrix.org</a> https://www.matrix.org</code>
|
||||
""",
|
||||
"<p>This is a list</p>\n<ul>\n<li>One</li>\n<li>Two</li>\n<li>And number 3</li>\n</ul>\n",
|
||||
"<ul><li>First item</li><li>Second item</li><li>Third item</li></ul>",
|
||||
@ -231,6 +242,8 @@ struct FormattedBodyText_Previews: PreviewProvider, TestablePreview {
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
.previewLayout(.sizeThatFits)
|
||||
.snapshot(delay: 0.25)
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPad-en-GB.1.png
(Stored with Git LFS)
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPad-en-GB.1.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPad-en-GB.2.png
(Stored with Git LFS)
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPad-en-GB.2.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPad-pseudo.1.png
(Stored with Git LFS)
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPad-pseudo.1.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPad-pseudo.2.png
(Stored with Git LFS)
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPad-pseudo.2.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPhone-15-en-GB.1.png
(Stored with Git LFS)
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPhone-15-en-GB.1.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPhone-15-en-GB.2.png
(Stored with Git LFS)
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPhone-15-en-GB.2.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPhone-15-pseudo.1.png
(Stored with Git LFS)
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPhone-15-pseudo.1.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPhone-15-pseudo.2.png
(Stored with Git LFS)
BIN
PreviewTests/__Snapshots__/PreviewTests/test_formattedBodyText-iPhone-15-pseudo.2.png
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user