mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Add sent notifications page for caseworkers
The other task that caseworkers have to do (much less often than sending messages) is look at the messages which they’ve sent. The reason for doing this is usually to find a specific message which someone has complained about. This commit adds: - a page where they can do that - a navigation item so they can get to that page We reckon that because this is about finding specific messages, not reporting that it’s fine to mush all the channels (email, text, letter) into one table.
This commit is contained in:
@@ -10,11 +10,17 @@ from freezegun import freeze_time
|
||||
from app.main.views.jobs import get_status_filters, get_time_left
|
||||
from tests.conftest import (
|
||||
SERVICE_ONE_ID,
|
||||
active_caseworking_user,
|
||||
active_user_view_permissions,
|
||||
mock_get_notifications,
|
||||
normalize_spaces,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('user', (
|
||||
active_user_view_permissions,
|
||||
active_caseworking_user,
|
||||
))
|
||||
@pytest.mark.parametrize(
|
||||
"message_type,page_title", [
|
||||
('email', 'Emails'),
|
||||
@@ -72,7 +78,11 @@ def test_can_show_notifications(
|
||||
expected_page_argument,
|
||||
to_argument,
|
||||
expected_to_argument,
|
||||
mocker,
|
||||
user,
|
||||
fake_uuid,
|
||||
):
|
||||
mocker.patch('app.user_api_client.get_user', return_value=user(fake_uuid))
|
||||
if expected_to_argument:
|
||||
response = logged_in_client.post(
|
||||
url_for(
|
||||
|
||||
@@ -159,5 +159,5 @@ def test_caseworkers_get_caseworking_navigation(
|
||||
)
|
||||
page = client_request.get('main.choose_template', service_id=SERVICE_ONE_ID)
|
||||
assert normalize_spaces(page.select_one('#content nav').text) == (
|
||||
'Send a message'
|
||||
'Send a message Sent messages'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user