Update tests for new content

This commit is contained in:
Katie Smith
2021-07-06 16:42:54 +01:00
parent cd6574c28d
commit 59ed8b0f8b
2 changed files with 14 additions and 14 deletions

View File

@@ -1542,15 +1542,15 @@ def test_start_broadcasting(
'status': 'broadcasting',
'finishes_at': '2020-02-23T23:23:23.000000',
}, [
'Live since 20 February at 8:20pm Stop broadcasting',
'Prepared by Alice and approved by Bob.',
'Live since 20 February at 8:20pm Stop sending',
'Sent by Alice and approved by Bob.',
'Broadcasting stops tomorrow at 11:23pm.'
]),
('.view_current_broadcast', True, {
'status': 'broadcasting',
'finishes_at': '2020-02-23T23:23:23.000000',
}, [
'Live since 20 February at 8:20pm Stop broadcasting',
'Live since 20 February at 8:20pm Stop sending',
'Created from an API call and approved by Alice.',
'Broadcasting stops tomorrow at 11:23pm.'
]),
@@ -1558,15 +1558,15 @@ def test_start_broadcasting(
'status': 'broadcasting',
'finishes_at': '2020-02-22T22:20:20.000000', # 2 mins before now()
}, [
'Broadcast on 20 February at 8:20pm.',
'Prepared by Alice and approved by Bob.',
'Sent on 20 February at 8:20pm.',
'Sent by Alice and approved by Bob.',
'Finished broadcasting today at 10:20pm.'
]),
('.view_previous_broadcast', True, {
'status': 'broadcasting',
'finishes_at': '2020-02-22T22:20:20.000000', # 2 mins before now()
}, [
'Broadcast on 20 February at 8:20pm.',
'Sent on 20 February at 8:20pm.',
'Created from an API call and approved by Alice.',
'Finished broadcasting today at 10:20pm.'
]),
@@ -1574,8 +1574,8 @@ def test_start_broadcasting(
'status': 'completed',
'finishes_at': '2020-02-21T21:21:21.000000',
}, [
'Broadcast on 20 February at 8:20pm.',
'Prepared by Alice and approved by Bob.',
'Sent on 20 February at 8:20pm.',
'Sent by Alice and approved by Bob.',
'Finished broadcasting yesterday at 9:21pm.',
]),
('.view_previous_broadcast', False, {
@@ -1583,8 +1583,8 @@ def test_start_broadcasting(
'cancelled_by_id': sample_uuid,
'cancelled_at': '2020-02-21T21:21:21.000000',
}, [
'Broadcast on 20 February at 8:20pm.',
'Prepared by Alice and approved by Bob.',
'Sent on 20 February at 8:20pm.',
'Sent by Alice and approved by Bob.',
'Stopped by Carol yesterday at 9:21pm.',
]),
('.view_rejected_broadcast', False, {
@@ -1592,7 +1592,7 @@ def test_start_broadcasting(
'updated_at': '2020-02-21T21:21:21.000000',
}, [
'Rejected yesterday at 9:21pm.',
'Prepared by Alice and approved by Bob.',
'Sent by Alice and approved by Bob.',
]),
))
@freeze_time('2020-02-22T22:22:22.000000')
@@ -1662,7 +1662,7 @@ def test_view_broadcast_message_page(
),
(
'cancelled',
'Previous alerts',
'Past alerts',
'.broadcast_dashboard_previous',
),
(
@@ -2086,7 +2086,7 @@ def test_can_approve_own_broadcast_in_trial_mode(
)
link = page.select_one('.banner a.govuk-link.govuk-link--destructive')
assert link.text == 'Cancel this alert'
assert link.text == 'Reject this alert'
assert link['href'] == url_for(
'.reject_broadcast_message',
service_id=SERVICE_ONE_ID,

View File

@@ -509,7 +509,7 @@ def test_navigation_for_services_with_broadcast_permission(
a['href'] for a in page.select('.navigation a')
] == [
'/services/{}/current-alerts'.format(SERVICE_ONE_ID),
'/services/{}/previous-alerts'.format(SERVICE_ONE_ID),
'/services/{}/past-alerts'.format(SERVICE_ONE_ID),
'/services/{}/rejected-alerts'.format(SERVICE_ONE_ID),
'/services/{}/templates'.format(SERVICE_ONE_ID),
'/services/{}/users'.format(SERVICE_ONE_ID),