mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 00:22:14 +01:00
chore: slight improvement of the encrypt feature to be more in line with others features
This commit is contained in:
@@ -183,78 +183,3 @@ Feature: /forms/pdfengines/convert
|
||||
| pdfa | PDF/A-1b | field |
|
||||
Then the response status code should be 200
|
||||
Then the response header "Content-Type" should be "application/pdf"
|
||||
|
||||
Scenario: POST /forms/pdfengines/convert with encryption (user password only)
|
||||
Given I have a default Gotenberg container
|
||||
When I make a "POST" request to Gotenberg at the "/forms/pdfengines/convert" endpoint with the following form data and header(s):
|
||||
| files | testdata/page_1.pdf | file |
|
||||
| pdfa | PDF/A-1b | field |
|
||||
| userPassword | test123 | field |
|
||||
| Gotenberg-Output-Filename | encrypted | header |
|
||||
Then the response status code should be 200
|
||||
Then the response header "Content-Type" should be "application/pdf"
|
||||
Then there should be 1 PDF(s) in the response
|
||||
Then there should be the following file(s) in the response:
|
||||
| encrypted.pdf |
|
||||
Then the "encrypted.pdf" PDF should be encrypted
|
||||
Then the "encrypted.pdf" PDF should be valid "PDF/A-1b" with a tolerance of 1 failed rule(s)
|
||||
|
||||
Scenario: POST /forms/pdfengines/convert with encryption (user and owner passwords)
|
||||
Given I have a default Gotenberg container
|
||||
When I make a "POST" request to Gotenberg at the "/forms/pdfengines/convert" endpoint with the following form data and header(s):
|
||||
| files | testdata/page_1.pdf | file |
|
||||
| pdfa | PDF/A-1b | field |
|
||||
| userPassword | user123 | field |
|
||||
| ownerPassword | owner456 | field |
|
||||
| Gotenberg-Output-Filename | encrypted | header |
|
||||
Then the response status code should be 200
|
||||
Then the response header "Content-Type" should be "application/pdf"
|
||||
Then there should be 1 PDF(s) in the response
|
||||
Then there should be the following file(s) in the response:
|
||||
| encrypted.pdf |
|
||||
Then the "encrypted.pdf" PDF should be encrypted
|
||||
Then the "encrypted.pdf" PDF should be valid "PDF/A-1b" with a tolerance of 1 failed rule(s)
|
||||
|
||||
Scenario: POST /forms/pdfengines/convert with encryption (multiple files)
|
||||
Given I have a default Gotenberg container
|
||||
When I make a "POST" request to Gotenberg at the "/forms/pdfengines/convert" endpoint with the following form data and header(s):
|
||||
| files | testdata/page_1.pdf | file |
|
||||
| files | testdata/page_2.pdf | file |
|
||||
| pdfa | PDF/A-1b | field |
|
||||
| userPassword | test123 | field |
|
||||
| Gotenberg-Output-Filename | encrypted | header |
|
||||
Then the response status code should be 200
|
||||
Then the response header "Content-Type" should be "application/zip"
|
||||
Then there should be the following file(s) in the response:
|
||||
| encrypted.zip |
|
||||
Then the response PDF(s) should be encrypted
|
||||
Then the "encrypted.zip" archive should contain encrypted PDF file(s)
|
||||
|
||||
Scenario: POST /forms/pdfengines/convert with encryption and PDF/UA
|
||||
Given I have a default Gotenberg container
|
||||
When I make a "POST" request to Gotenberg at the "/forms/pdfengines/convert" endpoint with the following form data and header(s):
|
||||
| files | testdata/page_1.pdf | file |
|
||||
| pdfua | true | field |
|
||||
| userPassword | test123 | field |
|
||||
| Gotenberg-Output-Filename | encrypted | header |
|
||||
Then the response status code should be 200
|
||||
Then the response header "Content-Type" should be "application/pdf"
|
||||
Then there should be 1 PDF(s) in the response
|
||||
Then there should be the following file(s) in the response:
|
||||
| encrypted.pdf |
|
||||
Then the "encrypted.pdf" PDF should be encrypted
|
||||
|
||||
Scenario: POST /forms/pdfengines/convert without encryption (empty password)
|
||||
Given I have a default Gotenberg container
|
||||
When I make a "POST" request to Gotenberg at the "/forms/pdfengines/convert" endpoint with the following form data and header(s):
|
||||
| files | testdata/page_1.pdf | file |
|
||||
| pdfa | PDF/A-1b | field |
|
||||
| userPassword | | field |
|
||||
| Gotenberg-Output-Filename | unencrypted | header |
|
||||
Then the response status code should be 200
|
||||
Then the response header "Content-Type" should be "application/pdf"
|
||||
Then there should be 1 PDF(s) in the response
|
||||
Then there should be the following file(s) in the response:
|
||||
| unencrypted.pdf |
|
||||
Then the "unencrypted.pdf" PDF should NOT be encrypted
|
||||
Then the "unencrypted.pdf" PDF should be valid "PDF/A-1b" with a tolerance of 1 failed rule(s)
|
||||
|
||||
Reference in New Issue
Block a user