Pruebas Automaticas para el feature Input document. Correccion de algunos escenarios para el feature Output Document y creacion de una funcion en RestContext para mostrar el error que se da en un escenario en la ejecucion del behat.

This commit is contained in:
Wendy Nestor
2014-01-16 08:57:30 -04:00
parent 2cf5f3e7f0
commit c743965b94
3 changed files with 204 additions and 116 deletions

View File

@@ -1,103 +1,128 @@
@ProcessMakerMichelangelo @RestAPI @ProcessMakerMichelangelo @RestAPI
Feature: Input Documents Resources Feature: Input Documents Resources
Background:
Given that I have a valid access_token
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents #GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
# Get a List Input Documents of a Project # Get a List Input Documents of a Project
Scenario: Get a List Input Documents of a Project Scenario: Get a List Input Documents of a Project
Given that I have a valid access_token
And I request "project/14414793652a5d718b65590036026581/input-documents" And I request "project/14414793652a5d718b65590036026581/input-documents"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
And the json data is an empty array And the response has 0 records
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document #POST /api/1.0/{workspace}/project/{prj_uid}/input-document
# Create a new Input Document for a Project #Create a new Input Document for a Project
Scenario: Create "My InputDocument1" for a Project Scenario Outline: Create a new Inputs Documents for a Project
Given that I have a valid access_token Given POST this data:
And POST this data:
""" """
{ {
"inp_doc_title": "My InputDocument1", "inp_doc_title": "<inp_doc_title>",
"inp_doc_description": "My InputDocument1 DESCRIPTION", "inp_doc_description": "<inp_doc_description>",
"inp_doc_form_needed": "VIRTUAL", "inp_doc_form_needed": "<inp_doc_form_needed>",
"inp_doc_original": "ORIGINAL", "inp_doc_original": "<inp_doc_original>",
"inp_doc_published": "PRIVATE", "inp_doc_published": "<inp_doc_published>",
"inp_doc_versioning": 1, "inp_doc_versioning": "<inp_doc_versioning>",
"inp_doc_destination_path": "", "inp_doc_destination_path": "<inp_doc_destination_path>",
"inp_doc_tags": "INPUT" "inp_doc_tags": "<inp_doc_tags>"
} }
""" """
And I request "project/14414793652a5d718b65590036026581/input-document" And I request "project/<project>/input-document"
And the content type is "application/json"
Then the response status code should be 201 Then the response status code should be 201
And the content type is "application/json"
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "object" And the type is "object"
And store "inp_doc_uid" in session array as variable "indoc1" And store "inp_doc_uid" in session array as variable "inp_doc_uid_<inp_doc_number>"
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document Examples:
# Create a new Input Document for a Project
Scenario: Create "My InputDocument2" for a Project | project | inp_doc_number | inp_doc_title | inp_doc_description | inp_doc_form_needed | inp_doc_original | inp_doc_published | inp_doc_versioning | inp_doc_destination_path | inp_doc_tags": "INPUT |
Given that I have a valid access_token | 14414793652a5d718b65590036026581 | 1 | My InputDocument1 | My InputDocument1 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
And POST this data: | 14414793652a5d718b65590036026581 | 2 | My InputDocument2 | My InputDocument2 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
""" | 14414793652a5d718b65590036026581 | 3 | My InputDocument3 | My InputDocument3 DESCRIPTION | REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
{ | 14414793652a5d718b65590036026581 | 4 | My InputDocument4 | My InputDocument4 DESCRIPTION | VREAL | ORIGINAL | PRIVATE | 1 | | INPUT |
"inp_doc_title": "My InputDocument2", | 14414793652a5d718b65590036026581 | 5 | My InputDocument5 | My InputDocument5 DESCRIPTION | VIRTUAL | COPY | PRIVATE | 1 | | INPUT |
"inp_doc_description": "My InputDocument2 DESCRIPTION", | 14414793652a5d718b65590036026581 | 6 | My InputDocument6 | My InputDocument6 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 0 | | INPUT |
"inp_doc_form_needed": "VIRTUAL", | 14414793652a5d718b65590036026581 | 7 | My InputDocument7 | My InputDocument7 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | /my/path | INPUT |
"inp_doc_original": "ORIGINAL", | 14414793652a5d718b65590036026581 | 8 | My InputDocument8 | My InputDocument8 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
"inp_doc_published": "PRIVATE", | 14414793652a5d718b65590036026581 | 9 | My InputDocument9 | My InputDocument9 DESCRIPTION | REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
"inp_doc_versioning": 1,
"inp_doc_destination_path": "",
"inp_doc_tags": "INPUT"
}
""" #GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
And I request "project/14414793652a5d718b65590036026581/input-document" # Get a List Input Documents of a Project
Scenario: Get a List Input Documents of a Project
And I request "project/14414793652a5d718b65590036026581/input-documents"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 201 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "object" And the type is "array"
And store "inp_doc_uid" in session array as variable "indoc2" And the response has 9 records
#PUT /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid} #PUT /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
# Update an Input Document for a Project # Update an Input Document for a Project
Scenario: Update an Input Document for a Project Scenario Outline: Update an Input Document for a Project
Given that I have a valid access_token Given PUT this data:
And PUT this data:
""" """
{ {
"inp_doc_title": "My InputDocument1 Modified", "inp_doc_title": "<inp_doc_title>",
"inp_doc_description": "My InputDocument1 DESCRIPTION Modified", "inp_doc_description": "<inp_doc_description>",
"inp_doc_form_needed": "VIRTUAL", "inp_doc_form_needed": "<inp_doc_form_needed>",
"inp_doc_original": "ORIGINAL", "inp_doc_original": "<inp_doc_original>",
"inp_doc_published": "PRIVATE" "inp_doc_published": "<inp_doc_published>",
"inp_doc_versioning": "<inp_doc_versioning>",
"inp_doc_destination_path": "<inp_doc_destination_path>",
"inp_doc_tags": "<inp_doc_tags>"
} }
""" """
And that I want to update a resource with the key "indoc1" stored in session array And that I want to update a resource with the key "inp_doc_uid" stored in session array as variable "inp_doc_uid_<inp_doc_number>"
And I request "project/14414793652a5d718b65590036026581/input-document" And I request "project/<project>/input-document"
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
Examples:
| project | inp_doc_number | inp_doc_title | inp_doc_description | inp_doc_form_needed | inp_doc_original | inp_doc_published | inp_doc_versioning | inp_doc_destination_path | inp_doc_tags |
| 14414793652a5d718b65590036026581 | 1 | My InputDocument1 'UPDATE' | My InputDocument1 DESCRIPTION-update| VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 2 | My InputDocument2 'UPDATE' | My InputDocument2 DESCRIPTION-update| VREAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 3 | My InputDocument3 'UPDATE' | My InputDocument3 DESCRIPTION-update| REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
Scenario Outline: Get a input Document
Given that I want to get a resource with the key "inp_doc_uid" stored in session array as variable "inp_doc_uid_<inp_doc_number>"
And I request "project/<project>/input-document"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "object" And the type is "object"
And that "inp_doc_title" is set to "My InputDocument1 Modified" And that "inp_doc_title" is set to "<inp_doc_title>"
And that "inp_doc_description" is set to "<inp_doc_description>"
And that "inp_doc_form_needed" is set to "<inp_doc_form_needed>"
Examples:
| project | inp_doc_number | inp_doc_title | inp_doc_description | inp_doc_form_needed |
| 14414793652a5d718b65590036026581 | 1 | My InputDocument1 'UPDATE' | My InputDocument1 DESCRIPTION-update| VIRTUAL |
| 14414793652a5d718b65590036026581 | 2 | My InputDocument2 'UPDATE' | My InputDocument2 DESCRIPTION-update| VREAL |
| 14414793652a5d718b65590036026581 | 3 | My InputDocument3 'UPDATE' | My InputDocument3 DESCRIPTION-update| REAL |
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
# Get a List Input Documents of a Project
Scenario: Get a List Input Documents of a Project
Given that I have a valid access_token
And I request "project/14414793652a5d718b65590036026581/input-documents"
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the "inp_doc_title" property in row 0 equals "My InputDocument1 Modified"
And the "inp_doc_description" property in row 0 equals "My InputDocument1 DESCRIPTION Modified"
#GET /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid} #GET /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
# Get a single Input Document of a Project # Get a single Input Document of a Project
Scenario: Get a single Input Document of a Project Scenario: Get a single Input Document of a Project
Given that I have a valid access_token Given that I want to get a resource with the key "inp_doc_uid_1" stored in session array
And that I want to get a resource with the key "indoc1" stored in session array
And I request "project/14414793652a5d718b65590036026581/input-document" And I request "project/14414793652a5d718b65590036026581/input-document"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
@@ -106,34 +131,80 @@ Feature: Input Documents Resources
And that "inp_doc_title" is set to "My InputDocument1 Modified" And that "inp_doc_title" is set to "My InputDocument1 Modified"
And that "inp_doc_description" is set to "My InputDocument1 DESCRIPTION Modified" And that "inp_doc_description" is set to "My InputDocument1 DESCRIPTION Modified"
#DELETE /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
# Delete an Input Document of a Project
Scenario: Delete a previously created Input Document
Given that I have a valid access_token
And that I want to delete a resource with the key "indoc1" stored in session array
And I request "project/14414793652a5d718b65590036026581/input-document"
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
#DELETE /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid} #DELETE /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
# Delete an Input Document of a Project # Delete an Input Document of a Project
Scenario: Delete a previously created Input Document Scenario Outline: Delete a previously created Input Document
Given that I have a valid access_token Given that I want to delete a resource with the key "inp_out_uid" stored in session array as variable "inp_doc_uid_<inp_doc_number>"
And that I want to delete a resource with the key "indoc2" stored in session array And I request "project/<project>/input-document"
And I request "project/14414793652a5d718b65590036026581/input-document"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "object"
Examples:
| project | inp_doc_number |
| 14414793652a5d718b65590036026581 | 1 |
| 14414793652a5d718b65590036026581 | 2 |
| 14414793652a5d718b65590036026581 | 3 |
| 14414793652a5d718b65590036026581 | 4 |
| 14414793652a5d718b65590036026581 | 5 |
| 14414793652a5d718b65590036026581 | 6 |
| 14414793652a5d718b65590036026581 | 7 |
| 14414793652a5d718b65590036026581 | 8 |
| 14414793652a5d718b65590036026581 | 9 |
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents #GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
# Get a List Input Documents of a Project # Get a List Input Documents of a Project
Scenario: Get a List Input Documents of a Project Scenario: Get a List Input Documents of a Project
Given that I have a valid access_token
And I request "project/14414793652a5d718b65590036026581/input-documents" And I request "project/14414793652a5d718b65590036026581/input-documents"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
And the json data is an empty array And the response has 0 records
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document
#Create a new Input Document for a Project
Scenario Outline: Create a new Inputs Documents for a Project
Given POST this data:
"""
{
"inp_doc_title": "<inp_doc_title>",
"inp_doc_description": "<inp_doc_description>",
"inp_doc_form_needed": "<inp_doc_form_needed>",
"inp_doc_original": "<inp_doc_original>",
"inp_doc_published": "<inp_doc_published>",
"inp_doc_versioning": "<inp_doc_versioning>",
"inp_doc_destination_path": "<inp_doc_destination_path>",
"inp_doc_tags": "<inp_doc_tags>"
}
"""
And I request "project/<project>/input-document"
Then the response status code should be 400
Examples:
| project | inp_doc_title | inp_doc_description | inp_doc_form_needed | inp_doc_original | inp_doc_published | inp_doc_versioning | inp_doc_destination_path | inp_doc_tags |
| 14414793652a5d718b65590036 | My InputDocument1 | My InputDocument1 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument2 !@#$%^&*€¤½¼‘¾¡²¤³ | My InputDocument2 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument3 | My InputDocument3 !@#$%^&*€¤½¼‘¾¡²¤³| REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument4 | My InputDocument4 DESCRIPTION | VRESAMPLE12334$%#@ | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument5 | My InputDocument5 DESCRIPTION | VIRTUAL | COORIGI 123@#$%$% | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument6 | My InputDocument6 DESCRIPTION | VIRTUAL | ORIGINAL | PRIV123234@##$$%% | 0 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument7 | My InputDocument7 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 87 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument8 | My InputDocument8 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | /my#@$#%/path324@$@@ | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument9 | My InputDocument9 DESCRIPTION | REAL | ORIGINAL | PRIVATE | 1 | | INPU455 @##$$³¤¤ |
| | My InputDocument10 | My InputDocument10 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument11 | My InputDocument11 DESCRIPTION | | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument12 | My InputDocument12 DESCRIPTION | REAL | | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument13 | My InputDocument13 DESCRIPTION | VREAL | ORIGINAL | | 1 | | INPUT |

View File

@@ -16,7 +16,7 @@ Feature: Output Documents Resources
@2: TEST FOR GET SINGLE OUTPUT DOCUMENT /-------------------------------------------------------------------- @2: TEST FOR GET SINGLE OUTPUT DOCUMENT /--------------------------------------------------------------------
Scenario: Get a single output document of a project Scenario: Get a single output document of a project
Given I request "project/4224292655297723eb98691001100052/output-document/270088687529c8ace5e5272077582449" Given I request "project/4224292655297723eb98691001100052/output-document/59969646352d6cd3caa0751003892895"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
@@ -63,14 +63,24 @@ Feature: Output Documents Resources
Examples: Examples:
| project | out_doc_number | 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_current_revision | out_doc_field_mapping | 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 | | project | out_doc_number | 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_current_revision | out_doc_field_mapping | 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 |
| 4224292655297723eb98691001100052 | 1 | Endpoint Old Version | Output Document old version - EndPoint | Output 1 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | | 4224292655297723eb98691001100052 | 1 | Endpoint Old Version | Output Document old version - EndPoint | Output 1 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY | Output Document old version PDF SECURITY | Output 2 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY | Output Document old version PDF SECURITY | Output 2 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 3 | Endpoint Old Version Doc | Output Document old version solo doc | Output 3 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | | | 4224292655297723eb98691001100052 | 3 | Endpoint Old Version Doc | Output Document old version solo doc | Output 3 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 4 | Endpoint Old Version PDF | Output Document old version solo pdf | Output 4 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print | | 4224292655297723eb98691001100052 | 4 | Endpoint Old Version PDF | Output Document old version solo pdf | Output 4 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | 5 | Endpoint New Version | Output Document new version - EndPoint | Output 5 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | | 4224292655297723eb98691001100052 | 5 | Endpoint New Version | Output Document new version - EndPoint | Output 5 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY | Output Document new version PDF SECURITY | Output 6 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | | 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY | Output Document new version PDF SECURITY | Output 6 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 7 | Endpoint New Version Doc | Output Document new version solo doc | Output 7 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | | | 4224292655297723eb98691001100052 | 7 | Endpoint New Version Doc | Output Document new version solo doc | Output 7 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 8 | Endpoint New Version PDF | Output Document new version solo pdf | Output 8 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print | | 4224292655297723eb98691001100052 | 8 | Endpoint New Version PDF | Output Document new version solo pdf | Output 8 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | 9 | test !@#$%^&*€¤¾½²³€¼½¼ | Output Document old version - EndPoint | Output 9 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 10 | Endpoint Old1 | test %^&*¤¾½²³ | Output 10 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 11 | Endpoint Old Version Doc 2 | Output Document old version solo doc | Output @#$%^&*€¤ | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 12 | Endpoint Old Version PDF 3 | Output Document old version solo pdf | Output 11 | sample @#$%^&*€¤ | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | 13 | Endpoint New Version Doc 14 | Output Document new version solo doc | Output 12 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | 324#$%%^^@@ | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 14 | Endpoint New Version 16 | Output Document new version - EndPoint | Output 13 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | 23rg@#$% | | 0 | | | |
| 4224292655297723eb98691001100052 | 15 | Endpoint New Version PDF SECURI17 | Output Document new version PDF SECURITY | Output 14 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | vfv23@$@% | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 16 | Endpoint New Version PDF 19 | Output Document new version solo pdf | Output 15 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample432@$#@$¼€¼½ | sample | print |
| 4224292655297723eb98691001100052 | 17 | Endpoint New Version 20 | Output Document new version - EndPoint | Output 16 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | sample432@$#@$¼€¼½ | |
@4: TEST FOR GET OUTPUT DOCUMENT /-------------------------------------------------------------------- @4: TEST FOR GET OUTPUT DOCUMENT /--------------------------------------------------------------------
@@ -80,7 +90,7 @@ Feature: Output Documents Resources
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "array" And the type is "array"
And the response has 10 records And the response has 19 records
@5: TEST FOR PUT UPDATE OUTPUT DOCUMENT /-------------------------------------------------------------------- @5: TEST FOR PUT UPDATE OUTPUT DOCUMENT /--------------------------------------------------------------------
@@ -123,10 +133,10 @@ Feature: Output Documents Resources
Examples: Examples:
| project | out_doc_number | 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_current_revision | out_doc_field_mapping | 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 | | project | out_doc_number | 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_current_revision | out_doc_field_mapping | 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 |
| 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 | | HTML2PDF | 0 | Letter | 20 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | | 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 | | HTML2PDF | 0 | Letter | 20 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 | | HTML2PDF | 1 | Legal | 20 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\| modify\|copy | | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 | | HTML2PDF | 1 | Legal | 20 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\| modify\|copy |
| 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 | | TCPDF | 0 | Letter | 30 | 20 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | | 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 | | TCPDF | 0 | Letter | 30 | 20 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 | | TCPDF | 1 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy | | 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 | | TCPDF | 1 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy |
@@ -146,10 +156,10 @@ Feature: Output Documents Resources
Examples: Examples:
| project | out_doc_number | out_doc_title | out_doc_description |out_doc_filename | | project | out_doc_number | out_doc_title | out_doc_description |out_doc_filename |
| 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 | | 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 |
| 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 | | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 |
| 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 | | 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 |
| 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 | | 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 |
@@ -167,14 +177,23 @@ Feature: Output Documents Resources
Examples: Examples:
| project | out_doc_number | | project | out_doc_number |
| 4224292655297723eb98691001100052 | 1 | | 4224292655297723eb98691001100052 | 1 |
| 4224292655297723eb98691001100052 | 2 | | 4224292655297723eb98691001100052 | 2 |
| 4224292655297723eb98691001100052 | 3 | | 4224292655297723eb98691001100052 | 3 |
| 4224292655297723eb98691001100052 | 4 | | 4224292655297723eb98691001100052 | 4 |
| 4224292655297723eb98691001100052 | 5 | | 4224292655297723eb98691001100052 | 5 |
| 4224292655297723eb98691001100052 | 6 | | 4224292655297723eb98691001100052 | 6 |
| 4224292655297723eb98691001100052 | 7 | | 4224292655297723eb98691001100052 | 7 |
| 4224292655297723eb98691001100052 | 8 | | 4224292655297723eb98691001100052 | 8 |
| 4224292655297723eb98691001100052 | 9 |
| 4224292655297723eb98691001100052 | 10 |
| 4224292655297723eb98691001100052 | 11 |
| 4224292655297723eb98691001100052 | 12 |
| 4224292655297723eb98691001100052 | 13 |
| 4224292655297723eb98691001100052 | 14 |
| 4224292655297723eb98691001100052 | 15 |
| 4224292655297723eb98691001100052 | 16 |
| 4224292655297723eb98691001100052 | 17 |
@8: TEST FOR GET OUTPUT DOCUMENT /-------------------------------------------------------------------- @8: TEST FOR GET OUTPUT DOCUMENT /--------------------------------------------------------------------
@@ -224,10 +243,6 @@ Feature: Output Documents Resources
Examples: Examples:
| 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_current_revision | out_doc_field_mapping | 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 | | 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_current_revision | out_doc_field_mapping | 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 |
| 4224292655297723eb98691001100052 | test !@#$%^&*€¤¾½²³€¼½¼ | Output Document old version - EndPoint | Output 1 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint Old1 | test %^&*¤¾½²³ | Output 2 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint Old Version Doc 2 | Output Document old version solo doc | Output @#$%^&*€¤ | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint Old Version PDF 3 | Output Document old version solo pdf | Output 4 | sample @#$%^&*€¤ | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | Endpoint New Version 4 | Output Document new version - EndPoint | Output 5 | | @#$%¼¤¾½ | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | | 4224292655297723eb98691001100052 | Endpoint New Version 4 | Output Document new version - EndPoint | Output 5 | | @#$%¼¤¾½ | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT5 | Output Document new version PDF SECURITY | Output 6 | | TCPDF | 34 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT5 | Output Document new version PDF SECURITY | Output 6 | | TCPDF | 34 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint New Version Doc6 | Output Document new version solo doc | Output 7 | | TCPDF | 0 | Legal!@#$$$%^&| 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | | | 4224292655297723eb98691001100052 | Endpoint New Version Doc6 | Output Document new version solo doc | Output 7 | | TCPDF | 0 | Legal!@#$$$%^&| 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | |
@@ -235,17 +250,11 @@ Feature: Output Documents Resources
| 4224292655297723eb98691001100052 | Endpoint New Version8 | Output Document new version - EndPoint | Output 9 | | TCPDF | 1 | Letter | 30 | 30,7.98 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | | 4224292655297723eb98691001100052 | Endpoint New Version8 | Output Document new version - EndPoint | Output 9 | | TCPDF | 1 | Letter | 30 | 30,7.98 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT9 | Output Document new version PDF SECURITY | Output 10 | | TCPDF | 0 | Legal | 25 | 25 | 25,54.98 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT9 | Output Document new version PDF SECURITY | Output 10 | | TCPDF | 0 | Legal | 25 | 25 | 25,54.98 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint New Version Doc10 | Output Document new version solo doc | Output 11 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25,34.09 | WORD | HTML | 0 | | 1 | | | 0 | | | | | 4224292655297723eb98691001100052 | Endpoint New Version Doc10 | Output Document new version solo doc | Output 11 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25,34.09 | WORD | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF 11 | Output Document new version solo pdf | Output 12 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDFtest@#$$ | HTML | 0 | | 1 | | | 1 | sample | sample | print | | 4224292655297723eb98691001100052 | Endpoint New Version PDF 11 | Output Document new version solo pdf | Output 12 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDtest@#$$ | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | Endpoint New Version 12 | Output Document new version - EndPoint | Output 13 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTMLsample2@#| 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI13 | Output Document new version PDF SECURITY | Output 14 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 45,988.566 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI13 | Output Document new version PDF SECURITY | Output 14 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 45,988.566 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint New Version Doc 14 | Output Document new version solo doc | Output 15 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | 324#$%%^^@@ | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF 15 | Output Document new version solo pdf | Output 16 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1,99.98 | | | 1 | sample | sample | print | | 4224292655297723eb98691001100052 | Endpoint New Version PDF 15 | Output Document new version solo pdf | Output 16 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1,99.98 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | Endpoint New Version 16 | Output Document new version - EndPoint | Output 16 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | 23rg@#$% | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI17 | Output Document new version PDF SECURITY | Output 17 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | vfv23@$@% | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint New Version Doc 18 | Output Document new version solo doc | Output 18 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 23454 | | | | | 4224292655297723eb98691001100052 | Endpoint New Version Doc 18 | Output Document new version solo doc | Output 18 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 23454 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF 19 | Output Document new version solo pdf | Output 19 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample432@$#@$¼€¼½ | sample | print | | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI22 | Output Document new version PDF SECURITY | Output 21 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modfy\|cop\|for\|aaa |
| 4224292655297723eb98691001100052 | Endpoint New Version 20 | Output Document new version - EndPoint | Output 20 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | sample432@$#@$¼€¼½ | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI22 | Output Document new version PDF SECURITY | Output 21 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|form\|aaa |
| 4224292655297723eb98691001100052 | | Output Document old version - EndPoint | Output 22 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | | 4224292655297723eb98691001100052 | | Output Document old version - EndPoint | Output 22 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint Old Version PDF SECURITY | | Output 23 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | | 4224292655297723eb98691001100052 | Endpoint Old Version PDF SECURITY | | Output 23 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint Old Version Doc | Output Document old version solo doc | | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | | | 4224292655297723eb98691001100052 | Endpoint Old Version Doc | Output Document old version solo doc | | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | |

View File

@@ -925,8 +925,16 @@ class RestContext extends BehatContext
public function theResponseStatusCodeShouldBe($httpStatus) public function theResponseStatusCodeShouldBe($httpStatus)
{ {
if ((string)$this->_response->getStatusCode() !== $httpStatus) { if ((string)$this->_response->getStatusCode() !== $httpStatus) {
$message="";
if($bodyResponse=json_decode($this->_response->getBody(true))){
if(isset($bodyResponse->error->message)){
$message = $bodyResponse->error->message;
}
}
throw new \Exception('HTTP code does not match ' . $httpStatus . throw new \Exception('HTTP code does not match ' . $httpStatus .
' (actual: ' . $this->_response->getStatusCode() . ")\n\n" ' (actual: ' . $this->_response->getStatusCode() . ") - $message\n\n"
); );
} }
} }