background
When a user attempts to navigate away from an unsaved form, they will lose anything in progress.
user story
Given that a user has selected anything in the form or added characters to a text field, when they attempt to navigate from the page, then a browser dialog should appear, and they should be able to continue (and lose their edits) or go back to the form to publish
requirements
When a user navigates away from a page, a dialog should appear
- by pressing "continue" their edits are discarded
- by pressing "go back" they should see the form
Derived Requirement
Ensure a browser dialog appears when a user attempts to navigate away from a page with unsaved changes, allowing them to continue navigating or return to the form.
BDD
Feature: Unsaved Changes Warning
Scenario: Alert user when navigating away with unsaved changes
Given the user has unsaved changes on a form When the user attempts to navigate away from the page Then a browser dialog should appear allowing them to continue navigating or return to the form
Test Steps
Test Case 1: Alert User When Navigating Away with Unsaved Changes
Open https://wishlist-test.toolforge.org/wiki/Community_Wishlist/Intake and navigate to a page with a form.
Enter data into the form fields.
Attempt to navigate away from the page.
✅❓❌⬜ AC1: Confirm that a browser dialog appears, allowing the user to continue navigating or return to the form.
QA Results - Wishlist-test.toolforge
AC | Status | Details |
---|---|---|
1 | ✅ | T365161#9949953 |