From 74e92e708efe8f9966ea764d709a050c32b55558 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 26 Oct 2020 11:20:32 +0000 Subject: [PATCH] Add status to alerts pending approval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that pending alerts aren’t in their own section there’s nothing to label them as pending. So this commit replaces the extra metadata we show for a pending alert (the name of the person who created it, which was only ever a reckon) with an explicit label that says it’s waiting for approval. --- app/templates/views/broadcast/partials/dashboard-table.html | 2 +- tests/app/main/views/test_broadcast.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/templates/views/broadcast/partials/dashboard-table.html b/app/templates/views/broadcast/partials/dashboard-table.html index 702b0a98a..8cd572313 100644 --- a/app/templates/views/broadcast/partials/dashboard-table.html +++ b/app/templates/views/broadcast/partials/dashboard-table.html @@ -28,7 +28,7 @@ {% call field(align='right') %} {% if item.status == 'pending-approval' %}

- Prepared by {{ item.created_by.name }} + Waiting for approval

{% elif item.status == 'broadcasting' %}

diff --git a/tests/app/main/views/test_broadcast.py b/tests/app/main/views/test_broadcast.py index 5f80683c5..3cc0ac221 100644 --- a/tests/app/main/views/test_broadcast.py +++ b/tests/app/main/views/test_broadcast.py @@ -306,7 +306,7 @@ def test_broadcast_dashboard( normalize_spaces(row.text) for row in page.select('table')[0].select('tbody tr') ] == [ 'Example template This is a test England Scotland Live since today at 2:20am', - 'Example template This is a test England Scotland Prepared by Test User', + 'Example template This is a test England Scotland Waiting for approval', ] @@ -329,7 +329,7 @@ def test_broadcast_dashboard_json( assert json_response.keys() == {'current_broadcasts'} - assert 'Prepared by Test User' in json_response['current_broadcasts'] + assert 'Waiting for approval' in json_response['current_broadcasts'] assert 'Live since today at 2:20am' in json_response['current_broadcasts']