meinaart / cypress-plugin-snapshots

Plugin for snapshot tests in Cypress.io
MIT License
498 stars 117 forks source link

(bug) Images are cut at the bottom sometimes #162

Open paynebc opened 3 years ago

paynebc commented 3 years ago

Describe the bug Every X runs, a test will fail because a snapshot is cut at the bottom. Rerunning the test will usually result in the correct snapshot again. The failing test is not always the same, it seems completely random

To Reproduce All snapshots are created using: cy.document().toMatchImageSnapshot();

Expected behavior Screenshots are always complete

Screenshots ref actual diff

Desktop (please complete the following information):

Configuration

{
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "ignoreTestFiles": [
    "**/__snapshots__/*",
    "**/__image_snapshots__/*"
  ],
  "env": {
    "cypress-plugin-snapshots": {
      "autoCleanUp": false,
      "autopassNewSnapshots": true,
      "diffLines": 3,
      "excludeFields": [],
      "ignoreExtraArrayItems": false,
      "ignoreExtraFields": false,
      "normalizeJson": true,
      "prettier": true,
      "imageConfig": {
        "createDiffImage": true,
        "resizeDevicePixelRatio": true,
        "threshold": 0.004,
        "thresholdType": "percent"
      },
      "screenshotConfig": {
        "blackout": [],
        "capture": "fullPage",
        "clip": null,
        "disableTimersAndAnimations": true,
        "log": false,
        "scale": false,
        "timeout": 30000
      },
      "serverEnabled": true,
      "serverHost": "localhost",
      "serverPort": 2121,
      "updateSnapshots": false,
      "backgroundBlend": "difference"
    }
  }
}