Add support for the operator channel

Was just in one of those meetings where it felt like writing this would
take less time than I’d already spent talking about its relative
priority…

---

In the admin app you can already set the broadcast channel as 'test', 'severe' or 'government'.

Aim:
- Add the 'operator' channel to the list of channels you can pick for the admin app broadcast services

Note:
- The API already supports this - https://github.com/alphagov/notifications-api/pull/3262
- The CBC proxy does not yet support the operator channel and this will need a separate card. That card has not yet been written because the interface has not been agreed between us and the MNOs yet.
- Will need to have the ability to select the operator channel for just a single MNO like we do for the other channels
- If we add this, we shouldn't actually start using it until the MNO in question gives us the go ahead.

---

https://www.pivotaltracker.com/story/show/178485177
This commit is contained in:
Chris Hill-Scott
2021-06-11 12:03:38 +01:00
parent cc1a8254df
commit 2d36ec8214
5 changed files with 42 additions and 8 deletions

View File

@@ -321,6 +321,22 @@ def test_some_broadcast_tour_pages_show_service_name(
'service one Live Switch service',
'Live',
),
(
False,
'operator',
'all',
'.navigation-service-type.navigation-service-type--operator',
'service one Operator Switch service',
'Operator',
),
(
False,
'operator',
'vodafone',
'.navigation-service-type.navigation-service-type--operator',
'service one Operator (Vodafone) Switch service',
'Operator (Vodafone)',
),
(
False,
'test',
@@ -1855,6 +1871,9 @@ def test_view_pending_broadcast_from_api_call(
('test', (
'I understand this will alert anyone who has switched on the test channel'
)),
('operator', (
'I understand this will alert anyone who has switched on the operator channel'
)),
('severe', (
'I understand this will alert millions of people'
)),

View File

@@ -5501,6 +5501,7 @@ def test_service_set_broadcast_channel(
expected_labels = [
"Training mode",
"Operator channel",
"Test channel",
"Live channel",
"Government channel",
@@ -5591,6 +5592,11 @@ def test_service_set_broadcast_channel_has_radio_selected_for_broadcast_service(
'.service_confirm_broadcast_account_type',
{'account_type': 'training-test-all'},
),
(
'operator',
'.service_set_broadcast_network',
{'broadcast_channel': 'operator'},
),
(
'test',
'.service_set_broadcast_network',
@@ -5693,6 +5699,7 @@ def test_service_set_broadcast_network_has_radio_selected(
(
('severe', {'all_networks': True}, 'live-severe-all'),
('government', {'all_networks': True}, 'live-government-all'),
('operator', {'all_networks': True}, 'live-operator-all'),
('test', {'all_networks': True}, 'live-test-all'),
('test', {'all_networks': False, 'network': 'o2'}, 'live-test-o2'),
('test', {'all_networks': False, 'network': 'ee'}, 'live-test-ee'),
@@ -5732,7 +5739,7 @@ def test_service_set_broadcast_network(
{'all_networks': ''}, # Missing choice of MNO
),
)
@pytest.mark.parametrize('broadcast_channel', ['government', 'severe', 'test'])
@pytest.mark.parametrize('broadcast_channel', ['government', 'severe', 'test', 'operator'])
def test_service_set_broadcast_network_makes_you_choose(
client_request,
platform_admin_user,
@@ -5760,6 +5767,12 @@ def test_service_set_broadcast_network_makes_you_choose(
'Training',
'No phones will receive alerts sent from this service.',
]),
('live-operator-all', [
'Operator',
'Members of the public who have switched on the operator '
'channel on their phones will receive alerts sent from '
'this service.',
]),
('live-test-ee', [
'Test (EE)',
'Members of the public who have switched on the test '
@@ -5833,6 +5846,7 @@ def test_service_confirm_broadcast_account_type_confirmation_page(
'value,service_mode,broadcast_channel,allowed_broadcast_provider',
[
("training-test-all", "training", "test", "all"),
("live-operator-o2", "live", "operator", "o2"),
("live-test-vodafone", "live", "test", "vodafone"),
("live-severe-all", "live", "severe", "all"),
("live-government-all", "live", "government", "all"),