limiting viewports on a per scenario basis in config file
See original GitHub issueWhen creating backstop tests with many scenarios and multiple viewports, the number of reference images gets quite big. In certain cases not all scenarios need to be tested with all viewport sizes. It is often sufficient to only test certain components with a subset of all defined viewports (since they are not responsive and do not change in between the viewports). For other examples which all viewports can be tested.
Would it be possible to add an option field (e.g. limitViewports
) to the backstop.json file allowing to limit the viewports on a per scenario basis?
"viewports": [
{
"name": "x-small",
"width": 380,
"height": 600
}, {
"name": "small",
"width": 640,
"height": 800
}, {
"name": "medium",
"width": 1300,
"height": 1200
}, {
"name": "large",
"width": 1900,
"height": 2000
}
]
...
"scenarios": [
{
"label": "Icons",
"url": "http://localhost:5001/docs/backstopjs/icons",
"selectors": [
".icon-example"
],
"readyEvent": "backstop_ready",
"misMatchThreshold" : 0.1,
„limitViewports": ["small“]
}
This would allow for a more fine-grained control of which backstop reference images are created per scenario. What do you think?
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Configuration | Playwright - CukeTest
Playwright Test provides options to configure the default browser, context and page fixtures. For example there are options for headless, viewport and ...
Read more >Viewport meta tag - HTML: HyperText Markup Language | MDN
This article describes how to use the "viewport" tag to control the viewport's size and shape.
Read more >Playwright config | Katarzyna Kmiotek
projects. General config. Test Config properties in this section: timeout - max time limit for each test (for me it serves the purpose ......
Read more >Preferences - MODO 801 Inline Help System - Foundry
Users may modify these settings independently for each scene in the Scene item ... Rotation order can also be adjusted on a per...
Read more >limits.conf - Splunk Documentation
Each .conf file should have at most one default stanza. ... You can override this setting on a per-search basis by appending '|noop ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DaPo BackstopJS allows you to specify viewports at the scenario level. See the docs… https://github.com/garris/BackstopJS#working-with-your-config-file
@garris wow, thank you for your answer. Sorry, I didn’t catch this. That’s perfect for me. Thank you again.
And thank you for this awesome testing tool. You made it very easy to use. ✌️