garris / garris/BackstopJS

Reference image not found _0__0_ vs _0_document_0_

Open
#1,412 6 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

I've got a test that is, for some reason, looking for the wrong reference file. The scenario is callled "media center" and when I run `backstop reference --filter="media center"`, it generates the files as expected.

>backstop_default_media_center_0_document_0_mobile.png
>backstop_default_media_center_0_document_1_tablet.png
>backstop_default_media_center_0_document_2_desktop.png
>backstop_default_media_center_0_document_3_wide.png

But when I run `backstop test --filter="media center"`, I get the following response:

> Puppeteer encountered an error while running scenario "media center"
> TimeoutError: Navigation timeout of 60000 ms exceeded
> Puppeteer encountered an error while running scenario "media center"
> TimeoutError: Navigation timeout of 60000 ms exceeded
> Puppeteer encountered an error while running scenario "media center"
> TimeoutError: Navigation timeout of 60000 ms exceeded
> Puppeteer encountered an error while running scenario "media center"
> TimeoutError: Navigation timeout of 60000 ms exceeded
> COMMAND | Executing core for "report"
> compare | Reference image not found backstop_default_media_center_0__0_mobile.png
> compare | Reference image not found backstop_default_media_center_0__1_tablet.png
> compare | Reference image not found backstop_default_media_center_0__2_desktop.png
> compare | Reference image not found backstop_default_media_center_0__3_wide.png
> report | Test completed...
> report | 0 Passed
> report | 4 Failed

Why would it be looking for "_0__0_mobile" and such when it should be looking for "_0_document_0_" and such?

The odd thing is that this doesn't occur with all the scenarios. They all create references with "_0_document_" in the filename, but only some of the tests come up with Reference image not found. The references *are* there, but some of the the tests just aren't looking for the correct file name for some reason.

The test:

```
{
"label": "media center",
"url": "https://shielduname:shieldpw@our-dev-site.com/media-center",
"referenceUrl": "https://our-prod-site.com/media-center"
},
```
Generic settings:
```
"id": "backstop_default",
"viewports": [
{
"label": "mobile",
"width": 320,
"height": 3000
},
{
"label": "tablet",
"width": 568,
"height": 3000
},
{
"label": "desktop",
"width": 1024,
"height": 3000
},
{
"label": "wide",
"width": 1400,
"height": 3000
}
],
"onBeforeScript": "puppet/onBefore.js",
"onReadyScript": "puppet/onReady.js",
"readyEvent": "",
"readySelector": "",
"delay": 1000,
"hideSelectors": ["#universal-navigation","#universal-footer"],
"removeSelectors": ["#universal-navigation","#universal-footer"],
"hoverSelector": "",
"clickSelector": "",
"postInteractionWait": 400,
"selectors": [],
"selectorExpansion": true,
"expect": 0,
"misMatchThreshold" : 0.5,
"requireSameDimensions": true,
"cookiePath": "backstop_data/engine_scripts/cookies.json",
```

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.