kbss-cvut / s-forms

SForms - Semantic form generator and processor. For ontology-based smart forms.
GNU Lesser General Public License v3.0
4 stars 7 forks source link

It is not possible to input answers in stories #327

Open LaChope opened 5 months ago

LaChope commented 5 months ago

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 commented 5 months ago

I can imagine solving it in 2 alternative ways:

blcham commented 5 months ago

I am removing it from AVA project

LaChope commented 5 months ago

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