From f02ec309793f0868a947c393ec4eed977b3372d1 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 13 Dec 2017 10:35:37 +0000 Subject: [PATCH] Make table labels match titles of callback pages This makes it consistent from page to page, and match the wording that Thom came up with. --- app/templates/views/api/callbacks.html | 4 ++-- .../views/api/callbacks/delivery-status-callback.html | 4 ++-- .../api/callbacks/received-text-messages-callback.html | 4 ++-- tests/app/main/views/test_api_keys.py | 8 +++++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/templates/views/api/callbacks.html b/app/templates/views/api/callbacks.html index 814bc50c4..6d502f67f 100644 --- a/app/templates/views/api/callbacks.html +++ b/app/templates/views/api/callbacks.html @@ -18,13 +18,13 @@ caption_visible=False ) %} {% call row() %} - {{ text_field('Delivery status callback URL') }} + {{ text_field('Callbacks for delivery receipts') }} {{ optional_text_field(received_text_messages_callback) }} {{ edit_field('Change', url_for('.delivery_status_callback', service_id=current_service.id)) }} {% endcall %} {% call row() %} - {{ text_field('Received text messages callback URL') }} + {{ text_field('Callbacks for received text messages') }} {{ optional_text_field(delivery_status_callback) }} {{ edit_field('Change', url_for('.received_text_messages_callback', service_id=current_service.id)) }} {% endcall %} diff --git a/app/templates/views/api/callbacks/delivery-status-callback.html b/app/templates/views/api/callbacks/delivery-status-callback.html index ab51f4cb8..a8c188c75 100644 --- a/app/templates/views/api/callbacks/delivery-status-callback.html +++ b/app/templates/views/api/callbacks/delivery-status-callback.html @@ -3,13 +3,13 @@ {% from "components/page-footer.html" import page_footer %} {% block service_page_title %} - Callback for delivery receipts + Callbacks for delivery receipts {% endblock %} {% block maincolumn_content %}
-

Callback for delivery receipts

+

Callbacks for delivery receipts

When you send an email or text message, we can tell you if Notify was able to deliver it. Check the callback documentation for more information. diff --git a/app/templates/views/api/callbacks/received-text-messages-callback.html b/app/templates/views/api/callbacks/received-text-messages-callback.html index ed9b4f13e..0ac44c3c6 100644 --- a/app/templates/views/api/callbacks/received-text-messages-callback.html +++ b/app/templates/views/api/callbacks/received-text-messages-callback.html @@ -3,13 +3,13 @@ {% from "components/page-footer.html" import page_footer %} {% block service_page_title %} - Callback for received text messages + Callbacks for received text messages {% endblock %} {% block maincolumn_content %} +

Callbacks for received text messages

-

Callback for received text messages

When you receive a text message in Notify, we can forward it to your system. Check the callback documentation for more information. diff --git a/tests/app/main/views/test_api_keys.py b/tests/app/main/views/test_api_keys.py index 1122ebefa..096426043 100644 --- a/tests/app/main/views/test_api_keys.py +++ b/tests/app/main/views/test_api_keys.py @@ -467,7 +467,7 @@ def test_callbacks_page_redirects_to_delivery_status_if_service_has_no_inbound_s _follow_redirects=True, ) - assert normalize_spaces(page.select_one('h1').text) == "Callback for delivery receipts" + assert normalize_spaces(page.select_one('h1').text) == "Callbacks for delivery receipts" @pytest.mark.parametrize('has_inbound_sms, expected_link', [ @@ -651,8 +651,10 @@ def test_callbacks_page_works_when_no_apis_set( page = client_request.get('main.api_callbacks', service_id=service_one['id'], _follow_redirects=True) - expected_rows = ['Delivery status callback URL Not set Change', - 'Received text messages callback URL Not set Change'] + expected_rows = [ + 'Callbacks for delivery receipts Not set Change', + 'Callbacks for received text messages Not set Change', + ] rows = page.select('tr') assert len(rows) == 3 for index, row in enumerate(expected_rows):