Add letter validation preview functionality

- add get/post view
- create a pdf upload form
- add a template where user can upload the file
- check boundaries of the letter by calling template-preview
- display banner messages with boundaries validation result
- display pages of the document, with visible boundaries overlay
if the document did not pass validation, and without overlay
if they do pass validation
This commit is contained in:
Pea Tyczynska
2018-09-26 16:42:40 +01:00
parent 68afbcf60e
commit 3be129241f
8 changed files with 93 additions and 2 deletions

View File

@@ -758,3 +758,10 @@ def test_platform_admin_submit_empty_returned_letters(mocker, client, platform_a
assert response.status_code == 200
assert "Cant be empty" in response.get_data(as_text=True)
def test_letter_validation_preview(mocker, client, platform_admin_user):
mock_get_user(mocker, user=platform_admin_user)
client.login(platform_admin_user)
response = client.get(url_for('main.platform_admin_letter_validation_preview'))
assert response.status_code == 200