loki: Failing all tests on Github Actions pipeline

Hi, Iโ€™m trying to integrate this awesome tool in our company application pipeline. Locally I get all the snapshots Passing, but when it arrives into Github actions, somehow, all the snapshots failed. This is my Loki configuration:

module.exports = {
  diffingEngine: 'looks-same',
  chromeTolerance: 20,
  chromeLoadTimeout: 120000,
  configurations: {
    'chrome.desktop': {
      target: 'chrome.app',
      width: 1920,
      height: 1080,
      deviceScaleFactor: 1,
      mobile: false,
    },
  },
}

And the command that is being executed is:

nx build-storybook backoffice && loki --reactUri file:./dist/storybook/backoffice --chromeFlags='--headless --disable-gpu --hide-scrollbars --no-sandbox'

Am I doing anything wrong ?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (4 by maintainers)

Most upvoted comments

@GorillaDevq, nope. I just added threshold for failing test๐Ÿ˜…

Do any of you have a repo that has a docker file that references an image that will run chrome-docker AND node?

Iโ€™m not sure if this is what youโ€™re looking for, but Loki itself runs test in CI (Node.js and Docker) using GitHub Actions (previously using Travis) Example build and configuration used to run Loki in CI ๐Ÿ‘‡

GitHub Actions

Travis

Does zenika/alpine-chrome work in CI?

Iโ€™ll try and give you some feedback

Hi, the recommendation is to run the loki tests in docker which will ensure the local and CI environment are identical. Looking at your configuration, the chromeTolerance: 20 sticks out as looking very high.