mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Move back link outside of main where it was used in the page header
The page_header macro includes an optional back link. Since the page_header is always used inside `<main>`, where the back link should not be, this stops setting the back link in the page header and instead sets it in the new `backLink` block.
This commit is contained in:
@@ -1550,8 +1550,7 @@ def test_send_one_off_offers_link_to_upload(
|
||||
template_id=fake_uuid,
|
||||
_follow_redirects=True,
|
||||
)
|
||||
|
||||
back_link = page.select('main a')[0]
|
||||
back_link = page.select_one('.govuk-back-link')
|
||||
link = page.select_one('form a')
|
||||
|
||||
assert back_link.text.strip() == 'Back'
|
||||
@@ -1662,8 +1661,8 @@ def test_link_to_upload_not_offered_when_entering_personalisation(
|
||||
# We’re entering personalisation
|
||||
assert page.select_one('input[type=text]')['name'] == 'placeholder_value'
|
||||
assert page.select_one('label[for=placeholder_value]').text.strip() == 'name'
|
||||
# …but first link on the page is ‘Back’, so not preceeded by ‘Upload’
|
||||
assert page.select_one('main a').text == 'Back'
|
||||
# No ‘Upload’ link shown
|
||||
assert len(page.select('main a')) == 0
|
||||
assert 'Upload' not in page.select_one('main').text
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user