In order to prevent users closing the application before submitting their test result, we want to prevent them closing the page without a warning prompting them first.
Changes proposed in this pull request
Use the react-beforeunload library to hook into the beforeunload event and display a message.
Due to the limitations of browsers, it's not possible to customise this message as the behaviour is deprecated.
Make the user prompted for confirmation when attempting to close the app anywhere but the login page and the final step.
Guidance to review
Check out the branch
Runthrough the test flow, and attempt to close it at multiple points
Context
In order to prevent users closing the application before submitting their test result, we want to prevent them closing the page without a warning prompting them first.
Changes proposed in this pull request
react-beforeunload
library to hook into thebeforeunload
event and display a message.Guidance to review
Link to Jira task
https://bluesquirrel.atlassian.net/browse/LDAT-138