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

updated assurance and compliance for mmis #4519

Merged
merged 16 commits into from
Feb 23, 2023

Conversation

thetif
Copy link
Contributor

@thetif thetif commented Feb 3, 2023

Resolves #4473

Description

Updated the Assurance and Compliance components to handle MMIS data. Removed some old code that creates citations on the front end if they don't already exist in the APD. This isn't needed any more because all of the APDs in staging and prod have assurance and compliance. They get added when you create and new APD. And it would be extra complicated to update it to handle the new types. Also created storybook stories.

Automated test cases written

Given When Then Type (jest, tap, cypress)
a MMIS APD the Assurances and Compliance page is loaded it renders correctly jest
a MMIS APD the Assurances and Compliance Read Only page is loaded it renders correctly jest
a user on the Assurances and Compliance page the user sets an IV&V compliance an action is dispatched to update the APD jest
a user on the Assurances and Compliance page the user sets an IV&V justification an action is dispatched to update the APD jest

Steps to manually verify this change

  1. open a MMIS APD
  2. navigate to the Assurances and Compliance page
  3. verify that the citation match the ones from the ticket
  4. verify that all of the citations have a url
  5. verify that the urls are valid
  6. select Yes
  7. select No and a text box should open
  8. enter text in the text box
  9. select Yes and the text box should disappear
  10. select No on a citation and don't enter any text in the text box
  11. leave a citation empty
  12. turn on Admin Check
  13. verify that you see an error message under the empty text box
  14. verify that you see an error message under the empty citation
  15. verify that you see the errors in the Admin Check panel
  16. verify that entering text and making a selection make the error message go away
  17. verify that the error messages went away in the Admin Check panel
  18. open a HITECH APD
  19. navigate to the Assurances and Compliance page
  20. verify that the citations are different than they were for the MMIS APD

This pull request is ready to code review when

  • Automated tests are updated (and all tests are passing)
  • New automated test cases are documented above
  • Pull request has been labeled, if applicable with feature, content, bug,
    tests, refactor

This pull request is ready to test when

  • Code has been reviewed by someone other than the original author

This pull request is ready to review when the QA has

  • Verified the functionality related to the change
  • Verified that the change works with Narrator on Windows
  • Verified that the change works with VoiceOver on Mac
  • Verified all updated pages with the WAVE tool
  • Verified tab and keyboard navigation functionality

This pull request can be merged when

  • Design has approved the experience
  • Product has approved the experience

@thetif thetif added the feature PR label for release log label Feb 3, 2023
@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Merging #4519 (df27250) into main (9361e56) will decrease coverage by 0.39%.
The diff coverage is 69.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4519      +/-   ##
==========================================
- Coverage   94.33%   93.94%   -0.39%     
==========================================
  Files         253      252       -1     
  Lines        7886     7977      +91     
  Branches     1686     1705      +19     
==========================================
+ Hits         7439     7494      +55     
- Misses        428      461      +33     
- Partials       19       22       +3     
Impacted Files Coverage Δ
.../cypress/helpers/mmis/activity/default-activity.js 97.18% <ø> (-0.08%) ⬇️
...es/apd/activities/activities-dashboard/Activity.js 97.05% <ø> (ø)
web/src/redux/actions/app/apd.js 98.98% <ø> (-0.02%) ⬇️
web/src/redux/reducers/apd.js 97.41% <ø> (-0.07%) ⬇️
...e/cypress/helpers/apd/assurances-and-compliance.js 78.01% <63.95%> (-21.99%) ⬇️
...surances-and-compliance/AssurancesAndCompliance.js 87.67% <66.66%> (-5.67%) ⬇️
...cypress/page-objects/assurances-compliance-page.js 90.32% <100.00%> (+3.36%) ⬆️
...-and-compliance/AssurancesAndComplianceReadOnly.js 100.00% <100.00%> (ø)
...c/redux/actions/editApd/assurancesAndCompliance.js 100.00% <100.00%> (ø)
web/src/redux/selectors/apd.selectors.js 100.00% <100.00%> (ø)

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 9361e56...df27250. Read the comment docs.

@cms-eapd-bot
Copy link

cms-eapd-bot commented Feb 3, 2023

See this pull request in action: https://ec2-3-210-243-7.compute-1.amazonaws.com

df27250

Copy link
Contributor

@amyd11 amyd11 left a comment

Choose a reason for hiding this comment

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

Everything works as expected after creating a new MMIS APD!

At first I checked the one created with seed data and either we need to update the seed data or there was just some old data in the database in this environment. It looked like 45 CFR Part 92.36 was on the list instead of the desired "45 CFR Part 75.326". Also, some of the citations are just text and not links:

  • 45 CFR Part 92.36
  • 42 CFR Part 433.112(b)(5)-(9)
  • 45 CFR Part 95.617

I just had the one question about the switch statement, but everything else looks great!

@@ -98,6 +119,8 @@ const AssurancesAndCompliance = ({
return complyingWithSecurity(index, newValue);
case 'softwareRights':
return complyingWithSoftwareRights(index, newValue);
case 'independentVV':
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this case is identical to the one on line 139. Are they supposed to be the same? If so I wonder if you can combine 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.

they are updating the apd when the user selects yes and no and when the user adds a justification, so I don't think they can be combined easily

@thetif
Copy link
Contributor Author

thetif commented Feb 15, 2023

@amyd11 great catch on the regulations, I went back and I think I got them all cleaned up.

@thetif thetif requested a review from amyd11 February 15, 2023 17:00
Copy link
Contributor

@amyd11 amyd11 left a comment

Choose a reason for hiding this comment

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

Thanks for updating the seed files! Looks good ✅

@mirano-darren mirano-darren self-assigned this Feb 16, 2023
@mirano-darren
Copy link
Contributor

Looks good! 2 small changes that don't match with the Figma:

This should be 42, not 45. Link is still correct
image

Compliance and progress reports should be lowercase
image

@mirano-darren
Copy link
Contributor

Looks good to me pending the 2 changes requested above!

Given When Then Result
A MMIS APD On the Assurances and Compliance page Should have the following assurances listed in order:
Procurement Standards (Competition / Sole Source)
- SMM, Part 11
- 45 CFR Part 95.615
- 45 CFR Part 92.36
Access to Records, Reporting and Agency Attestations
- 42 CFR Part 433.112(b)(5) - (9)
- 45 CFR Part 95.615
- SMM Section 11267
Software & Ownership Rights...
- 45 CFR Part 95.617
- 42 CFR Part 431.300
- 45 CFR Part 164
Independent Verification and Validation (IV&V)
- 45 CFR Part 95.626
🟨 See above comment
A HITECH APD On the Assurances and Compliance page Nothing should change. Fields should be the same as before
A HITECH or MMIS APD On the Assurances and Compliance page, answering "No" to any assurance explanation text box opens
A HITECH or MMIS APD On the Assurances and Compliance page, Admin Check is on Should have a validation message if:
- User does not select yes or no. Validation message should be "Select yes or no"
- User answers "No" but explanation text is empty. Validation message should be "Provide an explanation"
A HITECH or MMIS APD On the Assurances and Compliance page, Admin check is NOT on Validation messages should not appear
A HITECH or MMIS APD On the Assurances and Compliance page All Hyperlinks to assurances should take the user to the correct assurance page
A MMIS APD On the Assurances and Compliance page, all filled out Read only view should display correct values 🟨 Export view still crashes

@thetif
Copy link
Contributor Author

thetif commented Feb 21, 2023

@mirano-darren I doubled checked the list that Jerome sent me and I think the typo is in the design. The capitalization thing didn't change in this ticket. If you check staging the casing is the same, and it matches with the casing style of the other sections. If you want to see the read-only view, you can look at the storybook.

Procurement Standards (Competition / Sole Source)

Access to Records, Reporting, and Agency Attestations

Software & Ownership

IV&V

Copy link
Contributor

@mirano-darren mirano-darren left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link

@SGilliamA1M SGilliamA1M left a comment

Choose a reason for hiding this comment

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

Citations have been updated successfully for MMIS. Great job!

Copy link

@stephanieboydcms stephanieboydcms left a comment

Choose a reason for hiding this comment

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

Thank you for the review request. Good to move forward @thetif

@thetif thetif merged commit c46e074 into main Feb 23, 2023
@thetif thetif deleted the tforkner/4473-assurances-and-compliance branch February 23, 2023 17:56
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.

[Feature] Update Assurances and Compliance to work with MMIS
7 participants