diff --git a/app/templates/service_navigation.html b/app/templates/service_navigation.html index 6e87d50cd..8fb5bfc19 100644 --- a/app/templates/service_navigation.html +++ b/app/templates/service_navigation.html @@ -1,3 +1,37 @@ +{% macro navigation_service_name(service) %} +
+ {{ broadcast_service_name_tag( + form.account_type.service_mode == 'training', + form.account_type.broadcast_channel, + form.account_type.provider_restriction, + left_margin=False, + ) }} +
{% if form.account_type.service_mode == 'training' %} -- Training -
No phones will receive alerts sent from this service.
{% else %} -- {% if form.account_type.broadcast_channel == 'severe' %} - Live - {% elif form.account_type.broadcast_channel == 'government' %} - Government - {% else %} - {{ form.account_type.broadcast_channel|title }} - {% endif %} - {% if form.account_type.provider_restriction != 'all' %} - ({{ form.account_type.provider_restriction|format_mobile_network }}) - {% endif %} - {% if form.account_type.broadcast_channel == 'test' and form.account_type.provider_restriction == 'all'%} - (all networks) - {% endif %} - -
Members of the public {% if form.account_type.broadcast_channel == 'test' %} diff --git a/tests/app/main/views/test_broadcast.py b/tests/app/main/views/test_broadcast.py index 17c7727d3..dd09fe356 100644 --- a/tests/app/main/views/test_broadcast.py +++ b/tests/app/main/views/test_broadcast.py @@ -284,7 +284,9 @@ def test_broadcast_tour_page_4_shows_service_name( service_id=SERVICE_ONE_ID, step_index=step_index, ) - assert normalize_spaces(page.select_one('.navigation-service').text) == ( + assert normalize_spaces( + page.select_one('.navigation-service').text + ).startswith( 'service one Training' ) @@ -301,6 +303,7 @@ def test_live_broadcast_tour_shows_service_name_and_switch( service_one['permissions'] += ['broadcast'] service_one['restricted'] = False service_one['allowed_broadcast_provider'] = 'all' + service_one['broadcast_channel'] = 'severe' page = client_request.get( '.broadcast_tour_live', service_id=SERVICE_ONE_ID, @@ -351,8 +354,8 @@ def test_live_broadcast_tour_shows_service_name_and_switch( 'test', 'vodafone', '.navigation-service-type.navigation-service-type--live', - 'service one Test (vodafone) Switch service', - 'Test (vodafone)', + 'service one Test (Vodafone) Switch service', + 'Test (Vodafone)', ), ( False,