garris / garris/BackstopJS

hideSelectors not working for reference, but for test (puppeteer)

Open
#1,425 4 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'm using hideSelectors on ".slick" slideshows as timing may otherwise cause differences.

For "test" everything works fine and as expected, but for "reference" the hideSelectors don't seem to work:
![grafik](https://user-images.githubusercontent.com/637807/179174423-185b49cb-6b18-42cc-925f-4fc40b07183c.png)
(The head should be hidden in both, but only test is correct)

This is my backstop.json:

```
{
"viewports": [
{
"name": "large",
"width": 1280,
"height": 920
},
{
"label": "medium",
"width": 1024,
"height": 768
},
{
"label": "small",
"width": 640,
"height": 920
}
],
"paths": {
"bitmaps_reference": "backstop_data/bitmaps_reference",
"bitmaps_test": "backstop_data/bitmaps_test",
"engine_scripts": "backstop_data/engine_scripts",
"html_report": "backstop_data/html_report",
"ci_report": "backstop_data/ci_report"
},
"report": [
"browser"
],
"engine": "puppeteer",
"engineOptions": {
"args": [
"--no-sandbox"
]
},
"asyncCaptureLimit": 5,
"asyncCompareLimit": 50,
"debug": false,
"debugWindow": false,
"misMatchThreshold": 2,
"scenarios": [
{
"label": "/wohnungsbau",
"url": "https://new.example.com/example",
"referenceUrl": "https://www.example.com/example",
"selectors": [
"document"
],
"hideSelectors": [
"iframe",
".slick",
".blazy",
".captcha",
"#cookiesjsr"
]
},
...
```

What am I doing wrong? I already deleted the entire backstop_data folder and run it again. I'm having the same issue on multiple different projects with similar configuration.

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.