deviceScaleFactor and Docker
In the configuration docs regarding deviceScaleFactor:
Browser pixel density multiple, use 2 for retina, not supported in docker.
target: chrome.app
Can this be an issue in docker? We are experiencing differences depending on the machine running loki (M1 Mac vs CI or regular Mac).
Apparently it's possible to force chrome headless device scale factor:
https://stackoverflow.com/questions/54484599/enforce-screenshot-resolution-with-google-chrome-headless-mode
How could that be configured in Loki?
Thanks
Facing something very similar where all the diffs are caused by pixel density changes between Intel and M1 MacBook.
@florian-milky It should be possible to pass it as a 'chromeFlags' in your loki command, e.g.
loki test --requireReference --chromeRetries=10 --chromeConcurrency=1 --reactUri=file:./storybook-static --chromeRetries=10 --chromeFlags="--headless --no-sandbox --hide-scrollbars --disable-gpu --force-device-scale-factor=1",
Although this doesn't solve the issue we have at our end where generated screenshots vary slightly as well between M1 Mac vs other platforms. Haven't been able to find a solution to that as of yet, but would be very interested in one.