department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 201 forks source link

[FE] - [Discovery] Refreshing on the Review page adds the Household Financial section back into the form #85622

Closed allanto-ah closed 2 months ago

allanto-ah commented 3 months ago

Test info: Environment: Staging Test user: vets.gov.user+11@gmail.com

Summary: If a user refreshes the browser page when they are on the Review page, the Household financial section appears and the user is brought to the page.

Steps to reproduce:

  1. Login to user that can fill the EZR
  2. Fill out the EZR form until you reach the Review page
  3. Refresh the page
  4. Notice that the user is brought to the Household financial section when they weren't required to fill it out. See attached video for reference.

Expected behavior: The Household financial section should not re-appear and user should not be brought tot he Household financial section

AC:

Private Zenhub Video

mkerns1 commented 3 months ago

Time Box this story to a 3. If no resolution is sight then the ticket becomes a 5.

dellerbie commented 3 months ago

After debugging and trying different patches to fix this issue, I was able to connect with Matt Long about the general issue of reloading a form page and it's undesirable outcomes.

It appears that this a known limitation of the form library: reloading the page causes various issues with the Redux state, API calls don't happen, feature toggles don't load, etc.

I was able to remove the logic that is causing the EZR form to default to showing the financial info page if we can't connect to the enrollment status API. It should default to not showing this page in this case and that will be fixed in this PR.

For now, there's not much we can do about the reload bugs since this is a general form library limitation.

allanto-ah commented 2 months ago

Environment: Staging

Verified the fix that was implemented. As mentioned above, there isn't much we can do as it is a limitation on the forms library.