oxe-shots
v1.1.17
Published
CSS-Regression
Downloads
12
Readme
CSS Regression tests for frontend
The CSS regression covers pages by taking and comparing pictures, thus it checks if the elements are different of what they suppose to be for the end user in different browsers and resolutions.
Installing it
npm install --save puppeteer oxe-shots
Using it
// Import
const oxe = require("oxe-shots")
// Take pictures of all devices listed
const css = () => {
/**
Setup
- It will scroll down and wait 1 second for picture to load
- Threshold for the picture comparision
- Scroll if you have the need of loading all pictures of lazyloading
*/
oxe.setup({
"imgLoad": 4000,
"threshold": 0.04,
"autoscroll":false
})
// Take pictures for all devices
oxe.queueAll("https://www.google.com")
// Execute
oxe.executeQueue()
}
css()