From 16d92b9a62f9036195ef000a752352727a29271b Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 19 Jun 2017 14:31:22 +0100 Subject: [PATCH] Remove notifications table from notification page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This table will only over show one notification. There’s a better way to display who the recipient was, and what the status of the notification is. --- app/templates/views/notifications/notification.html | 1 - tests/app/main/views/test_notifications.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/templates/views/notifications/notification.html b/app/templates/views/notifications/notification.html index 4a60fd1bd..c219f2321 100644 --- a/app/templates/views/notifications/notification.html +++ b/app/templates/views/notifications/notification.html @@ -16,7 +16,6 @@ {{ template|string }} {{ ajax_block(partials, updates_url, 'status', finished=finished) }} - {{ ajax_block(partials, updates_url, 'notifications', finished=finished) }} {{ page_footer( secondary_link=url_for('.view_template', service_id=current_service.id, template_id=template.id), diff --git a/tests/app/main/views/test_notifications.py b/tests/app/main/views/test_notifications.py index e72396cba..683ef63c4 100644 --- a/tests/app/main/views/test_notifications.py +++ b/tests/app/main/views/test_notifications.py @@ -10,6 +10,7 @@ from app.utils import ( DELIVERED_STATUSES, ) +from tests.app.test_utils import normalize_spaces from tests.conftest import mock_get_notification @@ -27,7 +28,9 @@ def test_notification_status_page_shows_details( ) assert page.find('div', {'class': 'sms-message-wrapper'}).text.strip() == 'service one: template content' - assert ' '.join(page.find('tbody').find('tr').text.split()) == '07123456789 Delivered 1 January at 11:10am' + assert normalize_spaces(page.select('.ajax-block-container p')[0].text) == ( + 'Sent by Test User on 1 January at 11:09am' + ) mock_get_notification.assert_called_with( service_one['id'],