Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backstop does not correctly render web pages #1347

Open
empeekdev opened this issue Aug 2, 2021 · 3 comments
Open

Backstop does not correctly render web pages #1347

empeekdev opened this issue Aug 2, 2021 · 3 comments

Comments

@empeekdev
Copy link

empeekdev commented Aug 2, 2021

Hi, we want to use BackstopJS to monitor design "crashes" on our WordPress site. For some reason Backstop differently render web page for reference and test cases ( different font size, also I noticed that sometimes images does not load at all). I set 1920x1080 screen size but looks like that reference and test rendering in different screen size. I tried also docker way to run Backstop but it has the same problem. I thought this problem related only to our site but when I tried to use google.com the same problem appeared. Do you have any idea what I'm doing wrong?

@klodoma
Copy link
Contributor

klodoma commented Aug 4, 2021

Please give it first a try with asyncCaptureLimit: 1 and let us know how that goes.
I am also experiencing inconsistent results over web-pages and still not sure where that comes from. (maybe related to #1343 ?)

@nilsbentlage
Copy link

Hey Folks,
im experimenting with this, too. There's one workaround i found:
Using 'html' as the selector in the scenario options, helps me to get more consistant results. Interesting about this: Some IMGs (we're loading them as base64 strings) are displayed correct only when i select the html. If i leave that blank (document) sometimes they are printed in the screenshot, sometimes not.

Another thing i did to improve performance and stability: I wrote a script, triggered by a URL Parameter that uses jQuery to delete anything below 16000px and also sets overflow-x: hidden to the body element.

Let me know if you got a tip how to render these images properly without using the html-tag as a selector.

Greetings!

@klodoma
Copy link
Contributor

klodoma commented Sep 24, 2021

Some suggestions:

  • make sure that the fonts are "pre-loaded", this is an issue that I've experienced over and over. By fixing this on the website, fixed also the backstop font issue capturing.
  • use --docker for consistent capturing, if you use capturing on different machines, then this is a must-do otherwise you really get different results, slight changes

With image loading I still have issues "sometimes" but this is mainly on localhost environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants