mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Link back to uploaded letters page
If you’ve come to look at a notification via the uploaded letters page then the ‘< back’ link should take you back there, not to the usual activity page.
This commit is contained in:
@@ -160,6 +160,10 @@ def test_get_uploaded_letters(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
letter_print_day='2020-02-02'
|
||||
)
|
||||
assert page.select_one('.govuk-back-link')['href'] == url_for(
|
||||
'main.uploads',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
)
|
||||
assert normalize_spaces(
|
||||
page.select_one('h1').text
|
||||
) == (
|
||||
@@ -192,6 +196,23 @@ def test_get_uploaded_letters(
|
||||
),
|
||||
]
|
||||
|
||||
assert [
|
||||
link['href'] for link in page.select('tbody tr a')
|
||||
] == [
|
||||
url_for(
|
||||
'main.view_notification',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
notification_id='03e34025-be54-4d43-8e6a-fb1ea0fd1f29',
|
||||
from_uploaded_letters='2020-02-02',
|
||||
),
|
||||
url_for(
|
||||
'main.view_notification',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
notification_id='fc090d91-e761-4464-9041-9c4594c96a35',
|
||||
from_uploaded_letters='2020-02-02',
|
||||
),
|
||||
]
|
||||
|
||||
next_page_link = page.select_one('a[rel=next]')
|
||||
prev_page_link = page.select_one('a[rel=previous]')
|
||||
assert next_page_link['href'] == url_for(
|
||||
|
||||
Reference in New Issue
Block a user