From cfadead292500331c02dcda55acc8a6b2a99dabf Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 18 Jul 2016 08:36:44 +0100 Subject: [PATCH] =?UTF-8?q?Make=20it=20clearer=20what=20you=E2=80=99re=20d?= =?UTF-8?q?ownloading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous text didn’t make it clear _what_ you were downloading as a CSV file, you had to infer it from the context. And the fact that it’s a CSV file is immaterial, it’s the data you care about, not the format. --- app/templates/partials/jobs/notifications.html | 4 ++-- tests/app/main/views/test_jobs.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/templates/partials/jobs/notifications.html b/app/templates/partials/jobs/notifications.html index 74971d1d8..34254cfef 100644 --- a/app/templates/partials/jobs/notifications.html +++ b/app/templates/partials/jobs/notifications.html @@ -6,9 +6,9 @@ {% if notifications and not help %}

- Download as a CSV file + Download this report   - Delivery information is available for 7 days + Available for 7 days

{% endif %} diff --git a/tests/app/main/views/test_jobs.py b/tests/app/main/views/test_jobs.py index 0f81e0150..b2b59b295 100644 --- a/tests/app/main/views/test_jobs.py +++ b/tests/app/main/views/test_jobs.py @@ -90,12 +90,14 @@ def test_should_show_page_for_one_job( job_id=fake_uuid, status=status_argument, ) - assert page.find('a', {'download': 'download'})['href'] == url_for( + csv_link = page.find('a', {'download': 'download'}) + assert csv_link['href'] == url_for( 'main.view_job_csv', service_id=service_one['id'], job_id=fake_uuid, status=status_argument ) + assert csv_link.text == 'Download this report' mock_get_notifications.assert_called_with( service_one['id'], fake_uuid,