-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVStack Tests.swift
More file actions
63 lines (56 loc) · 1.5 KB
/
VStack Tests.swift
File metadata and controls
63 lines (56 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// VStack Tests.swift
// swift-html
//
// Tests for VStack layout component
//
import HTML
import HTML_Rendering_TestSupport
import StandardsTestSupport
import Testing
enum VStackTests {
#TestSuites
}
// MARK: - Snapshot Tests
#if canImport(Darwin)
extension VStackTests.Test.Snapshot {
@Test("VStack renders with default settings")
func vstack() {
assertInlineSnapshot(
of: VStack {
div { "First item" }
div { "Second item" }
},
as: .html
) {
"""
<div class="row-gap-0 max-width-1 flex-direction-2 display-3 align-items-4">
<div>First item
</div>
<div>Second item
</div>
</div>
"""
}
}
@Test("VStack with custom spacing and alignment")
func vstackCustom() {
assertInlineSnapshot(
of: VStack(alignment: .start, spacing: .px(15)) {
div { "First item" }
div { "Second item" }
},
as: .html
) {
"""
<div class="row-gap-0 max-width-1 flex-direction-2 display-3 align-items-4">
<div>First item
</div>
<div>Second item
</div>
</div>
"""
}
}
}
#endif