-
Notifications
You must be signed in to change notification settings - Fork 22
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
Test results latest build #1174
Comments
Added a test with advanced, composed logic which should pass validation.
Component-level validation should not be performed on advanced/complex logic trigger expressions. Validating for valid jsonLogic expressions is sufficient in those cases.
Added a test with advanced, composed logic which should pass validation.
Component-level validation should not be performed on advanced/complex logic trigger expressions. Validating for valid jsonLogic expressions is sufficient in those cases.
Component-level validation should not be performed on advanced/complex logic trigger expressions. Validating for valid jsonLogic expressions is sufficient in those cases.
Component-level validation should not be performed on advanced/complex logic trigger expressions. Validating for valid jsonLogic expressions is sufficient in those cases.
… immutability There were more places were refs were updated with data that possibly contained immutable datastructures (because they come from the immer reducer state). These have now been wrapped with cloneDeep to make them immutable as well, so that Formio can apply the mutations. This typically happens when you have two fields for example: a regular text field, and a multiple=true text field. If you edit the regular text field, some immutable data ends up in the state, preventing you from adding extra items to the multiple=true text field. Additionally, the onFormIOChange event handler has been adapted, as it did not update the internal view on the data after adding an item to a multiple=true text field. This is caused by the modifiedByHuman flag being 'undefined' and the flags containing 'undefined' as values as well, making it unreliable. Instead, we now compare if the new view on the data is different from the old view before we effectively detect a change in data. Finally, some bugs are likely fixed causing the Formio spinner to spin indefinitely, or the submit button being blocked. We now dispatch an action when the logic check is aborted or not even performed due to Formio-level validation errors. An extra side-effect is that invalid client side forms are now blocked from submission (client-side).
…tiple submissions to start ... and leading to infinite reload loops. Now the actual submission create call is only invoked once, with all the associated state updates.
…tiple submissions to start ... and leading to infinite reload loops. Now the actual submission create call is only invoked once, with all the associated state updates.
The root cause of this is the refactor in the getFormComponents utility in 9e53f2a, which constructs a new component object to add the stepLabel key. Directly modifying the component in that call is not possible because of immutability reasons. In turn, this caused the form appointments configuration tab to break, since that implicitly relied on the mutability of the Formio components to set appointment-related properties. This is now fixed in the reducer by mutating only draft state through a new utility called findComponent.
The issue where earlier selected data for appointments is not visible when changing the appointment is because of a dirty hack we did/do. Instead of sending just the PK of the selected product/location, we send a rich object to get the label for display to. However, this bites us in the buttocks when editing it, as Formio cannot map this to an option. Data for a fresh form with initial appointment product/location selection: {
"product": 37,
"locatie": "",
"afspraakDatum": "",
"afspraakTijdstip": ""
} Data for an existing appointment: {
"product": {
"name": "Belastingen algemeen",
"identifier": "37"
},
"locatie": {
"name": "Gemeente Horst aan de Maas",
"identifier": "1"
},
"afspraakDatum": "2022-01-24",
"afspraakTijdstip": "2022-01-24T11:30:00+01:00"
} |
Missed some test cases where invalid logic triggers indeed result in validation errors.
…ntment data We can deconstruct the backend data back into something that the select understands, based on the passed in options. Additionally, when changing an appointment, the original time is no longer available and the smallest atomic thing that can change for the appointment, so we clear that value to not display ISO-8601 select options that are auto-created by Formio because it's not present in the available options list. All of this is a nasty hack on top of a nasty hack. We really have to revisit how the appointments stuff works.
…sation [#1174] Fixed number and currency localisation in get_printable_data()
[open-formulieren/open-forms#1174] Fixed localisation of number and currency components
… immutability There were more places were refs were updated with data that possibly contained immutable datastructures (because they come from the immer reducer state). These have now been wrapped with cloneDeep to make them immutable as well, so that Formio can apply the mutations. This typically happens when you have two fields for example: a regular text field, and a multiple=true text field. If you edit the regular text field, some immutable data ends up in the state, preventing you from adding extra items to the multiple=true text field. Additionally, the onFormIOChange event handler has been adapted, as it did not update the internal view on the data after adding an item to a multiple=true text field. This is caused by the modifiedByHuman flag being 'undefined' and the flags containing 'undefined' as values as well, making it unreliable. Instead, we now compare if the new view on the data is different from the old view before we effectively detect a change in data. Finally, some bugs are likely fixed causing the Formio spinner to spin indefinitely, or the submit button being blocked. We now dispatch an action when the logic check is aborted or not even performed due to Formio-level validation errors. An extra side-effect is that invalid client side forms are now blocked from submission (client-side).
…tiple submissions to start ... and leading to infinite reload loops. Now the actual submission create call is only invoked once, with all the associated state updates.
…ntment data We can deconstruct the backend data back into something that the select understands, based on the passed in options. Additionally, when changing an appointment, the original time is no longer available and the smallest atomic thing that can change for the appointment, so we clear that value to not display ISO-8601 select options that are auto-created by Formio because it's not present in the available options list. All of this is a nasty hack on top of a nasty hack. We really have to revisit how the appointments stuff works.
Tested against version 5a8a30a.
demo-sprint-11-testing
on the Maykin test envForm designer
and
and combined logic rules impossible to use. Caused by refactor with pricing/form logic & added validators. (fixed in a78d6b9)Filling out the form
+ add another
button click triggers this (likely fixed by [#887] Fixed immutable state data leaking into formio and erroring when mutated open-forms-sdk#136) fix: More fixes w/r to Formio data immutability open-forms-sdk#142true
behaved a bit weird, but may be because of invalid logic configuration. To double check.raw_id_field
widget @Bartvaderkin or @joeribekkerconsole.log
that was left inFormStep.js
that shouldn't beBUG: changing an appointment that was already paid still makes you pay againcould not reproduce on re-test.
) instead comma (,
) decimal separator. Also same problem in the PDF confirmation @Bartvaderkin (fixed in [#1174] Fixed number and currency localisation in get_printable_data() #1185 and [open-formulieren/open-forms#1174] Fixed localisation of number and currency components open-forms-sdk#145)The text was updated successfully, but these errors were encountered: