Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not possible to input answers in stories #327

Open
LaChope opened this issue Apr 15, 2024 · 3 comments
Open

It is not possible to input answers in stories #327

LaChope opened this issue Apr 15, 2024 · 3 comments
Assignees

Comments

@LaChope
Copy link
Collaborator

LaChope commented Apr 15, 2024

In storybook, it is not possible to answer any question, except if the full form is attached. Individual components are not possible to test.

Hint: This is very likely due to the fact that each component does not have it's own state, but relies on FormQuestionsContext.jsx to provide the changes.

Image

@blcham
Copy link
Collaborator

blcham commented Apr 15, 2024

I can imagine solving it in 2 alternative ways:

  • having the possibility to mock the context needed for the questions
  • having prepared an empty form to which new question would be inserted for each story

@blcham
Copy link
Collaborator

blcham commented Apr 15, 2024

I am removing it from AVA project

@LaChope
Copy link
Collaborator Author

LaChope commented Apr 15, 2024

Another option is to refactor to give each component its own state before forwarding it to FormQuestionsContext (like it is done is QuestionComment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants