eAPD icon indicating copy to clipboard operation
eAPD copied to clipboard

Tbolt/3355 budget and ffp validation

Open tbolt opened this issue 2 years ago • 5 comments

Resolves #3355

Description

Adds validation to the Federal-State Split and Estimated Quarterly Expenditure sections of the Budget & FFP page

Significant changes or possible side effects

Automated test cases written

Steps to manually verify this change

  1. Login and view an APD
  2. Verify that Federal-State Split shows an error when an option is not selected
  3. Verify that the Estimated Quarterly Expenditure table rows must equal 100% or an error is shown Note: for testing we have the admin check turned on by default with no way to turn it off. So the testing should be done with that in mind.

This pull request is ready to review when

  • [ ] Automated tests are updated (and all tests are passing)
  • [x] Pull request has been labeled, if applicable with feature, content, bug, tests, refactor
  • [x] Associated OpenAPI documentation has been updated
  • [ ] The experience passes a basic manual accessibility audit (keyboard nav, screenreader, text scaling) OR an exemption is documented

This pull request can be merged when

  • [x] Code has been reviewed by someone other than the original author
  • [x] QA has verified the accessibility and functionality related to the change
  • [ ] Design has approved the experience
  • [ ] Product has approved the experience

tbolt avatar Jul 21 '22 19:07 tbolt

Codecov Report

Merging #4224 (1758344) into main (fb20bcf) will decrease coverage by 0.09%. The diff coverage is 95.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4224      +/-   ##
==========================================
- Coverage   86.08%   85.98%   -0.10%     
==========================================
  Files         260      260              
  Lines        5951     5980      +29     
  Branches     1251     1264      +13     
==========================================
+ Hits         5123     5142      +19     
- Misses        765      775      +10     
  Partials       63       63              
Impacted Files Coverage Δ
...costs/ContractorResource/ContractorResourceForm.js 87.14% <ø> (ø)
...vities/cost-allocation/CostAllocateFFPQuarterly.js 89.28% <94.59%> (-10.72%) :arrow_down:
...eb/src/pages/apd/activities/ffp/CostAllocateFFP.js 93.54% <100.00%> (-6.46%) :arrow_down:

Impacted file tree graph

Impacted Files Coverage Δ
...costs/ContractorResource/ContractorResourceForm.js 87.14% <ø> (ø)
...vities/cost-allocation/CostAllocateFFPQuarterly.js 89.28% <94.59%> (-10.72%) :arrow_down:
...eb/src/pages/apd/activities/ffp/CostAllocateFFP.js 93.54% <100.00%> (-6.46%) :arrow_down:

Continue to review full report at Codecov.

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

codecov-commenter avatar Jul 21 '22 19:07 codecov-commenter

This deploy was cleaned up.

cms-eapd-bot avatar Jul 21 '22 20:07 cms-eapd-bot

Well done! LGTM, though I came across some screen-reader bug(?) that either @beparticular or @jeromeleecms can confirm?

Given When Then Result
FFP field on Budget and FFP page Admin check is on Choose the "Select an option" in the list and blur the field. Field shows the validation error PASS ✔️
Estimated Quarterly Expenditure Table on Budget and FFP page Admin check is on If percentages doesn't total 100, an error message appears PASS ✅

Screen-reader issue: When using a screen reader and filling out the Estimated Quarterly Expenditure Table, If you fill it out to where it equals 100% and is valid, the screen reader still reads out the error message, saying that it's over 100%.

mirano-darren avatar Aug 17 '22 20:08 mirano-darren

@beparticular I'm not getting any error for the Estimated Quarterly Expenditure Table. What is the trigger for this - for instance as soon as the total is calculated, after the table is exited, etc?

beparticular avatar Aug 19 '22 17:08 beparticular

@beparticular try it again it may have been broken. It should happen as soon as the tables have invalid values (ie. subtotal doesn't equal 100%). Currently to test we have the admin check set to "on," so it should work as if the admin check was enabled.

tbolt avatar Aug 24 '22 19:08 tbolt

@akuas Yep, that's right.

tbolt avatar Sep 01 '22 13:09 tbolt

@tbolt Okay, thanks.

akuas avatar Sep 01 '22 14:09 akuas