garris / garris/BackstopJS

Dimensions difference wrong

Open
#969 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

The "diff-y" and "diff-x" from the test info in html report which are taken from the `dimensionDifference` field of generated config.js, show the difference as positive/negative based on no-idea-what.

For the test where test image is narrower from reference by 2 pixels and longer by 3510px and output is:
```diff-x: 2 diff-y: -3510```
For the test where test image is also narrower from reference by 2 pixels but shorter by 1864px, it was:
```diff-x: -2 diff-y: -1864```

I tried to pinpoint the cause, but it looks like `dimensionDifference` comes directly from `node-resemble-js`.

**Expected behaviour:**
Diff values should be consistently negative/positive if the given dimension of test image is smaller/bigger then the reference.

**Backstop version**: 3.8.8

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.