Enterprise-CMCS / eAPD

CMS (Centers for Medicare and Medicaid Services) eAPD - Modernizing the APD experience
https://eapd.cms.gov
Other
58 stars 25 forks source link

4366 - Date validation is inconsistent between inline and admin check(backend) #4641

Closed Sun-Mountain closed 1 year ago

Sun-Mountain commented 1 year ago

Resolves #4366

Description

Date validation is happening between the in-line and admin check is inconsistent. When the admin check is enabled the validation in the page appears to work as expected. The admin check panel:

Chromatic Link

https://www.chromatic.com/build?appId=61d5b948cf6f17003a12bf77&number=1335

Significant changes or possible side effects

Per discussion, valid years are 1960 thru 2151.

Automated test cases written

Given When Then Type (jest, tap, cypress)
Date field with start and end date admin check is on should catch if end date is before start date with appropriate validation error cypress
Date field admin check is one should catch an invalid year with appropriate validation error cypress

Steps to manually verify this change

  1. Login and view an APD. Turn on Admin Check
  2. Navigate to Activity Schedule
  3. Enter dates

This pull request is ready to code review when

This pull request is ready to test when

This pull request is ready to review when QA has

This pull request can be merged when

codecov[bot] commented 1 year ago

Codecov Report

Merging #4641 (f906e61) into main (e65af77) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4641      +/-   ##
==========================================
+ Coverage   94.37%   94.39%   +0.01%     
==========================================
  Files         281      281              
  Lines        8895     8898       +3     
  Branches     1798     1797       -1     
==========================================
+ Hits         8395     8399       +4     
+ Misses        476      475       -1     
  Partials       24       24              
Flag Coverage Δ
api ∅ <ø> (?)
common 99.33% <100.00%> (+<0.01%) :arrow_up:
web 94.12% <100.00%> (+0.01%) :arrow_up:
Impacted Files Coverage Δ
common/utils/constants.js 100.00% <100.00%> (ø)
web/src/components/DateField.js 100.00% <100.00%> (+3.22%) :arrow_up:
...apd/activities/schedule-and-milestones/Schedule.js 96.87% <100.00%> (+3.32%) :arrow_up:

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e65af77...f906e61. Read the comment docs.

cms-eapd-bot commented 1 year ago

This deploy was cleaned up.