Correct description of how service name appears

This has changed since we made prefixing text messages its own setting.
This commit is contained in:
Chris Hill-Scott
2018-01-11 17:33:04 +00:00
parent 17573437a9
commit ebd5721d42
2 changed files with 27 additions and 13 deletions

View File

@@ -10,13 +10,16 @@
<h1 class="heading-large">Change your service name</h1> <h1 class="heading-large">Change your service name</h1>
<div class="form-group"> <div class="form-group">
<p>Users will see your service name:</p> {% if current_service.prefix_sms %}
<ul class="list-bullet"> <p>Users will see your service name:</p>
<li>at the start of every text message, eg Vehicle tax: we received your payment, thank you</li> <ul class="list-bullet">
<li>as your email sender name</li> <li>at the start of every text message, eg {{ current_service.name }}: This is an example message</li>
</ul> <li>as your email sender name</li>
</ul>
{% else %}
<p>Users will see your service name as your email sender name.</p>
{% endif %}
</div> </div>
<form method="post"> <form method="post">

View File

@@ -236,16 +236,27 @@ def test_escapes_letter_contact_block(
def test_should_show_service_name( def test_should_show_service_name(
logged_in_client, client_request,
service_one,
): ):
response = logged_in_client.get(url_for( page = client_request.get('main.service_name_change', service_id=SERVICE_ONE_ID)
'main.service_name_change', service_id=service_one['id']))
assert response.status_code == 200
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert page.find('h1').text == 'Change your service name' assert page.find('h1').text == 'Change your service name'
assert page.find('input', attrs={"type": "text"})['value'] == 'service one' assert page.find('input', attrs={"type": "text"})['value'] == 'service one'
app.service_api_client.get_service.assert_called_with(service_one['id']) assert page.select_one('main p').text == 'Users will see your service name:'
assert normalize_spaces(page.select_one('main ul').text) == (
'at the start of every text message, eg service one: This is an example message '
'as your email sender name'
)
app.service_api_client.get_service.assert_called_with(SERVICE_ONE_ID)
def test_should_show_service_name_with_no_prefixing(
client_request,
service_one,
):
service_one['prefix_sms'] = False
page = client_request.get('main.service_name_change', service_id=SERVICE_ONE_ID)
assert page.find('h1').text == 'Change your service name'
assert page.select_one('main p').text == 'Users will see your service name as your email sender name.'
def test_should_redirect_after_change_service_name( def test_should_redirect_after_change_service_name(