mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Add letter upload form which redirects to blank preview page
Added a form to upload a single letter. Currently this only uses the form to validate that a file is submitted and that the file is a PDF. If either of these validations fail, the form will display an error. Otherwise, we redirect to a new preview page which just has the filename as the heading for now.
This commit is contained in:
@@ -805,7 +805,7 @@ def test_letter_validation_preview_doesnt_call_template_preview_when_file_not_pd
|
||||
antivirus_scan.assert_not_called()
|
||||
validate_letter.assert_not_called()
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.find('span', class_='error-message').text.strip() == "PDF documents only!"
|
||||
assert page.find('span', class_='error-message').text.strip() == "Letters must be saved as a PDF"
|
||||
|
||||
|
||||
def test_letter_validation_preview_doesnt_call_template_preview_when_file_doesnt_pass_virus_scan(
|
||||
|
||||
Reference in New Issue
Block a user