Skip to content

SUPPORT - How to set misMatchThreshold #1613

@omarlopesino

Description

@omarlopesino

Hi. I would like to know how to set the misMatchThreshold parameter. I've tried to set it up following README configuration without success. How can I do it?

System specs

BackstopJS 6.3.7

SO: Debian 12

What I've tried

I've tried to:

  • SEt defaultMisMatchThreshold: 1 at root composer.json:
{
...
  "defaultMisMatchThreshold": 1,
...
}
  • Set misMatchThreshold: 1 at scenarioDefaults:
  "onBeforeScript": "puppet/onBefore.js",
  "onReadyScript": "puppet/onReady.js",
  "scenarioDefaults": {
    "misMatchThreshold": 1
  },

Force use precise matching in resemble options:

  "resembleOutputOptions": {
    "usePreciseMatching": true
  },
  • Set misMatchThreshold: 1 at scenario configuration:
    {
      "label": "Components 1",
      "cookiePath": "engine_scripts/cookies.json",
      "url": "https://web//components-1",
      "selectorExpansion": true,
      "readySelector": "body",
      "misMatchThreshold": 10
    },
  • Set requireSameDimensions as false at the same levels (defaultRequireSameDimensions, scenarioDefaults and scenario level).

After trying all this, the result is always , in the error output, that the threshold is 0.1:

ERROR { requireSameDimensions: true, size: isDifferent, content: 0.13%, threshold: 0.1% }:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions