cypress-image-snapshot icon indicating copy to clipboard operation
cypress-image-snapshot copied to clipboard

Difference in docker in GH actions vs docker locally

Open Jacek-fstack opened this issue 8 months ago • 2 comments
trafficstars

Hello! I have a huge problem that I have no idea how to overcome - maybe it's a bug, maybe there's a workaround. To make sure there's NO difference between snapshots taken on various machines and CI we dockerized our tests. There's one container that's running Storybook and another running cypress with cypress-image-snapshot plugin. However, when ran locally between various machines there's 0 differences, but in CI it fails, especially where fonts are involved in copmonents. Here's an example: Image

Did anyone encounter this issue? We're running electron, Cypress' latest docker image. Yes, I made 100% sure that all fonts are loading etc. (I even added 5s explicit wait just to double check). Makes no sense to me why these would differ, but here we are. Anybody had these issues?

Jacek-fstack avatar Mar 13 '25 15:03 Jacek-fstack

~~You create the original snapshots in Docker too?~~ nvm, I didn't see the full title

Only thing I can advise is that you have the same distro and version as the one being used on CI. I also use Electron to ensure the browser is the same too

simonsmith avatar Mar 13 '25 15:03 simonsmith

~You create the original snapshots in Docker too?~ nvm, I didn't see the full title

Only thing I can advise is that you have the same distro and version as the one being used on CI. I also use Electron to ensure the browser is the same too

I mean it's literally the same containter - I even tried hardcoding SHA for both

Jacek-fstack avatar Mar 14 '25 06:03 Jacek-fstack