@histoire/plugin-screenshot
v0.17.17
Published
Histoire plugin to take screenshots for visual regression testing
Downloads
1,830
Readme
Histoire Screenshot visual regression testing
pnpm add -D @histoire/plugin-screenshot
Add the plugin in histoire config:
import { defineConfig } from 'histoire'
import { HstScreenshot } from '@histoire/plugin-screenshot'
export default defineConfig({
plugins: [
HstScreenshot({
// Options here
}),
],
})
Setting Up Chrome Linux Sandbox
If you get an error like No usable sandbox! or Running as root without --no-sandbox is not supported, you need to properly set up sandboxing on your Linux instance. Alternatively, if you completely trust the content, you can disable sandboxing (strongly discouraged):
ref. https://github.com/sindresorhus/capture-website#faq
import { defineConfig } from 'histoire'
import { HstScreenshot } from '@histoire/plugin-screenshot'
export default defineConfig({
plugins: [
HstScreenshot({
launchOptionsArgs: ['--no-sandbox', '--disable-setuid-sandbox'],
}),
],
})