Hide irrelevant things from nav for broadcast services

Services doing broadcasts wont:
- incur costs, so don’t need to see the usage page
- be sending anything by uploading, so don’t need to see the uploads
  page
- (for now) be sending anything using the API, so don’t need to see the
  API integration page
This commit is contained in:
Chris Hill-Scott
2020-07-08 09:57:32 +01:00
parent b833d83205
commit 59470e9d6d
2 changed files with 23 additions and 3 deletions

View File

@@ -177,6 +177,24 @@ def test_navigation_urls(
]
def test_navigation_for_services_with_broadcast_permission(
client_request,
service_one,
mock_get_service_templates,
mock_get_template_folders,
):
service_one['permissions'] += ['broadcast']
page = client_request.get('main.choose_template', service_id=SERVICE_ONE_ID)
assert [
a['href'] for a in page.select('.navigation a')
] == [
'/services/{}'.format(SERVICE_ONE_ID),
'/services/{}/templates'.format(SERVICE_ONE_ID),
'/services/{}/users'.format(SERVICE_ONE_ID),
'/services/{}/service-settings'.format(SERVICE_ONE_ID),
]
def test_caseworkers_get_caseworking_navigation(
client_request,
mocker,