Unreliable font loading causes difference between test and reference
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 621
- PR merge metrics
- No merged PRs in 30d
Description
We are experiencing intermittent test failures due to font not loading for some scenarios.
Using BackstopJS 6.2.2, running in Docker with:
```
"dockerCommandTemplate": "docker run --rm -i --user $(id -u):$(id -g) --network sciety-test_default --mount type=bind,source=\"{cwd}\",target=/src backstopjs/backstopjs:{version} {backstopCommand} {args}",
```
Examples:



Researching previous issues lead us to code to wait for font loading:
https://github.com/garris/BackstopJS/issues/1298#issuecomment-936130845
https://github.com/garris/BackstopJS/issues/1303#issuecomment-828225823
but due to the age of these issues we don't know how to implement this in `onReady` with the Puppeteer API, can anyone advise?
Contributor guide
Research direction
Start with the reported Docker command and the onReady entry point, then review how the Puppeteer API is used when a scenario becomes ready. Reproduce the intermittent font-loading failure and verify that repeated visual captures wait for fonts consistently before comparison.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100