Slide 9
Slide 9 text
Example
func test_ColorfulTiles_Preview() {
let preview = {
VStack(spacing: 40) {
RoundedRectangle(cornerRadius: 8)
.fill(Color.pink)
RoundedRectangle(cornerRadius: 8)
.fill(Color.cyan)
RoundedRectangle(cornerRadius: 8)
.fill(Color.orange)
}
.padding(40)
.prefireEnabled()
}
let isScreen = true
if let failure = assertSnapshots(
for: PrefireSnapshot(
preview(),
name: "Colorful Tiles",
isScreen: isScreen,
device: deviceConfig)
) {
XCTFail(failure)
}
}
!IJSBHSBN