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

macCatalyst: Snapshots generated differ a lot between local computer and a MacStadium M1 mac mini #808

Open
sergiocampama opened this issue Nov 8, 2023 · 1 comment

Comments

@sergiocampama
Copy link

I think I'm using snapshot testing in a very niche environment, but I'm having some issues with snapshot testing that I'm not sure how to work around.

We build a Mac Catalyst app, targeting macOS directly (and not through the iPad adaptation). We also have a CI system built on top of Github actions, with MacStadium machines, specifially M2 Mac Minis (2 machines). We haven't been able to get snapshot tests to match our local development environment (Xcode 15, M2 Max MacBook pros).

Attached is one sample of a reference and a failure image. It seems on MacStadium it renders the images in way lower resolution for some reason.

Some additional information on the MacStadium machines: They don't have a monitor, they have a headless adapter that allows us to connect using screen sharing, and they have a specific color profile for that headless mode (not sure if color profile affects snapshot testing).

Are there any settings we need to configure on the CI machines that we might not know of to get rendering parity between development and CI machines?

Reference:
BD942184-5F6E-4E8E-B651-FD14BD893CCE

Failure:
9F9E88D6-5452-4C84-A01F-8FD72E137EAE

@tdrhq
Copy link

tdrhq commented Nov 9, 2023

Most larger companies do the "recording" step on CI, that completely avoids this issue, and also improves the developer workflow. Google, Meta, AirBnb etc. using an external service to manage the screenshots (this also avoids the operational overhead of maintaining things like GitLFS).

If this is something you're interested in, you could look at an open-source service like Screenshotbot or Vizzy. (Full disclosure, I built Screenshotbot, so I'm biased.)

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