Test letter too long error banner using exisitng data-error-type attribute

This way we can avoid both creating an id attribute for testing
and testing by content.
This commit is contained in:
Pea Tyczynska
2019-10-24 14:17:01 +01:00
parent 4ca4cef1b3
commit c843940b14
5 changed files with 6 additions and 7 deletions

View File

@@ -543,7 +543,7 @@ def test_view_letter_template_does_not_display_send_button_if_template_over_10_p
)
assert "Send" not in page.text
assert page.select('#letter-too-long')
assert page.find('h1', {"data-error-type": "Trying to send a letter that's too long"})
def test_edit_letter_template_postage_page_displays_correctly(