+ f'''pending
{message_count_noun(job.notifications_sending, job_type)}'''
),
- 'sending',
+ 'pending',
job.notifications_sending
],
[
diff --git a/app/main/views/pricing.py b/app/main/views/pricing.py
index 18a3d426a..bdbc0a454 100644
--- a/app/main/views/pricing.py
+++ b/app/main/views/pricing.py
@@ -7,11 +7,13 @@ from notifications_utils.international_billing_rates import (
from app.main import main
from app.main.forms import SearchByNameForm
from app.main.views.sub_navigation_dictionaries import using_notify_nav
+from app.utils.user import user_is_logged_in
CURRENT_SMS_RATE = '1.72'
@main.route('/using-notify/pricing')
+@user_is_logged_in
def pricing():
return render_template(
'views/pricing/index.html',
@@ -26,6 +28,7 @@ def pricing():
@main.route('/pricing/how-to-pay')
+@user_is_logged_in
def how_to_pay():
return render_template(
'views/pricing/how-to-pay.html',
@@ -34,6 +37,7 @@ def how_to_pay():
@main.route('/pricing/billing-details')
+@user_is_logged_in
def billing_details():
if current_user.is_authenticated:
return render_template(
diff --git a/app/main/views/templates.py b/app/main/views/templates.py
index fb84df3e2..84958807c 100644
--- a/app/main/views/templates.py
+++ b/app/main/views/templates.py
@@ -451,7 +451,6 @@ def add_service_template(service_id, template_type, template_folder_id=None):
form.template_content.data,
service_id,
form.subject.data if hasattr(form, 'subject') else None,
- form.process_type.data,
template_folder_id
)
except HTTPError as e:
@@ -525,8 +524,7 @@ def edit_service_template(service_id, template_id):
template['template_type'],
form.template_content.data,
service_id,
- subject,
- form.process_type.data,
+ subject
)
except HTTPError as e:
if e.status_code == 400:
diff --git a/app/notify_client/service_api_client.py b/app/notify_client/service_api_client.py
index 8c55d5157..0fdcc8b85 100644
--- a/app/notify_client/service_api_client.py
+++ b/app/notify_client/service_api_client.py
@@ -163,7 +163,7 @@ class ServiceAPIClient(NotifyAdminAPIClient):
return self.delete(endpoint, data)
@cache.delete('service-{service_id}-templates')
- def create_service_template(self, name, type_, content, service_id, subject=None, process_type='normal',
+ def create_service_template(self, name, type_, content, service_id, subject=None,
parent_folder_id=None):
"""
Create a service template.
@@ -173,7 +173,7 @@ class ServiceAPIClient(NotifyAdminAPIClient):
"template_type": type_,
"content": content,
"service": service_id,
- "process_type": process_type,
+ "process_type": 'normal',
}
if subject:
data.update({
@@ -190,7 +190,7 @@ class ServiceAPIClient(NotifyAdminAPIClient):
@cache.delete('service-{service_id}-templates')
@cache.delete_by_pattern('service-{service_id}-template-*')
def update_service_template(
- self, id_, name, type_, content, service_id, subject=None, process_type=None
+ self, id_, name, type_, content, service_id, subject=None
):
"""
Update a service template.
@@ -206,10 +206,9 @@ class ServiceAPIClient(NotifyAdminAPIClient):
data.update({
'subject': subject
})
- if process_type:
- data.update({
- 'process_type': process_type
- })
+ data.update({
+ 'process_type': 'normal'
+ })
data = _attach_current_user(data)
endpoint = "/service/{0}/template/{1}".format(service_id, id_)
return self.post(endpoint, data)
diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html
index 8e91178f2..67f6f5412 100644
--- a/app/templates/admin_template.html
+++ b/app/templates/admin_template.html
@@ -31,7 +31,7 @@
{% endblock %}
{% block meta %}
{% endblock %}
-
+
{% endblock %}
{% block pageTitle %}
@@ -51,6 +51,16 @@
{% if current_user.is_authenticated %}
{% if current_user.platform_admin %}
{% set navigation = [
+ {
+ "href": url_for('main.get_started'),
+ "text": "Using notify",
+ "active": header_navigation.is_selected('using_notify')
+ },
+ {
+ "href": url_for('main.features'),
+ "text": "Features",
+ "active": header_navigation.is_selected('features')
+ },
{
"href": url_for('main.user_profile'),
"text": current_user.name,
diff --git a/app/templates/partials/count.html b/app/templates/partials/count.html
index 21834648b..001130a1b 100644
--- a/app/templates/partials/count.html
+++ b/app/templates/partials/count.html
@@ -5,9 +5,12 @@
{% if notifications_deleted %}
{% for label, query_param, url, count in counts %}
-
- {{ big_number(count, label, smaller=True) }}
-
+ {% if query_param == 'pending' %}
+
{{ big_number(count, query_param, smaller=True) }}
+ {% else %}
+
{{ big_number(count, label, smaller=True) }}
+ {% endif %}
+
{% endfor %}
{% else %}
diff --git a/app/templates/partials/notifications/status.html b/app/templates/partials/notifications/status.html
index c8124b94b..aa4eb45e5 100644
--- a/app/templates/partials/notifications/status.html
+++ b/app/templates/partials/notifications/status.html
@@ -1,3 +1,4 @@
+
diff --git a/app/templates/views/activity/counts.html b/app/templates/views/activity/counts.html
index b73738966..bf458a1f6 100644
--- a/app/templates/views/activity/counts.html
+++ b/app/templates/views/activity/counts.html
@@ -1,5 +1,4 @@
{% from "components/pill.html" import pill %}
-
{{ pill(
status_filters,
diff --git a/app/templates/views/dashboard/_jobs.html b/app/templates/views/dashboard/_jobs.html
index eaa8d026d..0b1ecad2f 100644
--- a/app/templates/views/dashboard/_jobs.html
+++ b/app/templates/views/dashboard/_jobs.html
@@ -50,7 +50,7 @@
{{ big_number(
item.notifications_sending,
smallest=True,
- label='sending',
+ label='pending',
) }}
diff --git a/app/templates/views/jobs/job.html b/app/templates/views/jobs/job.html
index 193bbc8a6..89ba335b9 100644
--- a/app/templates/views/jobs/job.html
+++ b/app/templates/views/jobs/job.html
@@ -17,6 +17,6 @@
{{ ajax_block(partials, updates_url, 'counts', finished=job.processing_finished) }}
{{ ajax_block(partials, updates_url, 'notifications', finished=job.processing_finished) }}
-
+
{% endblock %}
diff --git a/app/templates/views/notifications.html b/app/templates/views/notifications.html
index 598ab743e..57c1aee9c 100644
--- a/app/templates/views/notifications.html
+++ b/app/templates/views/notifications.html
@@ -25,6 +25,11 @@
'counts'
) }}
+
+
+ Messages will remain in pending state until carrier status is received, typically 5 minutes.
+
+
{% call form_wrapper(
action=url_for('.view_notifications', service_id=current_service.id, message_type=message_type),
class="usa-search margin-bottom-2"
@@ -50,6 +55,10 @@
{% endcall %}
+
+
+
+
{% call form_wrapper(id="search-form") %}
diff --git a/app/templates/views/templates/choose.html b/app/templates/views/templates/choose.html
index 01eb809c5..ffb055a74 100644
--- a/app/templates/views/templates/choose.html
+++ b/app/templates/views/templates/choose.html
@@ -50,7 +50,7 @@
{% if current_user.has_permissions('manage_templates') and current_template_folder_id and user_has_template_folder_permission %}
{% endif %}
diff --git a/app/utils/csv.py b/app/utils/csv.py
index 2bcde2282..a30d47375 100644
--- a/app/utils/csv.py
+++ b/app/utils/csv.py
@@ -62,7 +62,7 @@ def generate_notifications_csv(**kwargs):
original_column_headers = original_upload.column_headers
fieldnames = ['Row number'] + original_column_headers + ['Template', 'Type', 'Job', 'Status', 'Time']
else:
- fieldnames = ['Recipient', 'Reference', 'Template', 'Type', 'Sent by', 'Sent by email', 'Job', 'Status', 'Time']
+ fieldnames = ['Recipient', 'Template', 'Type', 'Sent by', 'Job', 'Status', 'Time']
yield ','.join(fieldnames) + '\n'
@@ -85,11 +85,9 @@ def generate_notifications_csv(**kwargs):
else:
values = [
notification['recipient'],
- notification['client_reference'],
notification['template_name'],
notification['template_type'],
notification['created_by_name'] or '',
- notification['created_by_email_address'] or '',
notification['job_name'] or '',
notification['status'],
notification['created_at']
diff --git a/docs/sprint-goals.md b/docs/sprint-goals.md
index c9cb9abbd..cdb15bc89 100644
--- a/docs/sprint-goals.md
+++ b/docs/sprint-goals.md
@@ -1,6 +1,16 @@
# Notify Sprint Goals Log
-## Sprint: L (6/7/23)
+## Sprint: M (6/22/23)
+
+| | Goals | Impact |
+|-------------|-----------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
+| Engineering | Implement beta.notify.gov [landing page strategy](https://github.com/GSA/notifications-admin/issues/566); work towards completion of ["smart retention quotas"](https://github.com/GSA/notifications-api/issues/295) by [updating the data model](https://github.com/GSA/notifications-api/issues/141) ; document, configure, and test [auto-reply](https://github.com/GSA/notifications-api/issues/271) messages for demo phone number; explore [stress testing](https://github.com/GSA/notifications-api/issues/87) and [end-to-end tests](https://github.com/GSA/notifications-admin/issues/549) | Prepare site for public launch after LATO, make the data model align with our vision and progress towards higher daily messag send capability, enable automated replies for first partner, work towards a more reliable application |
+| UX | Recruit usability testers; kick-off user testing in earnest; [propose new flows and wireframes](https://github.com/GSA/notifications-admin/issues/455) (remains from last sprint); | Gain feedback on usability and functionality, streamline confusing flows and processes |
+| Content | Contribute to the strategy of the newly forming Content sub-team | Clearer understanding of roles and responsibilities on content strategy |
+| Security | Respond to any assessment questions and/or needs | Keep the LATO award timeline as short as possible
+
+
+## Sprint: Lazuli Bunting (6/7/23)
| | Goals | Impact |
|-------------|-----------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
diff --git a/tests/app/main/views/test_activity.py b/tests/app/main/views/test_activity.py
index b76a6491c..cf5238147 100644
--- a/tests/app/main/views/test_activity.py
+++ b/tests/app/main/views/test_activity.py
@@ -520,7 +520,7 @@ def test_get_status_filters_calculates_stats(client_request):
assert {label: count for label, _option, _link, count in ret} == {
'total': 6,
- 'sending': 3,
+ 'pending': 3,
'failed': 2,
'delivered': 1
}
@@ -530,7 +530,7 @@ def test_get_status_filters_in_right_order(client_request):
ret = get_status_filters(Service({'id': 'foo'}), 'sms', STATISTICS)
assert [label for label, _option, _link, _count in ret] == [
- 'total', 'sending', 'delivered', 'failed'
+ 'total', 'pending', 'delivered', 'failed'
]
diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py
index 2e17dfeb9..08286faf9 100644
--- a/tests/app/main/views/test_index.py
+++ b/tests/app/main/views/test_index.py
@@ -71,7 +71,6 @@ def test_robots(client_request):
('bat_phone', {}),
('thanks', {}),
('register', {}),
- ('features_email', {}),
pytest.param('index', {}, marks=pytest.mark.xfail(raises=AssertionError)),
))
@freeze_time('2012-12-12 12:12') # So we don’t go out of business hours
@@ -116,12 +115,17 @@ def test_static_pages(
session['service_id'] = None
request()
- # Check it still works when they sign out
+ # Check it redirects to the login screen when they sign out
client_request.logout()
with client_request.session_transaction() as session:
session['service_id'] = None
session['user_id'] = None
- request()
+ request(
+ _expected_status=302,
+ _expected_redirect='/sign-in?next={}'.format(
+ url_for('main.{}'.format(view))
+ )
+ )
def test_guidance_pages_link_to_service_pages_when_signed_in(
@@ -143,12 +147,12 @@ def test_guidance_pages_link_to_service_pages_when_signed_in(
page = request()
assert not page.select_one(selector)
- # Check it still works when they sign out
+ # Check it redirects to the login screen when they sign out
client_request.logout()
with client_request.session_transaction() as session:
session['service_id'] = None
session['user_id'] = None
- page = request()
+ page = request(_expected_status=302)
assert not page.select_one(selector)
diff --git a/tests/app/main/views/test_jobs.py b/tests/app/main/views/test_jobs.py
index f3b691b6d..5a017f8c9 100644
--- a/tests/app/main/views/test_jobs.py
+++ b/tests/app/main/views/test_jobs.py
@@ -182,7 +182,7 @@ def test_should_show_job_in_progress(
normalize_spaces(link.text)
for link in page.select('.pill a:not(.pill-item--selected)')
] == [
- '10 sending text messages', '0 delivered text messages', '0 failed text messages'
+ '10 pending text messages', '0 delivered text messages', '0 failed text messages'
]
assert page.select_one('p.hint').text.strip() == 'Report is 50% complete…'
@@ -207,7 +207,7 @@ def test_should_show_job_without_notifications(
normalize_spaces(link.text)
for link in page.select('.pill a:not(.pill-item--selected)')
] == [
- '10 sending text messages', '0 delivered text messages', '0 failed text messages'
+ '10 pending text messages', '0 delivered text messages', '0 failed text messages'
]
assert page.select_one('p.hint').text.strip() == 'Report is 50% complete…'
assert page.select_one('tbody').text.strip() == 'No messages to show yet…'
@@ -307,7 +307,7 @@ def test_should_show_old_job(
for column in page.select('main .govuk-grid-column-one-quarter')
] == [
'1 total text messages',
- '1 sending text message',
+ '1 pending',
'0 delivered text messages',
'0 failed text messages',
]
@@ -395,7 +395,7 @@ def test_should_show_updates_for_one_job_as_json(
)
content = json.loads(response.get_data(as_text=True))
- assert 'sending' in content['counts']
+ assert 'pending' in content['counts']
assert 'delivered' in content['counts']
assert 'failed' in content['counts']
assert 'Recipient' in content['notifications']
@@ -432,7 +432,7 @@ def test_should_show_updates_for_scheduled_job_as_json(
)
content = response.json
- assert 'sending' in content['counts']
+ assert 'pending' in content['counts']
assert 'delivered' in content['counts']
assert 'failed' in content['counts']
assert 'Recipient' in content['notifications']
diff --git a/tests/app/main/views/test_notifications.py b/tests/app/main/views/test_notifications.py
index e6d8c2791..6c6cc06f2 100644
--- a/tests/app/main/views/test_notifications.py
+++ b/tests/app/main/views/test_notifications.py
@@ -15,7 +15,8 @@ from tests.conftest import (
@pytest.mark.parametrize('key_type, notification_status, expected_status', [
(None, 'created', 'Sending'),
- (None, 'sending', 'Sending'),
+ (None, 'sending',
+ "Pending. Messages will remain in pending state until carrier status is received, typically 5 minutes."),
(None, 'delivered', 'Delivered'),
(None, 'failed', 'Failed'),
(None, 'temporary-failure', 'Phone not accepting messages right now'),
@@ -23,7 +24,8 @@ from tests.conftest import (
(None, 'technical-failure', 'Technical failure'),
('team', 'delivered', 'Delivered'),
('live', 'delivered', 'Delivered'),
- ('test', 'sending', 'Sending (test)'),
+ ('test', 'sending',
+ "Pending. Messages will remain in pending state until carrier status is received, typically 5 minutes. (test)"),
('test', 'delivered', 'Delivered (test)'),
('test', 'permanent-failure', 'Not delivered (test)'),
])
diff --git a/tests/app/main/views/test_template_folders.py b/tests/app/main/views/test_template_folders.py
index bbc8d089d..d11a97659 100644
--- a/tests/app/main/views/test_template_folders.py
+++ b/tests/app/main/views/test_template_folders.py
@@ -522,7 +522,6 @@ def test_can_create_email_template_with_parent_folder(
'template_content': "here's a burrito 🌯",
'template_type': 'email',
'service': SERVICE_ONE_ID,
- 'process_type': 'normal',
'parent_folder_id': PARENT_FOLDER_ID
}
client_request.post('.add_service_template',
@@ -540,7 +539,6 @@ def test_can_create_email_template_with_parent_folder(
data['template_content'],
SERVICE_ONE_ID,
data['subject'],
- data['process_type'],
data['parent_folder_id'])
diff --git a/tests/app/main/views/test_templates.py b/tests/app/main/views/test_templates.py
index 486e57ef0..ce3150a1b 100644
--- a/tests/app/main/views/test_templates.py
+++ b/tests/app/main/views/test_templates.py
@@ -658,7 +658,7 @@ def test_should_show_page_template_with_priority_select_if_platform_admin(
assert page.select_one('input[name=name]')['value'] == "Two week reminder"
assert "Template <em>content</em> with & entity" in str(page.select_one('textarea'))
- assert "Use priority queue?" in page.text
+ assert "Use priority queue?" not in page.text
mock_get_service_template.assert_called_with(service_one['id'], template_id, None)
@@ -1110,7 +1110,6 @@ def test_should_redirect_when_saving_a_template(
'template_content': content,
'template_type': 'sms',
'service': SERVICE_ONE_ID,
- 'process_type': 'normal',
},
_expected_status=302,
_expected_redirect=url_for(
@@ -1120,7 +1119,7 @@ def test_should_redirect_when_saving_a_template(
),
)
mock_update_service_template.assert_called_with(
- fake_uuid, name, 'sms', content, SERVICE_ONE_ID, None, 'normal',
+ fake_uuid, name, 'sms', content, SERVICE_ONE_ID, None
)
@@ -1140,7 +1139,6 @@ def test_should_edit_content_when_process_type_is_priority_not_platform_admin(
'template_content': "new template content with & entity",
'template_type': 'sms',
'service': SERVICE_ONE_ID,
- 'process_type': 'priority',
},
_expected_status=302,
_expected_redirect=url_for(
@@ -1155,8 +1153,7 @@ def test_should_edit_content_when_process_type_is_priority_not_platform_admin(
'sms',
"new template content with & entity",
SERVICE_ONE_ID,
- None,
- 'priority'
+ None
)
@@ -1420,7 +1417,6 @@ def test_should_redirect_when_saving_a_template_email(
'template_type': 'email',
'service': SERVICE_ONE_ID,
'subject': subject,
- 'process_type': 'normal'
},
_expected_status=302,
_expected_redirect=url_for(
@@ -1430,7 +1426,7 @@ def test_should_redirect_when_saving_a_template_email(
),
)
mock_update_service_template.assert_called_with(
- fake_uuid, name, 'email', content, SERVICE_ONE_ID, subject, 'normal',
+ fake_uuid, name, 'email', content, SERVICE_ONE_ID, subject
)
@@ -1803,7 +1799,6 @@ def test_should_create_sms_template_without_downgrading_unicode_characters(
'template_content': msg,
'template_type': template_type,
'service': SERVICE_ONE_ID,
- 'process_type': 'normal'
},
expected_status=302,
)
@@ -1814,8 +1809,7 @@ def test_should_create_sms_template_without_downgrading_unicode_characters(
msg, # content
ANY, # service_id
ANY, # subject
- ANY, # process_type
- ANY, # parent_folder_id
+ ANY # parent_folder_id
)
diff --git a/tests/app/main/views/uploads/test_upload_hub.py b/tests/app/main/views/uploads/test_upload_hub.py
index 2ca1c45f2..780c0d0c6 100644
--- a/tests/app/main/views/uploads/test_upload_hub.py
+++ b/tests/app/main/views/uploads/test_upload_hub.py
@@ -49,7 +49,7 @@ def test_get_upload_hub_page(
assert normalize_spaces(uploads[0].text.strip()) == (
'some.csv '
'Sent 1 January 2016 at 11:09 '
- '0 sending 8 delivered 2 failed'
+ '0 pending 8 delivered 2 failed'
)
assert uploads[0].select_one('a.file-list-filename-large')['href'] == (
'/services/{}/jobs/job_id_1'.format(SERVICE_ONE_ID)
diff --git a/tests/app/utils/test_csv.py b/tests/app/utils/test_csv.py
index 304de6f8e..18e74a8f0 100644
--- a/tests/app/utils/test_csv.py
+++ b/tests/app/utils/test_csv.py
@@ -77,14 +77,14 @@ def _get_notifications_csv_mock(
@pytest.mark.parametrize('created_by_name, expected_content', [
(
None, [
- 'Recipient,Reference,Template,Type,Sent by,Sent by email,Job,Status,Time\n',
- 'foo@bar.com,ref 1234,foo,sms,,sender@email.gsa.gov,,Delivered,1943-04-19 12:00:00\r\n',
+ 'Recipient,Template,Type,Sent by,Job,Status,Time\n',
+ 'foo@bar.com,foo,sms,,,Delivered,1943-04-19 12:00:00\r\n',
]
),
(
'Anne Example', [
- 'Recipient,Reference,Template,Type,Sent by,Sent by email,Job,Status,Time\n',
- 'foo@bar.com,ref 1234,foo,sms,Anne Example,sender@email.gsa.gov,,Delivered,1943-04-19 12:00:00\r\n',
+ 'Recipient,Template,Type,Sent by,Job,Status,Time\n',
+ 'foo@bar.com,foo,sms,Anne Example,,Delivered,1943-04-19 12:00:00\r\n',
]
),
])