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

Include the identifier in the call to FBSnapshotVerifyView for SnapshotVerifyWithInvertedColors #183

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

kruegermj
Copy link
Collaborator

@kruegermj kruegermj commented Jan 16, 2024

Resolves #51

in the SnapshotVerifyWithInvertedColors implementation
@kruegermj kruegermj force-pushed the krueger/inverted-colors-identifier branch 4 times, most recently from d7e2168 to 1910da9 Compare January 16, 2024 23:14
@kruegermj kruegermj marked this pull request as ready for review January 16, 2024 23:15
@kruegermj kruegermj requested a review from NickEntin January 16, 2024 23:15
Comment on lines +36 to +37
override func viewDidLoad() {
super.viewDidLoad()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change to viewDidLoad()? This should mirror the notification center observer removal in viewWillDisappear(_:) below.

Copy link
Collaborator Author

@kruegermj kruegermj Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I misunderstood the comment below in the issue. I think we just need to update the status label in viewDidLoad. I made that change and confirmed it is needed to get the label to render in the snapshot.

Due to a view life cycle issue with the snapshot test framework, you'll need to modify where the status get checked in the sample view controller in order to get the initial check to pass. The easiest way to accomplish this is to move the code from viewWillAppear(_:) to the end of viewDidLoad().

this is needed because of a life cycle issue in the test framework
@kruegermj kruegermj force-pushed the krueger/inverted-colors-identifier branch from d995636 to 4ffd48f Compare January 17, 2024 11:30
@kruegermj kruegermj requested a review from NickEntin January 17, 2024 11:41
@kruegermj kruegermj merged commit 22150a3 into master Jan 18, 2024
6 checks passed
@kruegermj kruegermj deleted the krueger/inverted-colors-identifier branch January 18, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snapshotting with invert colors doesn't respect snapshot identifier
2 participants