diff --git a/app/templates/views/jobs/jobs.html b/app/templates/views/jobs/jobs.html index 33c49f0ff..0e026dd6e 100644 --- a/app/templates/views/jobs/jobs.html +++ b/app/templates/views/jobs/jobs.html @@ -18,11 +18,17 @@ {% include 'views/dashboard/_jobs.html' %} {% endif %} {% if not jobs and not show_scheduled_jobs %} - {# - `_jobs.html` will show the ‘You have no jobs’ message when - passed an empty list of jobs - #} - {% include 'views/dashboard/_jobs.html' %} +

+ You have not uploaded any files yet. +

+ {% if current_service.has_permission('upload_letters') %} +

+ Upload a letter and Notify will print, pack and post it for you. +

+ {% endif %} +

+ To upload a list of contact details, first choose a template. +

{% endif %} {{ previous_next_navigation(prev_page, next_page) }} {% if current_service.can_upload_letters and current_user.has_permissions('send_messages') %} diff --git a/tests/app/main/views/test_uploads.py b/tests/app/main/views/test_uploads.py index 229f68268..561482436 100644 --- a/tests/app/main/views/test_uploads.py +++ b/tests/app/main/views/test_uploads.py @@ -39,10 +39,13 @@ def test_no_upload_letters_button_without_permission( @pytest.mark.parametrize('extra_permissions, expected_empty_message', ( (['letter'], ( - 'You have not uploaded any files yet' + 'You have not uploaded any files yet. ' + 'To upload a list of contact details, first choose a template.' )), (['letter', 'upload_letters'], ( - 'Upload a letter and Notify will print, pack and post it for you.' + 'You have not uploaded any files yet. ' + 'Upload a letter and Notify will print, pack and post it for you. ' + 'To upload a list of contact details, first choose a template.' )), )) def test_get_upload_hub_with_no_uploads( @@ -56,9 +59,9 @@ def test_get_upload_hub_with_no_uploads( mocker.patch('app.job_api_client.get_jobs', return_value={'data': []}) service_one['permissions'] += extra_permissions page = client_request.get('main.uploads', service_id=SERVICE_ONE_ID) - assert normalize_spaces( - page.select_one('.table-empty-message').text - ) == expected_empty_message + assert normalize_spaces(' '.join( + paragraph.text for paragraph in page.select('main p') + )) == expected_empty_message assert not page.select('.file-list-filename')