Configuration:
- Storybook version: 8
- Stencil.js
- Loki version: 0.35.1
I have a storybook with a lot of stories, and I want to run visual regression tests with Loki to test with only one story. It run in the following local address:
http://localhost:6006/?path=/story/project-base-mybutton--default
I have this configuration in my loki.config.js
:
module.exports = {
captureAllStories: false,
storybookUrl: 'http://localhost:6006',
configurations: {
'chrome.desktop': {
target: 'chrome.app',
width: 1200,
height: 800,
storyFilter: (story) => {
// I already tried this:
return story.id === 'project-base-mybutton--default';
// And this:
return story.kind === 'Project/Base/MyButton';
// And this:
return story.kind.toLowerCase() === 'charter/base/mybutton' && story.name.toLowerCase() === 'default';
},
},
},
// Also tried this:
customStories: {
'individual-story': {
url: 'http://localhost:6006/?path=/story/project-base-mybutton--default'
}
},
// Running: npx loki update --storiesFilter "individual-story"
// And this:
stories: {
'individual-story': {
storyUrl: 'http://localhost:6006/?path=/story/project-base-mybutton--default'
}
},
// And this:
storiesFilter: 'project-base-mybutton--default',
// And this:
scenarios: [
{
label: 'individual-story',
url: 'http://localhost:6006/?path=/story/project-base-mybutton--default',
},
],
verboseRenderer: true,
reportOnFailure: true,
};
The code runs, but it screenshoots all of the stories. I want to take a screenshot only of the story project-base-mybutton--default
. Does anyone know how to configure this?
Also, is there anyway I can place the loki configuration file in any other directory that is not in the root of the project? How would the command look like?