- 
                Notifications
    
You must be signed in to change notification settings  - Fork 11
 
feat(input_schema): datepicker allowAbsolute/allowRelative properties and validation #477
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
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.
This package needs to be heavily unit tested and I see no tests here. Please do unit tests for your changes.
Update schema.json to not accept both sets to `false` Create unit tests
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.
👏 for tests, let's fix last bits and we are good to go.
| allowAbsolute: false, | ||
| }, | ||
| }, | ||
| })).toBe(false); | 
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 would rather test if the error message is correct as the logic is not trivial.
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.
Added check of error messages
| allowRelative: false, | ||
| }, | ||
| }, | ||
| })).toBe(false); | 
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.
Same here.
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.
only had a brief look
indentation Co-authored-by: Martin Adámek <[email protected]>
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.
Nice 👍
This PR introduce new input_schema properties
allowAbsoluteandallowRelativeused when theeditorproperty is set todatepicker:schema.jsonis updated in the way, that propertiesallowAbsoluteandallowRelativeare valid only wheneditorisdatepicker,allowAbsoluteis considered as default and any ofallowAbsoluteorallowRelativeis true