mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 02:23:19 -04:00
Associate start time with live
Start time is much more important than end time.
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
</p>
|
</p>
|
||||||
{% elif item.status == 'broadcasting' %}
|
{% elif item.status == 'broadcasting' %}
|
||||||
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 live-broadcast">
|
<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>
|
</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-hint">
|
<p class="govuk-body govuk-!-margin-top-6 govuk-!-margin-bottom-0 govuk-hint">
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
|
|
||||||
{% if broadcast_message.status == 'broadcasting' %}
|
{% if broadcast_message.status == 'broadcasting' %}
|
||||||
<p class="govuk-body govuk-!-margin-bottom-2 live-broadcast live-broadcast--left">
|
<p class="govuk-body govuk-!-margin-bottom-2 live-broadcast live-broadcast--left">
|
||||||
Live until {{ broadcast_message.finishes_at|format_datetime_relative }} 
|
Live since {{ broadcast_message.starts_at|format_datetime_relative }} 
|
||||||
{%- if not hide_stop_link %}
|
{%- 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>
|
<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 %}
|
{% endif %}
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ def test_broadcast_dashboard(
|
|||||||
assert [
|
assert [
|
||||||
normalize_spaces(row.text) for row in page.select('table')[0].select('tbody tr')
|
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) == (
|
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 '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')
|
@freeze_time('2020-02-20 02:20')
|
||||||
@@ -1037,7 +1037,7 @@ def test_start_broadcasting(
|
|||||||
'status': 'broadcasting',
|
'status': 'broadcasting',
|
||||||
'finishes_at': '2020-02-23T23:23:23.000000',
|
'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.',
|
'Prepared by Alice and approved by Bob.',
|
||||||
'Broadcasting stops tomorrow at 11:23pm.'
|
'Broadcasting stops tomorrow at 11:23pm.'
|
||||||
]),
|
]),
|
||||||
|
|||||||
Reference in New Issue
Block a user