From e7d6a2ea0dae873af0509739525dbacb2d6be101 Mon Sep 17 00:00:00 2001 From: Katie Smith Date: Tue, 23 Feb 2021 14:45:05 +0000 Subject: [PATCH] Add descriptive links to /service-settings/letter-contact-details The links had no descriptive text, so all read 'Change'. This adds hidden text specific to the item they relate to. --- .../views/service-settings/letter-contact-details.html | 4 +++- tests/app/main/views/test_service_settings.py | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/templates/views/service-settings/letter-contact-details.html b/app/templates/views/service-settings/letter-contact-details.html index a16ea0e1e..1489f847b 100644 --- a/app/templates/views/service-settings/letter-contact-details.html +++ b/app/templates/views/service-settings/letter-contact-details.html @@ -49,7 +49,9 @@
{% if current_user.has_permissions('manage_service') %} - Change + + Change {{ item.contact_block }} + {% endif %}
diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index b2644f335..e6d72f229 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -2191,7 +2191,7 @@ def test_and_more_hint_appears_on_settings_with_more_than_just_a_single_sender( @pytest.mark.parametrize('sender_list_page, index, expected_output', [ ('main.service_email_reply_to', 0, 'test@example.com (default) Change test@example.com'), - ('main.service_letter_contact_details', 1, '1 Example Street (default) Change'), + ('main.service_letter_contact_details', 1, '1 Example Street (default) Change 1 Example Street'), ('main.service_sms_senders', 0, 'GOVUK (default) Change GOVUK') ]) def test_api_ids_dont_show_on_option_pages_with_a_single_sender( @@ -2237,9 +2237,9 @@ def test_api_ids_dont_show_on_option_pages_with_a_single_sender( create_multiple_letter_contact_blocks(), [ 'Blank Make default', - '1 Example Street (default) Change ID: 1234', - '2 Example Street Change ID: 5678', - 'foobaz Change ID: 9457', + '1 Example Street (default) Change 1 Example Street ID: 1234', + '2 Example Street Change 2 Example Street ID: 5678', + 'foobaz Change foo baz ID: 9457', ], ), ( 'main.service_sms_senders',