
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A navigation and CSS regression utility based on headless Chrome.
npm i storysnap
You can also install it globally using '-g' flag and access it as simply storysnap
.
Storysnap provides a CLI and a programatic way of using it's functionality.
./node_modules/.bin/storysnap --script [navigationScript.js] --test --screenshotDir ./screenshots --reporters xunit,progress --threshold 0.1
The arguments are as follows:
storysnap
.xunit
and progress
reporters are provided out of the box. Default to progress
.Check out the 'examples/' folder for a couple of examples:
storybook-scrapper
- Is an example of how you can implement a simple scrapper that connects to React Storybook and does screenshots of all the components it can find. You can run it like so: ./node_modules/.bin/storysnap --script ./node_modules/storysnap/examples/storybook-scrapper.js --test --storybookUrl http://localhost:9009 --screenshotDir ./screenshots --reporters xunit,progress
. Make sure React storybook is running before trying to take any screenshots!programatic-usage
- A barebones programatic usage example that opens up Google, does a screenshot, types a text and then does another screenshot.All APIs are promise based.
The API is comprised of:
--test
is ON ){
ProgressReporter,
XUnitReporter
}
A reporter has a single public method report(comparisonResults, opts)
where comparisonResults
are being
generated by ImageManager and opts
are all the command line args the user passed when invoking storysnap
.
module.exports = (api, options) => Promise
eg,
module.exports = (api, options) => {
const { NavAPI, ImageManager, Reporters } = api;
if(options.test) {
// ... do something when in test mode.
// Access also custom args, like options.storybookUrl etc
}
}
FAQs
A navigation and CSS regression utility based on headless Chrome.
The npm package storysnap receives a total of 3 weekly downloads. As such, storysnap popularity was classified as not popular.
We found that storysnap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.