mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-01 04:09:46 -04:00
Refactor service name code to reduce duplication
This makes the code shareable between: - the broadcast tour pages - the broadcast settings platform admin page - the regular service navigation On the training mode tour pages we don’t want to confuse people with the organisation name or _Switch service_ links, so those are omitted and the code is therefore slightly different.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user