Files
luos/features/backend/projects/output_documents/negative_tests_output.feature

57 lines
11 KiB
Gherkin
Raw Normal View History

2014-01-27 10:15:06 -04:00
@ProcessMakerMichelangelo @RestAPI
Feature: Output Documents Negative Tests
Background:
Given that I have a valid access_token
Scenario Outline: Create a new output document for a project with bad parameters (negative tests)
Given POST this data:
"""
{
"out_doc_title": "<out_doc_title>",
"out_doc_description": "<out_doc_description>",
"out_doc_filename": "<out_doc_filename>",
2014-05-15 16:07:53 -04:00
"out_doc_template": "<out_doc_template>",
2014-01-27 10:15:06 -04:00
"out_doc_report_generator": "<out_doc_report_generator>",
"out_doc_landscape": "<out_doc_landscape>",
"out_doc_media": "<out_doc_media>",
"out_doc_left_margin": "<out_doc_left_margin>",
"out_doc_right_margin": "<out_doc_right_margin>",
"out_doc_top_margin": "<out_doc_top_margin>",
"out_doc_bottom_margin": "<out_doc_bottom_margin>",
"out_doc_generate": "<out_doc_generate>",
"out_doc_type": "<out_doc_type>",
"out_doc_versioning": "<out_doc_versioning>",
"out_doc_destination_path": "<out_doc_destination_path>",
"out_doc_tags": "<out_doc_tags>",
"out_doc_pdf_security_enabled": "<out_doc_pdf_security_enabled>",
"out_doc_pdf_security_open_password": "<out_doc_pdf_security_open_password>",
"out_doc_pdf_security_owner_password": "<out_doc_pdf_security_owner_password>",
"out_doc_pdf_security_permissions": "<out_doc_pdf_security_permissions>"
}
"""
And I request "project/<project>/output-document"
Then the response status code should be <error_code>
And the response status message should have the following text "<error_message>"
Examples:
2014-05-15 16:07:53 -04:00
| test_description | project | out_doc_title | out_doc_description |out_doc_filename | out_doc_template | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions | error_code | error_message |
| Invalid PDF Generator | 4224292655297723eb98691001100052 | Endpoint New Version 4 | Output Document new version - EndPoint | Output 5 | Example | @#$%¼¤¾½ | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | 400 | out_doc_report_generator |
| Invalid landscape | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT5 | Output Document new version PDF SECURITY | Output 6 | Example | TCPDF | 34 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | 400 | out_doc_landscape |
| Invalid media type | 4224292655297723eb98691001100052 | Endpoint New Version Doc6 | Output Document new version solo doc | Output 7 | Example | TCPDF | 0 | Legal!@#$$$%^&| 25 | 25 | 25 | 25 | WORD | HTML | 1 | | | 0 | | | | 400 | out_doc_media |
| Invalid document type | 4224292655297723eb98691001100052 | Endpoint New Version PDF7 | Output Document new version solo pdf | Output 8 | Example | TCPDF | 0 | Legal | 25,56.98 | 25 | 25 | 25 | PDF | HTML | 1 | | | 1 | sample | sample | print | 400 | out_doc_left_margin |
| Invalid left margin | 4224292655297723eb98691001100052 | Endpoint New Version8 | Output Document new version - EndPoint | Output 9 | Example | TCPDF | 1 | Letter | 30 | 30,7.98 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | 400 | out_doc_right_margin |
| Invalid right margin | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT9 | Output Document new version PDF SECURITY | Output 10 | Example | TCPDF | 0 | Legal | 25 | 25 | 25,54.98 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | 400 | out_doc_top_margin |
| Invalid top margin | 4224292655297723eb98691001100052 | Endpoint New Version Doc10 | Output Document new version solo doc | Output 11 | Example | TCPDF | 0 | Legal | 25 | 25 | 25 | 25,34.09 | WORD | HTML | 1 | | | 0 | | | | 400 | out_doc_bottom_margin |
| Invalid bottom margin | 4224292655297723eb98691001100052 | Endpoint New Version PDF 11 | Output Document new version solo pdf | Output 12 | Example | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDtest@#$$ | HTML | 1 | | | 1 | sample | sample | print | 400 | out_doc_generate |
| Invalid doc versioning | 4224292655297723eb98691001100052 | Endpoint New Version PDF 15 | Output Document new version solo pdf | Output 16 | Example | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 1,99.98 | | | 1 | sample | sample | print | 400 | out_doc_versioning |
| Invalid doc pdf security enabled | 4224292655297723eb98691001100052 | Endpoint New Version Doc 18 | Output Document new version solo doc | Output 18 | Example | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 1 | | | 23454 | | | | 400 | out_doc_generate |
| Invalid doc pdf security permissions | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI22 | Output Document new version PDF SECURITY | Output 21 | Example | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modfy\|cop\|for\|aaa | 400 | out_doc_pdf_security_permissions |
| Field requered out doc title | 4224292655297723eb98691001100052 | | Output Document old version - EndPoint | Output 22 | Example | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | 400 | out_doc_title |
| Field required out doc filename | 4224292655297723eb98691001100052 | Endpoint Old Version Doc | Output Document old version solo doc | | Example | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 1 | | | 0 | | | | 400 | out_doc_generate |
| Output created with same name | 4224292655297723eb98691001100052 | Endpoint Old Version (base) | Output Document old version solo doc | Output 23 | Example | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 0 | | | | 400 | Output Document with the same name in this process |
2014-01-27 10:15:06 -04:00