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
We use multiple tokens based on SizeClass. Currently, our tests only cover the portrait mode. To make our tests more robust, it would be beneficial to add tests for tokens that depend on SizeClass in landscape mode as well. The "swift-snapshot-testing" library helps facilitate this implementation.
... I want to
Ensure that tokens utilizing SizeClass are tested in both orientations for more robust test coverage
... so that I can
Ensure comprehensive test coverage across different device orientations
View testing is highly configurable. You can override trait collections (for specific size classes and content size categories) and generate device-agnostic snapshots, all from a single simulator.
Prerequisites
As a
We use multiple tokens based on SizeClass. Currently, our tests only cover the portrait mode. To make our tests more robust, it would be beneficial to add tests for tokens that depend on SizeClass in landscape mode as well. The "swift-snapshot-testing" library helps facilitate this implementation.
... I want to
Ensure that tokens utilizing SizeClass are tested in both orientations for more robust test coverage
... so that I can
Ensure comprehensive test coverage across different device orientations
Motivation and context
No response
Proposed Solution
https://github.com/pointfreeco/swift-snapshot-testing
View testing is highly configurable. You can override trait collections (for specific size classes and content size categories) and generate device-agnostic snapshots, all from a single simulator.
assertSnapshot(of: vc, as: .image(on: .iPhoneSe(.landscape)))
Other
No response
Contact Details
No response
The text was updated successfully, but these errors were encountered: