Storybook: Generate snapshot for all select options

Created on 10 Apr 2018  路  3Comments  路  Source: storybookjs/storybook

Hi everyone,

I was trying to find answer in docs and issues, but seems like there is now answer.
Is it possible to configurate different storyshot for each select option?

For example I have next

<Component
  propName={select('propName', ['A', 'B'], 'A')}
/>

And it will create snapshot for only default value 'A'

<Component propName="A" />

Is it possible to use all select values for snapshot generation to get all possible values?

<Component propName="A" />
<Component propName="B" />

Maybe there is any plans to implement this feature?

knobs storyshots inactive question / support

Most helpful comment

It's not possible with an out-of-the-box usage. The addons are agnostic to each other. You should probably add a story for each state of the select, or some other automation.

All 3 comments

It's not possible with an out-of-the-box usage. The addons are agnostic to each other. You should probably add a story for each state of the select, or some other automation.

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Would love to see this supported somehow

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wahengchang picture wahengchang  路  3Comments

MrOrz picture MrOrz  路  3Comments

xogeny picture xogeny  路  3Comments

tomitrescak picture tomitrescak  路  3Comments

purplecones picture purplecones  路  3Comments