Associate start time with live

Start time is much more important than end time.
This commit is contained in:
Chris Hill-Scott
2020-10-14 14:16:16 +01:00
parent 91e74929eb
commit 0e39208546
3 changed files with 5 additions and 5 deletions

View File

@@ -32,7 +32,7 @@
</p>
{% elif item.status == 'broadcasting' %}
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 live-broadcast">
Live until {{ item.finishes_at|format_datetime_relative }}
Live since {{ item.starts_at|format_datetime_relative }}
</p>
{% else %}
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-hint">

View File

@@ -101,7 +101,7 @@
{% if broadcast_message.status == 'broadcasting' %}
<p class="govuk-body govuk-!-margin-bottom-2 live-broadcast live-broadcast--left">
Live until {{ broadcast_message.finishes_at|format_datetime_relative }}&ensp;
Live since {{ broadcast_message.starts_at|format_datetime_relative }}&ensp;
{%- if not hide_stop_link %}
<a href="{{ url_for('.cancel_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id) }}" class="destructive-link destructive-link--no-visited-state">Stop broadcasting</a>
{% endif %}

View File

@@ -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.'
]),