mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-25 02:19:12 -04:00
Don’t allow unstyled links
They should always be styled with the `govuk-link` class from GOV.UK Frontend, or another custom class.
This commit is contained in:
@@ -453,7 +453,7 @@ def test_signed_in_existing_user_cannot_use_anothers_invite(
|
||||
assert page.h1.string.strip() == 'You’re not allowed to see this page'
|
||||
flash_banners = page.find_all('div', class_='banner-dangerous')
|
||||
assert len(flash_banners) == 1
|
||||
banner_contents = flash_banners[0].text.strip()
|
||||
banner_contents = normalize_spaces(flash_banners[0].text)
|
||||
assert "You’re signed in as test@user.gov.uk." in banner_contents
|
||||
assert "This invite is for another email address." in banner_contents
|
||||
assert "Sign out and click the link again to accept this invite." in banner_contents
|
||||
|
||||
@@ -3030,6 +3030,7 @@ def client_request(
|
||||
if _test_for_elements_without_class and _expected_status not in (301, 302):
|
||||
for tag, hint in (
|
||||
('p', 'govuk-body'),
|
||||
('a', 'govuk-link govuk-link--no-visited-state'),
|
||||
):
|
||||
element = page.select_one(f'{tag}:not([class])')
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user