Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] Update the UI tests to account for SizeClass #339

Open
1 task done
Tayebsed93 opened this issue Dec 4, 2024 · 0 comments
Open
1 task done

[Tests] Update the UI tests to account for SizeClass #339

Tayebsed93 opened this issue Dec 4, 2024 · 0 comments
Labels
📱 demo app Update of the Demo App 🔍 triage A new issue that needs to be treated

Comments

@Tayebsed93
Copy link
Collaborator

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

@Tayebsed93 Tayebsed93 added 📱 demo app Update of the Demo App 🔍 triage A new issue that needs to be treated labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📱 demo app Update of the Demo App 🔍 triage A new issue that needs to be treated
Projects
Status: Triage
Development

No branches or pull requests

3 participants