From d38f44ec6961d435dddbe9ac6dcb3e7cf347a26d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 12 May 2021 11:33:09 +0100 Subject: [PATCH] =?UTF-8?q?Be=20explicit=20that=20=E2=80=98test=E2=80=99?= =?UTF-8?q?=20goes=20out=20on=20real=20networks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding ‘all networks’ whenever we mention the using the test channel without a restriction to a single network should help reinforce that this sends real alerts. --- app/templates/views/service-settings.html | 2 +- ...ervice-confirm-broadcast-account-type.html | 3 ++ app/templates/withnav_template.html | 4 ++- tests/app/main/views/test_broadcast.py | 29 ++++++++++++------- tests/app/main/views/test_service_settings.py | 4 +-- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index ac2560348..567003446 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -436,7 +436,7 @@ {% else %} {% if current_service.live and current_service.broadcast_channel == "government" %}Government{% endif %} {% if current_service.live and current_service.broadcast_channel == "severe" %}Live{% endif %} - {% if current_service.live and current_service.broadcast_channel == "test" %}Test {% if current_service.allowed_broadcast_provider != "all" %}({{ current_service.allowed_broadcast_provider|format_mobile_network }}){% else %}(All networks){% endif %}{%endif%} + {% if current_service.live and current_service.broadcast_channel == "test" %}Test {% if current_service.allowed_broadcast_provider != "all" %}({{ current_service.allowed_broadcast_provider|format_mobile_network }}){% else %}(all networks){% endif %}{%endif%} {% if not current_service.live%}Training {% endif%} {% endif %} {% endcall %} diff --git a/app/templates/views/service-settings/service-confirm-broadcast-account-type.html b/app/templates/views/service-settings/service-confirm-broadcast-account-type.html index 98fb1a52c..e36045331 100644 --- a/app/templates/views/service-settings/service-confirm-broadcast-account-type.html +++ b/app/templates/views/service-settings/service-confirm-broadcast-account-type.html @@ -33,6 +33,9 @@ {% 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 %}

diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html index 34f7fefae..9e142d5f7 100644 --- a/app/templates/withnav_template.html +++ b/app/templates/withnav_template.html @@ -26,7 +26,9 @@ Live {% elif current_service.broadcast_channel == 'test' %} {{ current_service.broadcast_channel|title }} - {% if current_service.allowed_broadcast_provider != "all" %} + {% if current_service.allowed_broadcast_provider == "all" %} + (all networks) + {% else %} ({{ current_service.allowed_broadcast_provider }}) {% endif %} {% else %} diff --git a/tests/app/main/views/test_broadcast.py b/tests/app/main/views/test_broadcast.py index 4b4c3af9f..63ad7f956 100644 --- a/tests/app/main/views/test_broadcast.py +++ b/tests/app/main/views/test_broadcast.py @@ -291,8 +291,16 @@ def test_broadcast_tour_page_4_shows_service_name( ( ( True, - "all", None, + 'all', + '.navigation-service-type.navigation-service-type--training', + 'service one Training Switch service', + 'Training', + ), + ( + True, + 'test', + 'all', '.navigation-service-type.navigation-service-type--training', 'service one Training Switch service', 'Training', @@ -300,12 +308,19 @@ def test_broadcast_tour_page_4_shows_service_name( ( False, 'severe', - "all", + 'all', '.navigation-service-type.navigation-service-type--live', 'service one Live Switch service', 'Live', ), - + ( + False, + 'test', + 'all', + '.navigation-service-type.navigation-service-type--live', + 'service one Test (all networks) Switch service', + 'Test (all networks)', + ), ( False, 'test', @@ -314,14 +329,6 @@ def test_broadcast_tour_page_4_shows_service_name( 'service one Test (vodafone) Switch service', 'Test (vodafone)', ), - ( - False, - 'test', - 'all', - '.navigation-service-type.navigation-service-type--live', - 'service one Test Switch service', - 'Test', - ), ( False, 'government', diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index d4297c74d..6d2f3f2de 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -203,7 +203,7 @@ def test_platform_admin_sees_only_relevant_settings_for_broadcast_service( (True, "training", "test", "all", "Training"), (True, "live", "test", "ee", "Test (EE)"), (True, "live", "test", "three", "Test (Three)"), - (True, "live", "test", "all", "Test (All networks)"), + (True, "live", "test", "all", "Test (all networks)"), (True, "live", "severe", "all", "Live"), ] ) @@ -5777,7 +5777,7 @@ def test_post_service_set_broadcast_network_makes_you_choose( 'this service.', ]), ('live-test', [ - 'Test', + 'Test (all networks)', 'Members of the public who have switched on the test ' 'channel on their phones will receive alerts sent from ' 'this service.',