mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 10:03:21 -04:00
Update tests for new content
This commit is contained in:
@@ -1542,15 +1542,15 @@ 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 since 20 February at 8:20pm Stop broadcasting',
|
'Live since 20 February at 8:20pm Stop sending',
|
||||||
'Prepared by Alice and approved by Bob.',
|
'Sent by Alice and approved by Bob.',
|
||||||
'Broadcasting stops tomorrow at 11:23pm.'
|
'Broadcasting stops tomorrow at 11:23pm.'
|
||||||
]),
|
]),
|
||||||
('.view_current_broadcast', True, {
|
('.view_current_broadcast', True, {
|
||||||
'status': 'broadcasting',
|
'status': 'broadcasting',
|
||||||
'finishes_at': '2020-02-23T23:23:23.000000',
|
'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.',
|
'Created from an API call and approved by Alice.',
|
||||||
'Broadcasting stops tomorrow at 11:23pm.'
|
'Broadcasting stops tomorrow at 11:23pm.'
|
||||||
]),
|
]),
|
||||||
@@ -1558,15 +1558,15 @@ def test_start_broadcasting(
|
|||||||
'status': 'broadcasting',
|
'status': 'broadcasting',
|
||||||
'finishes_at': '2020-02-22T22:20:20.000000', # 2 mins before now()
|
'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.',
|
||||||
'Prepared by Alice and approved by Bob.',
|
'Sent by Alice and approved by Bob.',
|
||||||
'Finished broadcasting today at 10:20pm.'
|
'Finished broadcasting today at 10:20pm.'
|
||||||
]),
|
]),
|
||||||
('.view_previous_broadcast', True, {
|
('.view_previous_broadcast', True, {
|
||||||
'status': 'broadcasting',
|
'status': 'broadcasting',
|
||||||
'finishes_at': '2020-02-22T22:20:20.000000', # 2 mins before now()
|
'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.',
|
'Created from an API call and approved by Alice.',
|
||||||
'Finished broadcasting today at 10:20pm.'
|
'Finished broadcasting today at 10:20pm.'
|
||||||
]),
|
]),
|
||||||
@@ -1574,8 +1574,8 @@ def test_start_broadcasting(
|
|||||||
'status': 'completed',
|
'status': 'completed',
|
||||||
'finishes_at': '2020-02-21T21:21:21.000000',
|
'finishes_at': '2020-02-21T21:21:21.000000',
|
||||||
}, [
|
}, [
|
||||||
'Broadcast on 20 February at 8:20pm.',
|
'Sent on 20 February at 8:20pm.',
|
||||||
'Prepared by Alice and approved by Bob.',
|
'Sent by Alice and approved by Bob.',
|
||||||
'Finished broadcasting yesterday at 9:21pm.',
|
'Finished broadcasting yesterday at 9:21pm.',
|
||||||
]),
|
]),
|
||||||
('.view_previous_broadcast', False, {
|
('.view_previous_broadcast', False, {
|
||||||
@@ -1583,8 +1583,8 @@ def test_start_broadcasting(
|
|||||||
'cancelled_by_id': sample_uuid,
|
'cancelled_by_id': sample_uuid,
|
||||||
'cancelled_at': '2020-02-21T21:21:21.000000',
|
'cancelled_at': '2020-02-21T21:21:21.000000',
|
||||||
}, [
|
}, [
|
||||||
'Broadcast on 20 February at 8:20pm.',
|
'Sent on 20 February at 8:20pm.',
|
||||||
'Prepared by Alice and approved by Bob.',
|
'Sent by Alice and approved by Bob.',
|
||||||
'Stopped by Carol yesterday at 9:21pm.',
|
'Stopped by Carol yesterday at 9:21pm.',
|
||||||
]),
|
]),
|
||||||
('.view_rejected_broadcast', False, {
|
('.view_rejected_broadcast', False, {
|
||||||
@@ -1592,7 +1592,7 @@ def test_start_broadcasting(
|
|||||||
'updated_at': '2020-02-21T21:21:21.000000',
|
'updated_at': '2020-02-21T21:21:21.000000',
|
||||||
}, [
|
}, [
|
||||||
'Rejected yesterday at 9:21pm.',
|
'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')
|
@freeze_time('2020-02-22T22:22:22.000000')
|
||||||
@@ -1662,7 +1662,7 @@ def test_view_broadcast_message_page(
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
'cancelled',
|
'cancelled',
|
||||||
'Previous alerts',
|
'Past alerts',
|
||||||
'.broadcast_dashboard_previous',
|
'.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')
|
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(
|
assert link['href'] == url_for(
|
||||||
'.reject_broadcast_message',
|
'.reject_broadcast_message',
|
||||||
service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ def test_navigation_for_services_with_broadcast_permission(
|
|||||||
a['href'] for a in page.select('.navigation a')
|
a['href'] for a in page.select('.navigation a')
|
||||||
] == [
|
] == [
|
||||||
'/services/{}/current-alerts'.format(SERVICE_ONE_ID),
|
'/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/{}/rejected-alerts'.format(SERVICE_ONE_ID),
|
||||||
'/services/{}/templates'.format(SERVICE_ONE_ID),
|
'/services/{}/templates'.format(SERVICE_ONE_ID),
|
||||||
'/services/{}/users'.format(SERVICE_ONE_ID),
|
'/services/{}/users'.format(SERVICE_ONE_ID),
|
||||||
|
|||||||
Reference in New Issue
Block a user