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

4624 Navigating between activities using the nav menu doesn't update the Activity Name #4630

Merged
merged 8 commits into from Mar 28, 2023

Conversation

amyd11
Copy link
Contributor

@amyd11 amyd11 commented Mar 22, 2023

Resolves #4624

Description

This fix displays the correct activity name (on Activity Overview page) when navigating between activities. Before the fix, the previously viewed activity name was persisting in the text box under "Activity name".

Significant changes or possible side effects

  • Added a useEffect function to the NameForm component which listens for changes in the "name" value and updates the field in reach hooks form when there is a change (in this case when we navigate from one activity to another)

Automated test cases written

Given When Then Type (jest, tap, cypress)
At least two activities exist (which use the NameForm component) Navigating between the two activities The Activity name text box should display the correct Activity's name cypress

Steps to manually verify this change

  1. Navigate to an APD that has multiple activities (at least 2 for MMIS or at least 3 for HITECH)
  2. Navigate between the Activity Overview page of the two activities that have an Activity name textbox
  3. Ensure that the name inside the textbox correctly reflects the activity that is selected

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
  • Chromatic link added above
  • 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 is ready to test when

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

This pull request is ready to review when 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

@amyd11 amyd11 self-assigned this Mar 22, 2023
@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Merging #4630 (87414e0) into main (11ca459) will increase coverage by 8.69%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4630      +/-   ##
==========================================
+ Coverage   85.62%   94.32%   +8.69%     
==========================================
  Files         274      277       +3     
  Lines        8802     8811       +9     
  Branches     1773     1773              
==========================================
+ Hits         7537     8311     +774     
+ Misses       1158      476     -682     
+ Partials      107       24      -83     
Flag Coverage Δ
common 99.33% <ø> (ø)
web 94.05% <100.00%> (+9.16%) ⬆️
Impacted Files Coverage Δ
web/src/pages/apd/activities/overview/NameForm.js 100.00% <100.00%> (ø)

... and 103 files 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 11ca459...87414e0. Read the comment docs.

@amyd11 amyd11 added the bug needs triage, then squashing label Mar 22, 2023
@amyd11 amyd11 changed the title update name field when name changes 4624 Navigating between activities using the nav menu doesn't update the Activity Name Mar 22, 2023
@cms-eapd-bot
Copy link

cms-eapd-bot commented Mar 22, 2023

This deploy was cleaned up.

@amyd11 amyd11 marked this pull request as ready for review March 24, 2023 17:40
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.

Bug fixed! Well done with the cypress test too😄

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.

Looks good!

@amyd11 amyd11 merged commit d0503c7 into main Mar 28, 2023
11 checks passed
@amyd11 amyd11 deleted the ad/4624-nav-activity-name branch March 28, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage, then squashing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Navigating between activities using the nav menu doesn't update the Activity Name
5 participants