Show dynamic message when letter fails validation in validation checker - part 2

This commit is contained in:
Pea Tyczynska
2019-10-25 16:53:31 +01:00
parent 5e10ed23a1
commit f12dc823cb
5 changed files with 21 additions and 13 deletions

View File

@@ -2778,7 +2778,7 @@ def test_check_messages_does_not_allow_to_send_letter_longer_than_10_pages(
upload_id=fake_uuid,
_test_page_title=False,
)
assert page.find('h1', {"data-error-type": "Trying to send a letter that's too long"})
assert page.find('h1', {"data-error-type": "letter-too-long"})
assert len(page.select('.letter img')) == 10 # if letter longer than 10 pages, only 10 first pages are displayed
assert not page.select('[type=submit]')
@@ -3148,7 +3148,7 @@ def test_send_one_off_letter_errors_if_letter_longer_than_10_pages(
_test_page_title=False,
)
assert page.find('h1', {"data-error-type": "Trying to send a letter that's too long"})
assert page.find('h1', {"data-error-type": "letter-too-long"})
assert len(page.select('.letter img')) == 10
assert not page.select('[type=submit]')