-
Notifications
You must be signed in to change notification settings - Fork 5
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
#I Improve snapshot test #783
Conversation
0f5807d
to
b22b684
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me. More convenient
Please add FIRM tag to PR title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we have discussed earlier, in my opinion, extending UIViewController to get snapshot references, makes all snapshots very specific - meaning that we will be forced to create same extension for UIView, SwiftUI.View etc, over and over. I think we should instead extend Snapshotting or SnapshotTestCase to keep snapshot matching value
generic as it is right now in assertSnapshot<Value, Format>
and get desired behaviour via method overload.
Please re-review as the complete update has been added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think assertSnapshot
in more appropriate method name than testSnapshot
.
fixed d23621c |
This PR improves the way snapshot tests are executed. By creating an extension to UIViewController, we can now create snapshot tests with less code, time, and effort. And, it is much more readable. Since our usages of snapshot tests are very limited (for now), this approach serves those purposes very well. As this proposal is up for debate, I would like to hear everybody's input on it. Please share what are your thoughts on making this change. MOB-2696
d23621c
to
e39a873
Compare
This PR improves the way snapshot tests are executed. By creating an
extension to UIViewController, we can now create snapshot tests with
less code, time, and effort. And, it is much more readable. Since our
usages of snapshot tests are very limited (for now), this approach serves
those purposes very well.
This commit also updates the following:
correct naming, leaving out the dimensions of the view. This PR fixes that
and extra3LargeFont tests
Snapshots PR: https://github.com/salemove/ios-widgets-snapshots/pull/50
MOB-2696