Prefire
Prefire copied to clipboard
Update `#Preview` macro generated test to use `snapshotDevices`.
Short description 📝
When using #Preview macro to generate snapshot tests in combination with test configuration with multiple snapshot_devices:
test_configuration:
- target: ShowPage
- simulator_device: "iPhone15,4"
- required_os: 17
- snapshot_devices:
- iPhone 15
- iPad
- imports:
- UIKit
- Foundation
The appropriate snapshot function is not called.
Resolution
Updates the PreviewLoader extension to ensure compatibility with a template-generated function that loops through different devices for snapshot testing.