mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Add government channel
We have been asked to support the government channel so that: - it can be tested - the option to use it is available for the most severe of emergencies, where the public’s choice to opt-out is outweighed by the widespread risk to life
This commit is contained in:
@@ -286,37 +286,52 @@ def test_broadcast_tour_page_4_shows_service_name(
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('trial_mode, allowed_broadcast_provider, selector, expected_text, expected_tagged_text', (
|
||||
@pytest.mark.parametrize(
|
||||
'trial_mode, channel, allowed_broadcast_provider, selector, expected_text, expected_tagged_text',
|
||||
(
|
||||
True,
|
||||
"all",
|
||||
'.navigation-service-type.navigation-service-type--training',
|
||||
'service one Training Switch service',
|
||||
'Training',
|
||||
),
|
||||
(
|
||||
False,
|
||||
"all",
|
||||
'.navigation-service-type.navigation-service-type--live',
|
||||
'service one Live Switch service',
|
||||
'Live',
|
||||
),
|
||||
(
|
||||
True,
|
||||
"all",
|
||||
None,
|
||||
'.navigation-service-type.navigation-service-type--training',
|
||||
'service one Training Switch service',
|
||||
'Training',
|
||||
),
|
||||
(
|
||||
False,
|
||||
'severe',
|
||||
"all",
|
||||
'.navigation-service-type.navigation-service-type--live',
|
||||
'service one Live Switch service',
|
||||
'Live',
|
||||
),
|
||||
|
||||
(
|
||||
True,
|
||||
'vodafone',
|
||||
'.navigation-service-type.navigation-service-type--training',
|
||||
'service one Training (vodafone) Switch service',
|
||||
'Training (vodafone)',
|
||||
),
|
||||
(
|
||||
False,
|
||||
'vodafone',
|
||||
'.navigation-service-type.navigation-service-type--live',
|
||||
'service one Live (vodafone) Switch service',
|
||||
'Live (vodafone)',
|
||||
),
|
||||
))
|
||||
(
|
||||
False,
|
||||
'test',
|
||||
'vodafone',
|
||||
'.navigation-service-type.navigation-service-type--live',
|
||||
'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',
|
||||
'all',
|
||||
'.navigation-service-type.navigation-service-type--live',
|
||||
'service one Government Switch service',
|
||||
'Government',
|
||||
),
|
||||
)
|
||||
)
|
||||
def test_broadcast_service_shows_live_or_training(
|
||||
client_request,
|
||||
service_one,
|
||||
@@ -324,6 +339,7 @@ def test_broadcast_service_shows_live_or_training(
|
||||
mock_get_service_templates_when_no_templates_exist,
|
||||
trial_mode,
|
||||
allowed_broadcast_provider,
|
||||
channel,
|
||||
selector,
|
||||
expected_text,
|
||||
expected_tagged_text,
|
||||
@@ -331,6 +347,7 @@ def test_broadcast_service_shows_live_or_training(
|
||||
service_one['allowed_broadcast_provider'] = allowed_broadcast_provider
|
||||
service_one['permissions'] += ['broadcast']
|
||||
service_one['restricted'] = trial_mode
|
||||
service_one['broadcast_channel'] = channel
|
||||
page = client_request.get(
|
||||
'.broadcast_dashboard',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
|
||||
@@ -5435,6 +5435,7 @@ def test_get_service_set_broadcast_account_type(
|
||||
"Test channel (Vodafone)",
|
||||
"Test channel (all networks)",
|
||||
"Live (all networks)",
|
||||
"Government channel (all networks)",
|
||||
]
|
||||
labels = page.find_all('label', class_="govuk-radios__label")
|
||||
assert len(labels) == len(expected_labels)
|
||||
@@ -5599,6 +5600,11 @@ def test_post_service_set_broadcast_account_type_confirms(
|
||||
'Members of the public will receive alerts sent from this '
|
||||
'service.',
|
||||
]),
|
||||
('live-government', [
|
||||
'Government',
|
||||
'Members of the public will receive alerts sent from this '
|
||||
'service, even if they’ve opted out.'
|
||||
]),
|
||||
]
|
||||
)
|
||||
def test_post_service_set_broadcast_account_type_confirmation_page(
|
||||
@@ -5624,6 +5630,7 @@ def test_post_service_set_broadcast_account_type_confirmation_page(
|
||||
("training-test", "training", "test", "all"),
|
||||
("live-test-vodafone", "live", "test", "vodafone"),
|
||||
("live-severe", "live", "severe", "all"),
|
||||
("live-government", "live", "government", "all"),
|
||||
]
|
||||
)
|
||||
def test_post_service_set_broadcast_account_type_posts_data_to_api_and_redirects(
|
||||
|
||||
Reference in New Issue
Block a user