-
Notifications
You must be signed in to change notification settings - Fork 642
Open
Description
Describe the bug
Snapshot tests for iPad devices fail when using Swift Testing in CI environments only and not locally. Due to the missing attachment support for Swift Testing, it's not possible evaluate why the tests fail. Generally, curious if anyone experienced a similar behaviour.
To Reproduce
Setup a GitHub test runner (configuration below) and execute any snapshot test using an iPad test config.
@Test("Reverse Label Style")
func reverseLabelStyle() {
let label = SwiftUI.Label("100 %", image: "battery.100")
.labelStyle(.reverse)
#if os(iOS)
assertSnapshot(of: label, as: .image(layout: .device(config: .iPadPro11)), named: "ipad-regular")
#endif
}Expected behavior
Tests that pass locally should pass on the CI as well.
Environment
swift-snapshot-testing version 1.18.4
Xcode 16.3
Build version 16E140
Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.[13](https://github.com/StanfordSpezi/SpeziViews/actions/runs/15121228869/job/42503853058#step:5:14).3)
Target: arm64-apple-macosx15.0
env.selfhosted: true
{ platform:iOS Simulator, arch:arm64, id:D7ACB328-69BF-46BF-8BBF-F640A7853A03, OS:18.5, name:iPhone 16 Pro }Additional context
Generally, more interested in whether anyone else experienced this behaviour only in CI environments with tests passing locally.
Metadata
Metadata
Assignees
Labels
No labels