You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we run the tests for the first time and it records the snapshots, they will pass as long as we have that same simulator selected in xcode.
Here:
But why does this device that is selected matter if we are passing in the device configuration when we record and run the snapshot tests. So our tests have something like this
Testing_Previews.compactSnapshot.assertSnapshots(as: .image(layout: .device(config: .iPhone15ProMax(.portrait))))
If we were to run this test and have SE 3rd generation simulator selected for the device in xcode then this test will always run/pass if SE 3rd gen is picked. But if we run this test again another simulator like iPad mini then it will fail. Why does the device selected in Xcode menu matter if it allows us to pass in the device configuration we want used? 🤔
The text was updated successfully, but these errors were encountered:
@rfodge The device configuration passed to assertSnapshots is just a size and safe area insets to capture the images using.
Using a different simulator in Xcode means that the tests are actually run on a different device (simulator) so lots of things can vary such as text spacing, default element sizing, etc.
When we run the tests for the first time and it records the snapshots, they will pass as long as we have that same simulator selected in xcode.
Here:
But why does this device that is selected matter if we are passing in the device configuration when we record and run the snapshot tests. So our tests have something like this
Testing_Previews.compactSnapshot.assertSnapshots(as: .image(layout: .device(config: .iPhone15ProMax(.portrait))))
If we were to run this test and have SE 3rd generation simulator selected for the device in xcode then this test will always run/pass if SE 3rd gen is picked. But if we run this test again another simulator like iPad mini then it will fail. Why does the device selected in Xcode menu matter if it allows us to pass in the device configuration we want used? 🤔
The text was updated successfully, but these errors were encountered: