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

Tbolt/3355 budget and ffp validation #4224

Merged
merged 46 commits into from
Sep 2, 2022
Merged

Conversation

tbolt
Copy link
Contributor

@tbolt tbolt commented Jul 21, 2022

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)
  • Pull request has been labeled, if applicable with feature, content, bug, tests, refactor
  • 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

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

@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2022

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%) ⬇️
...eb/src/pages/apd/activities/ffp/CostAllocateFFP.js 93.54% <100.00%> (-6.46%) ⬇️

Impacted file tree graph

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

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.

@tbolt tbolt added the feature PR label for release log label Jul 21, 2022
@cms-eapd-bot
Copy link

cms-eapd-bot commented Jul 21, 2022

This deploy was cleaned up.

Copy link
Contributor

@thetif thetif left a comment

Choose a reason for hiding this comment

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

just a couple of questions about skipped tests, but otherwise, looks good

@mirano-darren
Copy link
Contributor

mirano-darren commented Aug 17, 2022

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%.

@beparticular
Copy link

@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?

Copy link
Contributor

@jeromeleecms jeromeleecms left a comment

Choose a reason for hiding this comment

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

I'm not getting a validation error when I mess with the percentages...?

image

Copy link
Contributor

@jeromeleecms jeromeleecms left a comment

Choose a reason for hiding this comment

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

Seems to be working now that we are testing in parking lot.

@tbolt
Copy link
Contributor Author

tbolt commented Aug 24, 2022

@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.

@thetif thetif requested review from akuas and removed request for beparticular August 31, 2022 21:12
Copy link

@akuas akuas left a comment

Choose a reason for hiding this comment

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

Works as expected. Not an issue, just curious "State Staff and Expenses (In-House Costs) quarterly percentages must total 100%" and
"Private Contractor Costs quarterly percentages must total 100%" are the only two possible error messages for estimated quarterly expenditures, right?

@tbolt
Copy link
Contributor Author

tbolt commented Sep 1, 2022

@akuas Yep, that's right.

@akuas
Copy link

akuas commented Sep 1, 2022

@tbolt Okay, thanks.

@tbolt tbolt merged commit cf3acf8 into main Sep 2, 2022
@tbolt tbolt deleted the tbolt/3355-budget-and-ffp-validation branch September 2, 2022 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature PR label for release log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add inline validation for Budget and FFP
8 participants