i-VRESSE / workflow-builder

Graphical interface to build a workflow file
https://i-vresse-workflow-builder.netlify.app/
Apache License 2.0
3 stars 2 forks source link

Adding/removing molecules corrupts molecule aware parameters #78

Open sverhoeven opened 2 years ago

sverhoeven commented 2 years ago

A molecule aware parameter has its schema adjusted so it has the same length as the number of uploaded molecules. However if you have filled the parameter and remove or add a molecule the data of the molecule aware paramter can become invalid and the user is unable to resolve the validation errors.

Spawned from PR review:

* If I start with one molecule, add flexref settings, then go back and add another molecule, there is no extra array item for seg/fle so I cannot modify settings for the second molecule.
* If I remove a molecule, and try to modify flexref for the remaining one, I get .flexibility.seg should NOT have more than 1 items, but I cannot remove old items because the second table is no longer rendered.

Integration tests in https://github.com/i-VRESSE/workflow-builder/blob/8587a879a18d47a5a68374206be4bc80ca7d5d2f/integration-tests/molecules.spec.ts exercise the problems found in the PR review. The commented out assertions should be enabled to get failing tests.