From 0e392085464da0f17e62550d3504043fd3d77758 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 14 Oct 2020 14:16:16 +0100 Subject: [PATCH] Associate start time with live Start time is much more important than end time. --- app/templates/views/broadcast/partials/dashboard-table.html | 2 +- app/templates/views/broadcast/view-message.html | 2 +- tests/app/main/views/test_broadcast.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/templates/views/broadcast/partials/dashboard-table.html b/app/templates/views/broadcast/partials/dashboard-table.html index 09218af1f..200bc9484 100644 --- a/app/templates/views/broadcast/partials/dashboard-table.html +++ b/app/templates/views/broadcast/partials/dashboard-table.html @@ -32,7 +32,7 @@

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

- Live until {{ item.finishes_at|format_datetime_relative }} + Live since {{ item.starts_at|format_datetime_relative }}

{% else %}

diff --git a/app/templates/views/broadcast/view-message.html b/app/templates/views/broadcast/view-message.html index f75265387..5d1c9aff6 100644 --- a/app/templates/views/broadcast/view-message.html +++ b/app/templates/views/broadcast/view-message.html @@ -101,7 +101,7 @@ {% if broadcast_message.status == 'broadcasting' %}

- Live until {{ broadcast_message.finishes_at|format_datetime_relative }}  + Live since {{ broadcast_message.starts_at|format_datetime_relative }}  {%- if not hide_stop_link %} Stop broadcasting {% endif %} diff --git a/tests/app/main/views/test_broadcast.py b/tests/app/main/views/test_broadcast.py index 4be2e2a1f..774875cdd 100644 --- a/tests/app/main/views/test_broadcast.py +++ b/tests/app/main/views/test_broadcast.py @@ -302,7 +302,7 @@ def test_broadcast_dashboard( assert [ normalize_spaces(row.text) for row in page.select('table')[0].select('tbody tr') ] == [ - 'Example template This is a test England Scotland Live until tomorrow at 2:20am', + 'Example template This is a test England Scotland Live since today at 2:20am', ] assert normalize_spaces(page.select('main h2')[1].text) == ( @@ -338,7 +338,7 @@ def test_broadcast_dashboard_json( } assert 'Prepared by Test User' in json_response['pending_approval_broadcasts'] - assert 'Live until tomorrow at 2:20am' in json_response['live_broadcasts'] + assert 'Live since today at 2:20am' in json_response['live_broadcasts'] @freeze_time('2020-02-20 02:20') @@ -1037,7 +1037,7 @@ def test_start_broadcasting( 'status': 'broadcasting', 'finishes_at': '2020-02-23T23:23:23.000000', }, [ - 'Live until tomorrow at 11:23pm Stop broadcasting', + 'Live since 20 February at 8:20pm Stop broadcasting', 'Prepared by Alice and approved by Bob.', 'Broadcasting stops tomorrow at 11:23pm.' ]),