Skip to content

Commit ebee416

Browse files
committed
Add DynamicLayoutViewUITests
1 parent 2fb8564 commit ebee416

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//
2+
// DynamicLayoutViewUITests.swift
3+
// OpenSwiftUIUITests
4+
5+
import SnapshotTesting
6+
import Testing
7+
8+
@MainActor
9+
@Suite(.snapshots(record: .never, diffTool: diffTool))
10+
struct DynamicLayoutViewUITests {
11+
@Test
12+
func dynamicLayout() {
13+
struct ContentView: View {
14+
@State var show = false
15+
var body: some View {
16+
VStack {
17+
Color.red
18+
.task { show = true }
19+
if show {
20+
Color.blue
21+
}
22+
}
23+
}
24+
}
25+
openSwiftUIAssertSnapshot(of: ContentView())
26+
}
27+
}

0 commit comments

Comments
 (0)