-
Notifications
You must be signed in to change notification settings - Fork 16
PB-2027: fix drawing marker/text test #1512
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
base: fix-pb-2064-reportproblem-cypress
Are you sure you want to change the base?
PB-2027: fix drawing marker/text test #1512
Conversation
sommerfe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
icons were doubly scaled because the scale was applied on top of a smaller icon URL. Reverting back to what was the use-case before the TS migration, which is that icons are always requested in the same size to the backend, and are scaled on the map (could we get rid of the scaling on the backend?)
simplifying a bit the useFieldValidation composable, and trying to maintain reactivity of props given there, even if it is two components down (EmailInput calls TextInput which calls useFieldValidation)
removing most bi-directional links and having all the "config" in one big catch'em all bag
ed1b01c to
a898578
Compare
|
I've massively simplified the |
sommerfe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the validation for the email and textarea in the report problem dialog doesn't seem to work anymore
Some props need to be transformed to ref so that the composable doesn't loose the reactivity on them. Also changing the logic of the userFieldValidation "pristin" flag, to clarify what it was meant for (and removing its usage whenever the default behavior was the one in place)
watchEffect will be called whenever the composable is set up, and then each time one of the props is changed (so the onMounted hook will create a double unnecessary call)
sommerfe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed two things for the report problem inputs
- the validation markers are already there before submitting, this is a different behavior than what we have on prod
- when closing the report problem with the cross, the values are cleaned up but the validation for the form stays
You might want to retry after cleaning your cache, that was the behavior before my latest fixes but it shouldn't be the case (and behave like it used to before) |
Thanks for the hint, indeed the point 2 is not valid anymore. |

Fixing the code so that the first test of the
drawing.cy.tsfile passesBrings in a simplification of the useFieldValidation composable (less two-ways communication)
Test link