mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Only show template navigation when it’s useful
There are lots of services that only send emails, or only send text messages. For these services, being able to filter the list of templates but type is pointless – it won’t cut the list down at all. This commit adds some logic to only show the navigation if the service has some variety of template types.
This commit is contained in:
@@ -64,6 +64,19 @@ def test_should_show_page_for_choosing_a_template(
|
||||
mock_get_service_templates.assert_called_with(SERVICE_ONE_ID)
|
||||
|
||||
|
||||
def test_should_not_show_template_nav_if_only_one_type_of_template(
|
||||
client_request,
|
||||
mock_get_service_templates_with_only_one_template,
|
||||
):
|
||||
|
||||
page = client_request.get(
|
||||
'main.choose_template',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
)
|
||||
|
||||
assert not page.select('.pill')
|
||||
|
||||
|
||||
def test_should_show_page_for_one_template(
|
||||
logged_in_client,
|
||||
mock_get_service_template,
|
||||
|
||||
Reference in New Issue
Block a user