Reputation: 803
I want to add visual storyshots snapshots to our project. according to the docs, you can config it to run against static build of storybook (https://github.com/storybooks/storybook/tree/master/addons/storyshots#specifying-the-storybook-url).
I have the static build folder in the project (after running npm run build storybook), and I can see all the files there.
I tried setting the path relative to the Storyshots.test.js file, relative to package.json, or even relative to webpack.config.js. I get : "ERROR WHILE CONNECTING TO ./storybook-static/iframe.html?selectedKind=, did you start or build the storybook first ? A storybook instance should be running or a static version should be built when using image snapshot feature" (COMPONENT is replaced by the actual component).
any idea ?
Upvotes: 1
Views: 612
Reputation: 803
found the problem. the 'file' scheme should be included with absolute path, rather than relative.
used path.resolve(__dirname, '../storybook-static') instead
Upvotes: 3