diff --git a/app/main/views/jobs.py b/app/main/views/jobs.py index 926118e54..9bc9524fb 100644 --- a/app/main/views/jobs.py +++ b/app/main/views/jobs.py @@ -34,7 +34,6 @@ from app.utils import ( generate_previous_dict, user_has_permissions, generate_notifications_csv, - get_help_argument, get_template, get_time_left, REQUESTED_STATUSES, @@ -121,10 +120,8 @@ def view_job(service_id, job_id): service_id=service_id, job_id=job['id'], status=request.args.get('status', ''), - help=get_help_argument() ), partials=get_job_partials(job), - help=get_help_argument() ) @@ -307,7 +304,7 @@ def get_status_filters(service, message_type, statistics): ] -def _get_job_counts(job, help_argument): +def _get_job_counts(job): sending = 0 if job['job_status'] == 'scheduled' else ( job.get('notification_count', 0) - job.get('notifications_delivered', 0) - @@ -322,7 +319,6 @@ def _get_job_counts(job, help_argument): service_id=job['service'], job_id=job['id'], status=query_param, - help=help_argument ), count ) for label, query_param, count in [ @@ -360,7 +356,7 @@ def get_job_partials(job): return { 'counts': render_template( 'partials/count.html', - counts=_get_job_counts(job, request.args.get('help', 0)), + counts=_get_job_counts(job), status=filter_args['status'] ), 'notifications': render_template( @@ -376,7 +372,6 @@ def get_job_partials(job): job_id=job['id'], status=request.args.get('status') ), - help=get_help_argument(), time_left=get_time_left(job['created_at']), job=job, template=template, diff --git a/app/templates/partials/jobs/notifications.html b/app/templates/partials/jobs/notifications.html index 4bec657b3..9062acda8 100644 --- a/app/templates/partials/jobs/notifications.html +++ b/app/templates/partials/jobs/notifications.html @@ -24,18 +24,16 @@
{% endif %} - {% if not help %} - {% if percentage_complete < 100 %} -

- Report is {{ "{:.0f}%".format(percentage_complete) }} complete… -

- {% elif notifications %} -

- Download this report -   - {{ time_left }} -

- {% endif %} + {% if percentage_complete < 100 %} +

+ Report is {{ "{:.0f}%".format(percentage_complete) }} complete… +

+ {% elif notifications %} +

+ Download this report +   + {{ time_left }} +

{% endif %} {% call(item, row_number) list_table( diff --git a/tests/app/main/views/test_jobs.py b/tests/app/main/views/test_jobs.py index 242ad6ca9..ad9abb6ae 100644 --- a/tests/app/main/views/test_jobs.py +++ b/tests/app/main/views/test_jobs.py @@ -224,38 +224,6 @@ def test_should_not_show_cancelled_job( assert response.status_code == 404 -def test_should_show_not_show_csv_download_in_tour( - logged_in_client, - service_one, - active_user_with_permissions, - mock_get_service_template, - mock_get_job, - mocker, - mock_get_notifications, - fake_uuid, -): - response = logged_in_client.get(url_for( - 'main.view_job', - service_id=service_one['id'], - job_id=fake_uuid, - help=3 - )) - - assert response.status_code == 200 - assert url_for( - 'main.view_job_updates', - service_id=service_one['id'], - job_id=fake_uuid, - status='', - help=3 - ).replace('&', '&') in response.get_data(as_text=True) - assert url_for( - 'main.view_job_csv', - service_id=service_one['id'], - job_id=fake_uuid - ) not in response.get_data(as_text=True) - - @freeze_time("2016-01-01 00:00:00.000001") def test_should_show_updates_for_one_job_as_json( logged_in_client,