mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Remove counts from notification page
The counts on the notification page will only ever show 1 thing. Which
feels like overkill, especially if you’re only sending one-off messages.
It’s also confusing when you come from the job/activity pages which
have one set of numbers to then be confronted with a different set of
numbers.
The important stuff on this page is:
- what the message was
- some meta information about it
Sorry Leo 😢
This commit is contained in:
@@ -13,23 +13,6 @@ from app.utils import (
|
||||
from tests.conftest import mock_get_notification
|
||||
|
||||
|
||||
@pytest.mark.parametrize('multidict_args, expected_statuses', [
|
||||
([], REQUESTED_STATUSES),
|
||||
([('status', '')], REQUESTED_STATUSES),
|
||||
([('status', 'garbage')], REQUESTED_STATUSES),
|
||||
([('status', 'sending')], SENDING_STATUSES),
|
||||
([('status', 'delivered')], DELIVERED_STATUSES),
|
||||
([('status', 'failed')], FAILURE_STATUSES),
|
||||
])
|
||||
def test_status_filters(mocker, multidict_args, expected_statuses):
|
||||
mocker.patch('app.main.views.notifications.current_app')
|
||||
|
||||
args = MultiDict(multidict_args)
|
||||
args['status'] = get_status_arg(args)
|
||||
|
||||
assert sorted(args['status']) == sorted(expected_statuses)
|
||||
|
||||
|
||||
@freeze_time("2016-01-01 11:09:00.061258")
|
||||
def test_notification_status_page_shows_details(
|
||||
client_request,
|
||||
@@ -50,29 +33,3 @@ def test_notification_status_page_shows_details(
|
||||
service_one['id'],
|
||||
fake_uuid
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('notification_status, expected_big_number_vals', [
|
||||
('created', [1, 1, 0, 0]),
|
||||
('sending', [1, 1, 0, 0]),
|
||||
('delivered', [1, 0, 1, 0]),
|
||||
('temporary-failure', [1, 0, 0, 1]),
|
||||
])
|
||||
def test_notification_status_page_shows_correct_numbers(
|
||||
client_request,
|
||||
mocker,
|
||||
service_one,
|
||||
fake_uuid,
|
||||
notification_status,
|
||||
expected_big_number_vals
|
||||
):
|
||||
mock_get_notification(mocker, fake_uuid, notification_status=notification_status)
|
||||
|
||||
page = client_request.get(
|
||||
'main.view_notification',
|
||||
service_id=service_one['id'],
|
||||
notification_id=fake_uuid
|
||||
)
|
||||
|
||||
big_numbers = page.find_all('div', {'class': 'big-number-number'})
|
||||
assert expected_big_number_vals == [int(num.text.strip()) for num in big_numbers]
|
||||
|
||||
Reference in New Issue
Block a user