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

Some tests psuedo-randomly return "Images different sizes" where image size is a pixel off #117

Open
zablaetna opened this issue Jan 7, 2020 · 1 comment

Comments

@zablaetna
Copy link

Noticing this on Xcode 10.3, I can run recordMode and then when I do the UI tests sometimes the image comparison is off by one pixel in size:

Snapshot comparison failed: Error Domain=FBSnapshotTestControllerErrorDomain Code=3 "Images different sizes" UserInfo={NSLocalizedFailureReason=referenceImage:{240, 240}, image:{240, 239}, FBDiffedImageKey=<UIImage: 0x600002bf6d10>, {80, 80}, FBReferenceImageKey=<UIImage: 0x600002b865a0>, {80, 80}, FBCapturedImageKey=<UIImage: 0x600002b9a140>, {80, 79.666666666666671}, NSLocalizedDescription=Images different sizes}

Note above the 80x80 icon is reported as 80x79.66 which makes the 240x240 @3x size become 240x239. I'm not sure why this is happening, but a month ago I noticed that views that were purposely 0.5 pixel in height (and I assumed width) got reported incorrectly, too.

Any way to avoid this?

@appleios
Copy link

appleios commented Sep 2, 2021

+1

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

No branches or pull requests

2 participants