mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-12 21:31:06 -04:00
Merge pull request #3950 from alphagov/clarify-sms-prefix
Explain about text message prefixes when editing
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
back_link=url_for('main.view_template', service_id=current_service.id, template_id=template.id) if template else url_for('main.choose_template', service_id=current_service.id, template_folder_id=template_folder_id)
|
||||
) }}
|
||||
|
||||
{% if current_service.prefix_sms %}
|
||||
{% set content_hint = 'Your message will start with your service name' %}
|
||||
{% endif %}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-two-thirds">
|
||||
@@ -26,6 +30,7 @@
|
||||
form.template_content,
|
||||
highlight_placeholders=True,
|
||||
width='1-1',
|
||||
hint=content_hint,
|
||||
rows=5,
|
||||
extra_form_group_classes='govuk-!-margin-bottom-2'
|
||||
) }}
|
||||
|
||||
@@ -1024,6 +1024,30 @@ def test_should_let_letter_contact_block_be_changed_for_the_template(
|
||||
)['href'] == expected_partial_url(service_id=SERVICE_ONE_ID)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('prefix_sms', [
|
||||
True,
|
||||
pytest.param(False, marks=pytest.mark.xfail())
|
||||
])
|
||||
def test_should_show_message_with_prefix_hint_if_enabled_for_service(
|
||||
client_request,
|
||||
mocker,
|
||||
mock_get_service_template,
|
||||
mock_get_users_by_service,
|
||||
service_one,
|
||||
fake_uuid,
|
||||
prefix_sms
|
||||
):
|
||||
service_one['prefix_sms'] = prefix_sms
|
||||
|
||||
page = client_request.get(
|
||||
'.edit_service_template',
|
||||
service_id=service_one['id'],
|
||||
template_id=fake_uuid,
|
||||
)
|
||||
|
||||
assert 'Your message will start with your service name' in page.text
|
||||
|
||||
|
||||
def test_should_show_page_template_with_priority_select_if_platform_admin(
|
||||
platform_admin_client,
|
||||
platform_admin_user,
|
||||
|
||||
Reference in New Issue
Block a user