Improve the error message following content review.

'Session expired' or similar makes it sound like a new error.
It could confuse the user and make them think the sign in didn't work
and that their session has expired again.

So we went with:
The change you made was not saved. Please try again.
This commit is contained in:
Pea Tyczynska
2020-05-22 15:36:08 +01:00
parent 8f8c250124
commit f997cc2801
2 changed files with 2 additions and 2 deletions

View File

@@ -113,7 +113,7 @@ def service_name_change(service_id):
@user_has_permissions('manage_service')
def service_name_change_confirm(service_id):
if 'service_name_change' not in session:
flash("Session expired. Try again", 'error')
flash("The change you made was not saved. Please try again.", 'error')
return redirect(url_for('main.service_name_change', service_id=service_id))
# Validate password for form

View File

@@ -717,7 +717,7 @@ def test_service_name_change_confirm_handles_expired_session(
mock_verify_password.assert_not_called()
mock_update_service.assert_not_called()
assert page.find('div', 'banner-dangerous').text.strip() == "Session expired. Try again"
assert page.find('div', 'banner-dangerous').text.strip() == "The change you made was not saved. Please try again."
@pytest.mark.parametrize('volumes, consent_to_research, expected_estimated_volumes_item', [