Skip to content
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

[OF#3443] Date validation #548

Merged
merged 2 commits into from
Sep 20, 2023
Merged

[OF#3443] Date validation #548

merged 2 commits into from
Sep 20, 2023

Conversation

SilviaAmAm
Copy link
Contributor

@SilviaAmAm SilviaAmAm commented Sep 11, 2023

Fixes open-formulieren/open-forms#3443

Depends on open-formulieren/open-forms#3479

I give up on the tests 😢

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Patch coverage: 37.03% and project coverage change: +0.30% 🎉

Comparison is base (e2000aa) 70.18% compared to head (01cf715) 70.48%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #548      +/-   ##
==========================================
+ Coverage   70.18%   70.48%   +0.30%     
==========================================
  Files         206      207       +1     
  Lines        4263     4290      +27     
  Branches     1154     1163       +9     
==========================================
+ Hits         2992     3024      +32     
+ Misses       1238     1236       -2     
+ Partials       33       30       -3     
Files Changed Coverage Δ
src/formio/validators/minMaxDateValidator.js 19.04% <19.04%> (ø)
src/formio/components/DateField.js 56.00% <100.00%> (+13.89%) ⬆️

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…his...

The jest test didnt go anywhere (the method that creates a form with a date component returns a promise that never resolves).
In storybook you can interact manually with a component with a minDate and see that it works. It's something.
@SilviaAmAm SilviaAmAm marked this pull request as ready for review September 13, 2023 15:53
src/formio/components/DateField.stories.js Show resolved Hide resolved
src/formio/components/DateField.stories.js Show resolved Hide resolved
src/formio/components/DateField.stories.js Show resolved Hide resolved
src/formio/components/DateField.stories.js Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can add some jest unit tests for the validator itself so we at least have coverage on them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, I will try!

@sergei-maertens sergei-maertens merged commit 95da438 into main Sep 20, 2023
11 of 16 checks passed
@sergei-maertens sergei-maertens deleted the fix/3443-date-validation branch September 20, 2023 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date component - no error for min/max date input.
2 participants