From ad897cd8209ec04ebb041295eda985204797b826 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 13 Jul 2017 09:57:15 +0100 Subject: [PATCH] Hide report on letter job --- .../partials/jobs/notifications.html | 22 ++++++++++--------- tests/app/main/views/test_jobs.py | 2 ++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/templates/partials/jobs/notifications.html b/app/templates/partials/jobs/notifications.html index e816c5555..997e72559 100644 --- a/app/templates/partials/jobs/notifications.html +++ b/app/templates/partials/jobs/notifications.html @@ -24,16 +24,18 @@
{% endif %} - {% if percentage_complete < 100 %} -

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

- {% elif notifications %} -

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

+ {% if template.template_type != 'letter' %} + {% if percentage_complete < 100 %} +

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

+ {% elif notifications %} +

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

+ {% endif %} {% 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 0f9bca59e..20251d271 100644 --- a/tests/app/main/views/test_jobs.py +++ b/tests/app/main/views/test_jobs.py @@ -183,6 +183,8 @@ def test_should_show_letter_job( assert normalize_spaces(page.select('.keyline-block')[1].text) == ( '6 January Estimated delivery date' ) + assert page.select('[download=download]') == [] + assert page.select('.hint') == [] mock_get_notifications.assert_called_with( SERVICE_ONE_ID,