Enterprise-CMCS / eAPD

CMS (Centers for Medicare and Medicaid Services) eAPD - Modernizing the APD experience
https://eapd.cms.gov
Other
58 stars 25 forks source link

[Feature] Track navigating away from the APD within the app #4655

Open thetif opened 1 year ago

thetif commented 1 year ago

Description and related issues

Implement way to catch a user navigating away from an APD but still inside the application. Navigating to /print will NOT be considered navigating away from an APD. It should capture the id of the APD the user is leaving.

You can model this off of LATEST_ACTIVITY and setLatestActivity. There is a listener on the Root.js file and something similar could probably be used for this.

Acceptance criteria

Testing criteria

Given When Then Covered
a user inside a locked APD the user navigates to the APD List-State Dashboard / call the leave APD action
a user inside a locked APD the user navigates to adding an APD /apd/new call the leave APD action
a user inside a locked APD the user navigates to /apd/:apdId where apdId is different than the locked APD call the leave APD action
a user inside a locked APD the user navigates to a /print/:apdId where apdId is different than the locked APD call the leave APD action
a user inside a locked APD the user navigates to any of the login pages /login/* call the leave APD action
a user inside a locked APD the user navigates to the State Admin panel /state-admin call the leave APD action
a user inside a locked APD the user navigates to the Manage Account page /manage-account call the leave APD action
a user inside a locked APD the user navigates to the Switch State Affiliation page /select-affiliation call the leave APD action
a user inside a locked APD the user navigates to the State Admin Certification page /delegate-state-admin call the leave APD action
a user inside a locked APD the user navigates to any page within the same APD /apd/:apdId standard APD actions, lock is still maintained on APD
a user inside a locked APD the user navigates to the print page for the same APD /print/:apdId the standard print action occurs, lock is still maintained on APD
mirano-darren commented 1 year ago

What happens if the user has the APD open in one tab, then opens another tab and navigates to a page not related to the locked APD?

stephanieboydcms commented 1 year ago

Looks good to me!