mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 01:55:41 -04:00
Write test for separate page for service name change for local orgs
Also make a bullet list gov uk style
This commit is contained in:
@@ -87,6 +87,7 @@ def add_service():
|
|||||||
heading=heading,
|
heading=heading,
|
||||||
default_organisation_type=default_organisation_type,
|
default_organisation_type=default_organisation_type,
|
||||||
)
|
)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
'views/add-service.html',
|
'views/add-service.html',
|
||||||
form=form,
|
form=form,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
{{ page_header('About your service') }}
|
{{ page_header('About your service') }}
|
||||||
|
|
||||||
<p class="govuk-body">Give your service a name that tells users what your messages are about, as well as who they’re from. For example:</p>
|
<p class="govuk-body">Give your service a name that tells users what your messages are about, as well as who they’re from. For example:</p>
|
||||||
<ul class="list-bullet">
|
<ul class="govuk-list govuk-list--bullet">
|
||||||
<li>School admissions - {{ current_user.default_organisation.name }}</li>
|
<li>School admissions - {{ current_user.default_organisation.name }}</li>
|
||||||
<li>Electoral services - {{ current_user.default_organisation.name }}</li>
|
<li>Electoral services - {{ current_user.default_organisation.name }}</li>
|
||||||
<li>Blue Badge - {{ current_user.default_organisation.name }}</li>
|
<li>Blue Badge - {{ current_user.default_organisation.name }}</li>
|
||||||
|
|||||||
@@ -383,6 +383,26 @@ def test_should_show_service_name(
|
|||||||
app.service_api_client.get_service.assert_called_with(SERVICE_ONE_ID)
|
app.service_api_client.get_service.assert_called_with(SERVICE_ONE_ID)
|
||||||
|
|
||||||
|
|
||||||
|
def test_should_show_different_change_service_name_page_for_local_services(
|
||||||
|
client_request,
|
||||||
|
service_one,
|
||||||
|
mocker,
|
||||||
|
):
|
||||||
|
mocker.patch(
|
||||||
|
'app.organisations_client.get_organisation_by_domain',
|
||||||
|
return_value=organisation_json(organisation_type='local'),
|
||||||
|
)
|
||||||
|
service_one['organisation_type'] = 'local'
|
||||||
|
page = client_request.get('main.service_name_change', service_id=SERVICE_ONE_ID)
|
||||||
|
assert page.find('h1').text == 'Change your service name'
|
||||||
|
assert page.find('input', attrs={"type": "text"})['value'] == 'service one'
|
||||||
|
assert page.select_one('main .govuk-body').text.strip() == (
|
||||||
|
'Your service name should tell users what the message is about as well as who it’s from. For example:'
|
||||||
|
)
|
||||||
|
|
||||||
|
app.service_api_client.get_service.assert_called_with(SERVICE_ONE_ID)
|
||||||
|
|
||||||
|
|
||||||
def test_should_show_service_name_with_no_prefixing(
|
def test_should_show_service_name_with_no_prefixing(
|
||||||
client_request,
|
client_request,
|
||||||
service_one,
|
service_one,
|
||||||
|
|||||||
Reference in New Issue
Block a user