Open sparafinski opened 1 year ago
It seems that this is a problem of the swift-snapshot-tests library. I found a PR in it that should fix this.
I'll try to think later about how to get around this inside the Prefire.
Also, it seems that .preferredColorScheme(.dark)
is not handled properly. I found a PR that states it should already work 🤔 using swift-snapshot-tests . Do you think it could be the same cause?
It sounds like a bug in the Prefire. I set myself the task to fix it in the 2.0 release 😊
Context 🕵️♀️
While attempting to capture a view that includes AsyncImage or revealing a component after a specified duration, it's been noticed that the resulting snapshot doesn't include images loaded via URL or views that appear with a slight delay. Even when using
.snapshot(delay: 1.0)
, there's no noticeable improvement in this scenario.What 🌱
To overcome this challenge, it would be helpful to incorporate an option to wait before taking the snapshot. This way, we can ensure that the snapshot accounts for the asynchronous loading of images and views that emerge after a delay.
Example of a view that isn't properly captured in the snapshot: