From 5f40eabdf3e296714d2b0696e1e262b8067ebeb4 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 20 Nov 2017 16:45:59 +0000 Subject: [PATCH] Improve page titles later on in the one off flow Now that the page title for picking a sender/reply to has been improved, I think these pages are also less clear than they could be. This commit changes the page titles to (I hope) be clearer about what is needed from the user on these pages. --- app/main/views/send.py | 12 +++++++++--- tests/app/main/views/test_send.py | 8 ++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/main/views/send.py b/app/main/views/send.py index 31fec2cd7..6e8b81f44 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -421,7 +421,11 @@ def send_test_step(service_id, template_id, step_index): skip_link = None return render_template( 'views/send-test.html', - page_title=get_send_test_page_title(template.template_type, get_help_argument()), + page_title=get_send_test_page_title( + template.template_type, + get_help_argument(), + entering_recipient=not session['recipient'] + ), template=template, form=form, skip_link=skip_link, @@ -711,12 +715,14 @@ def all_placeholders_in_session(placeholders): ) -def get_send_test_page_title(template_type, help_argument): +def get_send_test_page_title(template_type, help_argument, entering_recipient): if help_argument: return 'Example text message' if template_type == 'letter': return 'Print a test letter' - return 'Send to one recipient' + if entering_recipient: + return 'Who should this message be sent to?' + return 'Personalise this message' def get_back_link(service_id, template_id, step_index): diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index 38fe48f3e..f3618f384 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -575,13 +575,13 @@ def test_send_one_off_does_not_send_without_the_correct_permissions( ( mock_get_service_template_with_placeholders, partial(url_for, 'main.send_test'), - 'Send to one recipient', + 'Personalise this message', False, ), ( mock_get_service_template_with_placeholders, partial(url_for, 'main.send_one_off'), - 'Send to one recipient', + 'Who should this message be sent to?', False, ), ( @@ -599,13 +599,13 @@ def test_send_one_off_does_not_send_without_the_correct_permissions( ( mock_get_service_email_template, partial(url_for, 'main.send_test'), - 'Send to one recipient', + 'Personalise this message', False, ), ( mock_get_service_email_template, partial(url_for, 'main.send_one_off'), - 'Send to one recipient', + 'Who should this message be sent to?', False, ), (