mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Medium-level content updates from audit (#497)
This commit is contained in:
@@ -28,14 +28,18 @@ def test_non_logged_in_user_can_see_homepage(
|
||||
'to your users. Try it now if you work in federal, state, or local government.'
|
||||
)
|
||||
|
||||
assert normalize_spaces(page.select_one('#whos-using-notify').text) == (
|
||||
'Who’s using U.S. Notify '
|
||||
'There are 111 organizations and 9,999 services using Notify. '
|
||||
'See the list of services and organizations.'
|
||||
)
|
||||
assert page.select_one('#whos-using-notify a')['href'] == url_for(
|
||||
'main.performance'
|
||||
)
|
||||
# assert normalize_spaces(page.select_one('#whos-using-notify').text) == (
|
||||
# 'Who’s using U.S. Notify '
|
||||
# 'There are 111 organizations and 9,999 services using Notify. '
|
||||
# 'See the list of services and organizations.'
|
||||
# )
|
||||
# assert page.select_one('#whos-using-notify a')['href'] == url_for(
|
||||
# 'main.performance'
|
||||
# )
|
||||
|
||||
# To be removed if we decide to use the "Who’s using Notify" link
|
||||
anchor_tag = page.select_one('#whos-using-notify a')
|
||||
assert anchor_tag is None
|
||||
|
||||
|
||||
def test_logged_in_user_redirects_to_choose_account(
|
||||
|
||||
@@ -9,99 +9,99 @@ from tests.conftest import normalize_spaces
|
||||
|
||||
def _get_example_performance_data():
|
||||
return {
|
||||
"total_notifications": 1_789_000_000,
|
||||
"email_notifications": 1_123_000_000,
|
||||
"sms_notifications": 987_654_321,
|
||||
"live_service_count": random.randrange(1, 1000),
|
||||
"notifications_by_type": [
|
||||
{
|
||||
"date": "2021-02-21",
|
||||
"emails": 1_234_567, "sms": 123_456,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-22",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-23",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-24",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-25",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-26",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-27",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
],
|
||||
"processing_time": [
|
||||
{
|
||||
"date": "2021-02-21",
|
||||
"percentage_under_10_seconds": 99.25
|
||||
},
|
||||
{
|
||||
"date": "2021-02-22",
|
||||
"percentage_under_10_seconds": 95.30
|
||||
},
|
||||
{
|
||||
"date": "2021-02-23",
|
||||
"percentage_under_10_seconds": 95.0
|
||||
},
|
||||
{
|
||||
"date": "2021-02-24",
|
||||
"percentage_under_10_seconds": 100.0
|
||||
},
|
||||
{
|
||||
"date": "2021-02-25",
|
||||
"percentage_under_10_seconds": 99.99
|
||||
},
|
||||
{
|
||||
"date": "2021-02-26",
|
||||
"percentage_under_10_seconds": 100.0
|
||||
},
|
||||
{
|
||||
"date": "2021-02-27",
|
||||
"percentage_under_10_seconds": 98.60
|
||||
},
|
||||
],
|
||||
"services_using_notify": [
|
||||
{
|
||||
"organisation_id": uuid.uuid4(),
|
||||
"organisation_name": "Department of Examples and Patterns",
|
||||
"service_id": uuid.uuid4(),
|
||||
"service_name": "Example service"
|
||||
},
|
||||
{
|
||||
"organisation_id": uuid.uuid4(),
|
||||
"organisation_name": "Department of Examples and Patterns",
|
||||
"service_id": uuid.uuid4(),
|
||||
"service_name": "Example service 2"
|
||||
},
|
||||
{
|
||||
"organisation_id": uuid.uuid4(),
|
||||
"organisation_name": "Department of One Service",
|
||||
"service_id": uuid.uuid4(),
|
||||
"service_name": "Example service 3"
|
||||
},
|
||||
{
|
||||
# On production there should be no live services without an
|
||||
# organisation, but this isn’t always true in people’s local
|
||||
# environments
|
||||
"organisation_id": None,
|
||||
"organisation_name": None,
|
||||
"service_id": uuid.uuid4(),
|
||||
"service_name": "Example service 4"
|
||||
},
|
||||
],
|
||||
"total_notifications": 1_789_000_000,
|
||||
"email_notifications": 1_123_000_000,
|
||||
"sms_notifications": 987_654_321,
|
||||
"live_service_count": random.randrange(1, 1000),
|
||||
"notifications_by_type": [
|
||||
{
|
||||
"date": "2021-02-21",
|
||||
"emails": 1_234_567, "sms": 123_456,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-22",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-23",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-24",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-25",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-26",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
{
|
||||
"date": "2021-02-27",
|
||||
"emails": 1, "sms": 2,
|
||||
},
|
||||
],
|
||||
"processing_time": [
|
||||
{
|
||||
"date": "2021-02-21",
|
||||
"percentage_under_10_seconds": 99.25
|
||||
},
|
||||
{
|
||||
"date": "2021-02-22",
|
||||
"percentage_under_10_seconds": 95.30
|
||||
},
|
||||
{
|
||||
"date": "2021-02-23",
|
||||
"percentage_under_10_seconds": 95.0
|
||||
},
|
||||
{
|
||||
"date": "2021-02-24",
|
||||
"percentage_under_10_seconds": 100.0
|
||||
},
|
||||
{
|
||||
"date": "2021-02-25",
|
||||
"percentage_under_10_seconds": 99.99
|
||||
},
|
||||
{
|
||||
"date": "2021-02-26",
|
||||
"percentage_under_10_seconds": 100.0
|
||||
},
|
||||
{
|
||||
"date": "2021-02-27",
|
||||
"percentage_under_10_seconds": 98.60
|
||||
},
|
||||
],
|
||||
"services_using_notify": [
|
||||
{
|
||||
"organisation_id": uuid.uuid4(),
|
||||
"organisation_name": "Department of Examples and Patterns",
|
||||
"service_id": uuid.uuid4(),
|
||||
"service_name": "Example service"
|
||||
},
|
||||
{
|
||||
"organisation_id": uuid.uuid4(),
|
||||
"organisation_name": "Department of Examples and Patterns",
|
||||
"service_id": uuid.uuid4(),
|
||||
"service_name": "Example service 2"
|
||||
},
|
||||
{
|
||||
"organisation_id": uuid.uuid4(),
|
||||
"organisation_name": "Department of One Service",
|
||||
"service_id": uuid.uuid4(),
|
||||
"service_name": "Example service 3"
|
||||
},
|
||||
{
|
||||
# On production there should be no live services without an
|
||||
# organisation, but this isn’t always true in people’s local
|
||||
# environments
|
||||
"organisation_id": None,
|
||||
"organisation_name": None,
|
||||
"service_id": uuid.uuid4(),
|
||||
"service_name": "Example service 4"
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -123,12 +123,12 @@ def test_should_render_performance_page(
|
||||
assert normalize_spaces(page.select_one('main').text) == (
|
||||
'Performance data '
|
||||
''
|
||||
'Messages sent since May 2016 '
|
||||
'Messages sent since May 2023 '
|
||||
'1.8 billion total '
|
||||
'1.1 billion emails '
|
||||
'987.7 million text messages '
|
||||
''
|
||||
'Messages sent since May 2016 '
|
||||
'Messages sent since May 2023 '
|
||||
'Date Emails Text messages '
|
||||
'26 February 2021 1 2 '
|
||||
'25 February 2021 1 2 '
|
||||
|
||||
Reference in New Issue
Block a user