mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Disambiguate sent and created
At the moment we say that you either ‘add’ an alert or ‘send’ it. This is confusing because: - an alert isn’t received on people’s phones until it’s approved, so this is really when it is ‘sent’ conceptually - an alert can be rejected before anyone receives it, so the UI can say an alert that no-one ever received was sent This commit re-labels things so that the the first part of the process is ‘creating’ the alert. This makes all the permissions nice and distinct from each other. Adding templates and adding alerts feel conceptually quite different things (what are you adding the alert to?).
This commit is contained in:
@@ -1656,7 +1656,7 @@ def test_start_broadcasting(
|
||||
'finishes_at': '2020-02-23T23:23:23.000000',
|
||||
}, [
|
||||
'Live since 20 February at 8:20pm Stop sending',
|
||||
'Sent by Alice and approved by Bob.',
|
||||
'Created by Alice and approved by Bob.',
|
||||
'Broadcasting stops tomorrow at 11:23pm.'
|
||||
]),
|
||||
('.view_current_broadcast', True, {
|
||||
@@ -1672,7 +1672,7 @@ def test_start_broadcasting(
|
||||
'finishes_at': '2020-02-22T22:20:20.000000', # 2 mins before now()
|
||||
}, [
|
||||
'Sent on 20 February at 8:20pm.',
|
||||
'Sent by Alice and approved by Bob.',
|
||||
'Created by Alice and approved by Bob.',
|
||||
'Finished broadcasting today at 10:20pm.'
|
||||
]),
|
||||
('.view_previous_broadcast', True, {
|
||||
@@ -1688,7 +1688,7 @@ def test_start_broadcasting(
|
||||
'finishes_at': '2020-02-21T21:21:21.000000',
|
||||
}, [
|
||||
'Sent on 20 February at 8:20pm.',
|
||||
'Sent by Alice and approved by Bob.',
|
||||
'Created by Alice and approved by Bob.',
|
||||
'Finished broadcasting yesterday at 9:21pm.',
|
||||
]),
|
||||
('.view_previous_broadcast', False, {
|
||||
@@ -1697,7 +1697,7 @@ def test_start_broadcasting(
|
||||
'cancelled_at': '2020-02-21T21:21:21.000000',
|
||||
}, [
|
||||
'Sent on 20 February at 8:20pm.',
|
||||
'Sent by Alice and approved by Bob.',
|
||||
'Created by Alice and approved by Bob.',
|
||||
'Stopped by Carol yesterday at 9:21pm.',
|
||||
]),
|
||||
('.view_rejected_broadcast', False, {
|
||||
@@ -1705,7 +1705,7 @@ def test_start_broadcasting(
|
||||
'updated_at': '2020-02-21T21:21:21.000000',
|
||||
}, [
|
||||
'Rejected yesterday at 9:21pm.',
|
||||
'Sent by Alice and approved by Bob.',
|
||||
'Created by Alice and approved by Bob.',
|
||||
]),
|
||||
))
|
||||
@freeze_time('2020-02-22T22:22:22.000000')
|
||||
|
||||
@@ -213,13 +213,13 @@ def test_should_show_overview_page_for_broadcast_service(
|
||||
assert normalize_spaces(page.select('.user-list-item')[0].text) == (
|
||||
'Test User (you) '
|
||||
'Can Add and edit templates '
|
||||
'Can Add new alerts '
|
||||
'Can Create new alerts '
|
||||
'Can Approve alerts'
|
||||
)
|
||||
assert normalize_spaces(page.select('.user-list-item')[1].text) == (
|
||||
'Test User With Permissions (you) '
|
||||
'Cannot Add and edit templates '
|
||||
'Cannot Add new alerts '
|
||||
'Cannot Create new alerts '
|
||||
'Cannot Approve alerts'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user