From 83c1035f1becc4c780544dac2685246ddf15567a Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 19 Jul 2016 09:09:20 +0100 Subject: [PATCH] =?UTF-8?q?Really=20hide=20the=20=E2=80=98download=20CSV?= =?UTF-8?q?=E2=80=99=20link=20in=20the=20tour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tried to do this in https://github.com/alphagov/notifications-admin/pull/743 Didn’t account for it reappearing when the AJAX fired, because the AJAX request didn’t account for whether or not the user was in the tour. --- app/main/views/jobs.py | 3 ++- tests/app/main/views/test_jobs.py | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/main/views/jobs.py b/app/main/views/jobs.py index e1baa38c4..e3bbf523c 100644 --- a/app/main/views/jobs.py +++ b/app/main/views/jobs.py @@ -97,7 +97,8 @@ def view_job(service_id, job_id): ".view_job_updates", service_id=service_id, job_id=job['id'], - status=request.args.get('status', '') + status=request.args.get('status', ''), + help=get_help_argument() ), partials=get_job_partials(job), help=get_help_argument() diff --git a/tests/app/main/views/test_jobs.py b/tests/app/main/views/test_jobs.py index b7fcc6460..6561605a8 100644 --- a/tests/app/main/views/test_jobs.py +++ b/tests/app/main/views/test_jobs.py @@ -120,6 +120,13 @@ def test_should_show_not_show_csv_download_in_tour( )) 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'],