Make agreement test work with both error message classes

This commit is contained in:
Pea Tyczynska
2020-08-13 11:00:28 +01:00
parent 2252e68d37
commit 1da336827b

View File

@@ -281,6 +281,7 @@ def test_accept_agreement_page_populates(
'on_behalf_of_email': '',
},
[
'Select an option',
'Error: Must be a number',
],
),
@@ -345,7 +346,7 @@ def test_accept_agreement_page_validates(
_expected_status=200,
)
assert [
error.text.strip() for error in page.select('.govuk-error-message')
error.text.strip() for error in page.select('.govuk-error-message, .error-message')
] == expected_errors