Replace straightforward buttons and links styled like buttons

This replaces the buttons that aren't part of a macro and that we don't
need to write additional styles for with their govuk-frontend equivalent.

There were some links that were styled to look like buttons, so these
have also been replaced with the new govuk-frontend macro.

There was one button on the `choose-account.html` template that was in a
section of code that was never reached - this has been deleted.
This commit is contained in:
Katie Smith
2020-01-30 14:01:13 +00:00
parent a62658ce8c
commit f3bb93f460
29 changed files with 151 additions and 60 deletions

View File

@@ -1,3 +1,4 @@
import re
import urllib
from unittest.mock import Mock
@@ -27,7 +28,7 @@ def test_no_upload_letters_button_without_permission(
):
service_one['permissions'] += extra_permissions
page = client_request.get('main.uploads', service_id=SERVICE_ONE_ID)
assert not page.find('a', text='Upload a letter')
assert not page.find('a', text=re.compile('Upload a letter'))
def test_get_upload_hub_page(
@@ -38,7 +39,7 @@ def test_get_upload_hub_page(
service_one['permissions'] += ['letter', 'upload_letters']
page = client_request.get('main.uploads', service_id=SERVICE_ONE_ID)
assert page.find('h1').text == 'Uploads'
assert page.find('a', text='Upload a letter').attrs['href'] == url_for(
assert page.find('a', text=re.compile('Upload a letter')).attrs['href'] == url_for(
'main.upload_letter', service_id=SERVICE_ONE_ID
)