-
Notifications
You must be signed in to change notification settings - Fork 87
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
refactor: migrate checkbox validator to typescript #1225
Conversation
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.
Missing tests
Existing test coverage appears sufficient.
afd7d79
to
77c3959
Compare
3a79417
to
45664c6
Compare
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.
could you double check that the implementation of othersRadioButton
validation is correct?
also, we disallow saving of forms with duplicate checkbox field options on the frontend, and we invalidate responses with duplicates at the point of submission. should we add the corresponding model validation for checkbox fields as well?
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.
if I'm right about the implementation of othersRadioButton
, we definitely need test coverage on that edge case. it's scary that none of our many layers of tests caught it.
45664c6
to
0aa3529
Compare
@mantariksh comments addressed, for re-review |
tests/unit/backend/utils/field-validation/checkbox-validation.spec.ts
Outdated
Show resolved
Hide resolved
tests/unit/backend/utils/field-validation/checkbox-validation.spec.ts
Outdated
Show resolved
Hide resolved
b32cb7a
to
9c44655
Compare
c949d50
to
7b5b629
Compare
@mantariksh comments addressed, for re-review |
7b5b629
to
4d1f566
Compare
4d1f566
to
738a9a2
Compare
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.
approving first as the code looks good. great job on thinking about all the edge cases and covering them in the tests!
92727b1
to
2a1e4a6
Compare
Problem
Part of #7
Solution
Improvements
Tests
Unit test coverage