Archivos Renombrados
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Input Documents Resources
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
#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
|
||||
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 json data is an empty array
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document
|
||||
# Create a new Input Document for a Project
|
||||
Scenario: Create "My InputDocument1" for a Project
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"inp_doc_title": "My InputDocument1",
|
||||
"inp_doc_description": "My InputDocument1 DESCRIPTION",
|
||||
"inp_doc_form_needed": "VIRTUAL",
|
||||
"inp_doc_original": "ORIGINAL",
|
||||
"inp_doc_published": "PRIVATE",
|
||||
"inp_doc_versioning": 1,
|
||||
"inp_doc_destination_path": "",
|
||||
"inp_doc_tags": "INPUT"
|
||||
}
|
||||
"""
|
||||
And I request "project/14414793652a5d718b65590036026581/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "inp_doc_uid" in session array as variable "inp_doc_uid1"
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document
|
||||
# Create a new Input Document for a Project
|
||||
Scenario: Create "My InputDocument2" for a Project
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"inp_doc_title": "My InputDocument2",
|
||||
"inp_doc_description": "My InputDocument2 DESCRIPTION",
|
||||
"inp_doc_form_needed": "VIRTUAL",
|
||||
"inp_doc_original": "ORIGINAL",
|
||||
"inp_doc_published": "PRIVATE",
|
||||
"inp_doc_versioning": 1,
|
||||
"inp_doc_destination_path": "",
|
||||
"inp_doc_tags": "INPUT"
|
||||
}
|
||||
"""
|
||||
And I request "project/14414793652a5d718b65590036026581/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "inp_doc_uid" in session array as variable "inp_doc_uid2"
|
||||
|
||||
#PUT /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
|
||||
# Update an Input Document for a Project
|
||||
Scenario: Update an Input Document for a Project
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"inp_doc_title": "My InputDocument1 Modified",
|
||||
"inp_doc_description": "My InputDocument1 DESCRIPTION Modified",
|
||||
"inp_doc_form_needed": "VIRTUAL",
|
||||
"inp_doc_original": "ORIGINAL",
|
||||
"inp_doc_published": "PRIVATE"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "inp_doc_uid1" 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"
|
||||
And the type is "object"
|
||||
|
||||
#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
|
||||
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 a single Input Document of a Project
|
||||
Scenario: Get a single Input Document of a Project
|
||||
And that I want to get a resource with the key "inp_doc_uid1" 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"
|
||||
And the type is "object"
|
||||
And that "inp_doc_title" is set to "My InputDocument1 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
|
||||
And that I want to delete a resource with the key "inp_doc_uid1" 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"
|
||||
And the type is "object"
|
||||
|
||||
#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
|
||||
And that I want to delete a resource with the key "inp_doc_uid2" 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"
|
||||
And the type is "object"
|
||||
|
||||
#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
|
||||
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 json data is an empty array
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Input Documents Main Tests
|
||||
Requirements:
|
||||
a workspace with the process 14414793652a5d718b65590036026581 already loaded
|
||||
the process name is "Sample Project #1"
|
||||
there are zero input documents in the process
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: Get the Input Documents List when there are exactly zero input documents
|
||||
Given 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 response has 0 records
|
||||
|
||||
|
||||
Scenario Outline: Create 13 new Input Documents
|
||||
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 201
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "inp_doc_uid" in session array as variable "inp_doc_uid_<inp_doc_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | 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 |
|
||||
| Create with virtual with versioning | 14414793652a5d718b65590036026581 | 1 | My InputDocument1 | My InputDocument2 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
|
||||
| Create with virtual without versioning | 14414793652a5d718b65590036026581 | 2 | My InputDocument2 | My InputDocument2 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 0 | | INPUT |
|
||||
| Create with real with versioning | 14414793652a5d718b65590036026581 | 3 | My InputDocument3 | My InputDocument3 DESCRIPTION | REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
|
||||
| Create with vreal with versioning | 14414793652a5d718b65590036026581 | 4 | My InputDocument4 | My InputDocument4 DESCRIPTION | VREAL | ORIGINAL | PRIVATE | 1 | | INPUT |
|
||||
| Create with virtual, copy and versioning | 14414793652a5d718b65590036026581 | 5 | My InputDocument5 | My InputDocument5 DESCRIPTION | VIRTUAL | COPY | PRIVATE | 1 | | INPUT |
|
||||
| Create with virtual, original and without versioning | 14414793652a5d718b65590036026581 | 6 | My InputDocument6 | My InputDocument6 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 0 | | INPUT |
|
||||
| Create with virtual, versioning and destination path | 14414793652a5d718b65590036026581 | 7 | My InputDocument7 | My InputDocument7 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | /my/path | INPUT |
|
||||
| Create with virtual, without versioning and destination path | 14414793652a5d718b65590036026581 | 8 | My InputDocument8 | My InputDocument8 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 0 | /my/path | INPUT |
|
||||
| Create with real, without versioning and destination path | 14414793652a5d718b65590036026581 | 9 | My InputDocument9 | My InputDocument9 DESCRIPTION | REAL | ORIGINAL | PRIVATE | 0 | /my/path | INPUT |
|
||||
| Create with special characters in inp doc title | 14414793652a5d718b65590036026581 | 10 | My InputDocument10 !@#$%^&*€¤½¼‘¾¡²¤³| My InputDocument10 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
|
||||
| Create with special characters in inp doc description | 14414793652a5d718b65590036026581 | 11 | My InputDocument11 | My InputDocument11 !@#$%^&*€¤½¼‘¾¡²¤³| REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
|
||||
| Create with special characters in inp doc destination path | 14414793652a5d718b65590036026581 | 12 | My InputDocument12 | My InputDocument12 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | /my#@$#%/path324@$@@ | INPUT |
|
||||
| Create with special characters in inp doc tags | 14414793652a5d718b65590036026581 | 13 | My InputDocument13 | My InputDocument13 DESCRIPTION | REAL | ORIGINAL | PRIVATE | 1 | | INPU455 @##$$³¤¤ |
|
||||
|
||||
|
||||
|
||||
|
||||
Scenario: Get the Input Documents list when there are 13 records
|
||||
Given 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 response has 13 records
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Update the Input Documents and then check if the values had changed
|
||||
Given PUT 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 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/<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:
|
||||
|
||||
| test_description | 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 |
|
||||
| Update inp doc title and inp doc description | 14414793652a5d718b65590036026581 | 1 | My InputDocument1 'UPDATE' | My InputDocument1 DESCRIPTION-update| VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
|
||||
| Update inp doc title, inp doc description and inp doc form needed | 14414793652a5d718b65590036026581 | 2 | My InputDocument2 'UPDATE' | My InputDocument2 DESCRIPTION-update| VREAL | ORIGINAL | PRIVATE | 1 | | INPUT |
|
||||
| Update inp doc title, inp doc description and inp doc versioning | 14414793652a5d718b65590036026581 | 3 | My InputDocument3 'UPDATE' | My InputDocument3 DESCRIPTION-update| REAL | ORIGINAL | PRIVATE | 0 | | INPUT |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Get a single Input Document to verify that the were updated correctly in previous step
|
||||
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"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
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>"
|
||||
And that "inp_doc_versioning" is set to "<inp_doc_versioning>"
|
||||
|
||||
Examples:
|
||||
|
||||
| project | inp_doc_number | inp_doc_title | inp_doc_description | inp_doc_form_needed | inp_doc_versioning |
|
||||
| 14414793652a5d718b65590036026581 | 1 | My InputDocument1 'UPDATE' | My InputDocument1 DESCRIPTION-update| VIRTUAL | 1 |
|
||||
| 14414793652a5d718b65590036026581 | 2 | My InputDocument2 'UPDATE' | My InputDocument2 DESCRIPTION-update| VREAL | 1 |
|
||||
| 14414793652a5d718b65590036026581 | 3 | My InputDocument3 'UPDATE' | My InputDocument3 DESCRIPTION-update| REAL | 0 |
|
||||
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Delete all Input documents created previously in this script
|
||||
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 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 |
|
||||
| 14414793652a5d718b65590036026581 | 1 |
|
||||
| 14414793652a5d718b65590036026581 | 2 |
|
||||
| 14414793652a5d718b65590036026581 | 3 |
|
||||
| 14414793652a5d718b65590036026581 | 4 |
|
||||
| 14414793652a5d718b65590036026581 | 5 |
|
||||
| 14414793652a5d718b65590036026581 | 6 |
|
||||
| 14414793652a5d718b65590036026581 | 7 |
|
||||
| 14414793652a5d718b65590036026581 | 8 |
|
||||
| 14414793652a5d718b65590036026581 | 9 |
|
||||
| 14414793652a5d718b65590036026581 | 10 |
|
||||
| 14414793652a5d718b65590036026581 | 11 |
|
||||
| 14414793652a5d718b65590036026581 | 12 |
|
||||
| 14414793652a5d718b65590036026581 | 13 |
|
||||
|
||||
|
||||
|
||||
Scenario: Get the Input Documents List when there are exactly zero input documents after of delete all Input documents
|
||||
Given 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 response has 0 records
|
||||
@@ -0,0 +1,39 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Output Documents Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Create a new input document for a project with bad parameters (negative tests)
|
||||
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 <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | 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 | error_code | error_message |
|
||||
| Create with project invalid | 14414793652a5d718b65590036 | My InputDocument1 | My InputDocument1 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT | 400 | project |
|
||||
| Invalid inp doc from needed | 14414793652a5d718b65590036026581 | My InputDocument4 | My InputDocument4 DESCRIPTION | VRESAMPLE12334$%#@ | ORIGINAL | PRIVATE | 1 | | INPUT | 400 | inp_doc_form_needed |
|
||||
| Invalid inp doc original | 14414793652a5d718b65590036026581 | My InputDocument5 | My InputDocument5 DESCRIPTION | VIRTUAL | COORIGI 123@#$%$% | PRIVATE | 1 | | INPUT | 400 | inp_doc_original |
|
||||
| Invalid inp doc published | 14414793652a5d718b65590036026581 | My InputDocument6 | My InputDocument6 DESCRIPTION | VIRTUAL | ORIGINAL | PRIV123234@##$$%% | 0 | | INPUT | 400 | inp_doc_published |
|
||||
| Invalid inp doc versioning | 14414793652a5d718b65590036026581 | My InputDocument7 | My InputDocument7 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 87 | | INPUT | 400 | inp_doc_versioning |
|
||||
| Create without id of project | | My InputDocument10 | My InputDocument10 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT | 400 | project |
|
||||
| Create without inp doc form needed | 14414793652a5d718b65590036026581 | My InputDocument11 | My InputDocument11 DESCRIPTION | | ORIGINAL | PRIVATE | 1 | | INPUT | 400 | inp_doc_form_needed |
|
||||
| Create without inp doc original | 14414793652a5d718b65590036026581 | My InputDocument12 | My InputDocument12 DESCRIPTION | REAL | | PRIVATE | 1 | | INPUT | 400 | inp_doc_original |
|
||||
| Create without inp doc published | 14414793652a5d718b65590036026581 | My InputDocument13 | My InputDocument13 DESCRIPTION | VREAL | ORIGINAL | | 1 | | INPUT | 400 | inp_doc_published |
|
||||
| Create without inp doc title | 14414793652a5d718b65590036026581 | | My InputDocument1 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT | 400 | inp_doc_title |
|
||||
@@ -0,0 +1,203 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Output Documents Main Tests
|
||||
Requirements:
|
||||
a workspace with the process 4224292655297723eb98691001100052 ("Test Users-Step-Properties End Point") already loaded
|
||||
there are two output documents in the process
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: Get the Output Documents List when there are exactly two output documents
|
||||
Given I request "project/4224292655297723eb98691001100052/output-documents"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 2 records
|
||||
And the "out_doc_title" property in row 0 equals "Endpoint Old Version (base)"
|
||||
And the "out_doc_title" property in row 1 equals "Endpoint New Version (base)"
|
||||
|
||||
|
||||
Scenario: Get a single output document of a project
|
||||
the output document is previously created
|
||||
Given I request "project/4224292655297723eb98691001100052/output-document/59969646352d6cd3caa0751003892895"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And the "out_doc_title" property equals "Endpoint New Version (base)"
|
||||
And the "out_doc_filename" property equals "endpointnewversion"
|
||||
And the "out_doc_report_generator" property equals "TCPDF"
|
||||
|
||||
|
||||
Scenario Outline: Create 17 new Output Documents
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"out_doc_title": "<out_doc_title>",
|
||||
"out_doc_description": "<out_doc_description>",
|
||||
"out_doc_filename": "<out_doc_filename>",
|
||||
"out_doc_template": "<out_doc_template>",
|
||||
"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_current_revision": "<out_doc_current_revision>",
|
||||
"out_doc_field_mapping": "<out_doc_field_mapping>",
|
||||
"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 201
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "out_doc_uid" in session array as variable "out_doc_uid_<out_doc_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | 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 |
|
||||
| Create with old version and both | 4224292655297723eb98691001100052 | 1 | Endpoint Old Version | Output Document old version - EndPoint | Output 1 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
|
||||
| Craate with old version and pdf security | 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 |
|
||||
| Create with old version only doc | 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 | | | |
|
||||
| Create with old version only pdf | 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 |
|
||||
| Create with new version and both | 4224292655297723eb98691001100052 | 5 | Endpoint New Version | Output Document new version - EndPoint | Output 5 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
|
||||
| Create with new version and pdf security | 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 |
|
||||
| Create with new version only doc | 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 | | | |
|
||||
| Create with new version only pdf | 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 |
|
||||
| Create with special characters in out doc title | 4224292655297723eb98691001100052 | 9 | test !@#$%^&*€¤¾½²³€¼½¼ | Output Document old version - EndPoint | Output 9 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
|
||||
| Create with special characters in out doc description | 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 |
|
||||
| Create with special characters in out doc filename | 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 | | | |
|
||||
| Create with special characters in out doc template | 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 |
|
||||
| Create with special characters in out doc field mapping | 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 | | | |
|
||||
| Create with special characters in out doc destination path | 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 | | | |
|
||||
| Create with special characters in out doc tags | 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 |
|
||||
| Create with special characters in out doc pdf security open password | 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 |
|
||||
| Create with special characters in out doc pdf security owner password | 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@$#@$¼€¼½ | |
|
||||
|
||||
|
||||
Scenario: Get the Output Documents list when there are 19 records
|
||||
Given I request "project/4224292655297723eb98691001100052/output-documents"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 19 records
|
||||
|
||||
|
||||
Scenario Outline: Update the Output Documents and then check if the values had changed
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"out_doc_title": "<out_doc_title>",
|
||||
"out_doc_description": "<out_doc_description>",
|
||||
"out_doc_filename": "<out_doc_filename>",
|
||||
"out_doc_template": "<out_doc_template>",
|
||||
"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_current_revision": "<out_doc_current_revision>",
|
||||
"out_doc_field_mapping": "<out_doc_field_mapping>",
|
||||
"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 that I want to update a resource with the key "out_doc_uid" stored in session array as variable "out_doc_uid_<out_doc_number>"
|
||||
And I request "project/<project>/output-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | 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 |
|
||||
| Update out doc title and description | 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 | | | |
|
||||
| Update out doc title and out doc generate | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 | | TCPDF | 1 | Legal | 20 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy |
|
||||
| Update out doc title and description | 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 | | | |
|
||||
| Update out doc title and out doc generate | 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 | | HTML2PDF | 1 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy |
|
||||
|
||||
|
||||
Scenario Outline: Get a single Output Document and check some properties
|
||||
Given that I want to get a resource with the key "out_doc_uid" stored in session array as variable "out_doc_uid_<out_doc_number>"
|
||||
And I request "project/<project>/output-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 "array"
|
||||
And that "out_doc_title" is set to "<out_doc_title>"
|
||||
And that "out_doc_description" is set to "<out_doc_description>"
|
||||
And that "out_doc_filename" is set to "<out_doc_filename>"
|
||||
|
||||
Examples:
|
||||
|
||||
| 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 | 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 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 |
|
||||
|
||||
|
||||
Scenario Outline: Delete all Output documents created previously in this script
|
||||
Given that I want to delete a resource with the key "out_doc_uid" stored in session array as variable "out_doc_uid_<out_doc_number>"
|
||||
And I request "project/<project>/output-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 | out_doc_number |
|
||||
| 4224292655297723eb98691001100052 | 1 |
|
||||
| 4224292655297723eb98691001100052 | 2 |
|
||||
| 4224292655297723eb98691001100052 | 3 |
|
||||
| 4224292655297723eb98691001100052 | 4 |
|
||||
| 4224292655297723eb98691001100052 | 5 |
|
||||
| 4224292655297723eb98691001100052 | 6 |
|
||||
| 4224292655297723eb98691001100052 | 7 |
|
||||
| 4224292655297723eb98691001100052 | 8 |
|
||||
| 4224292655297723eb98691001100052 | 9 |
|
||||
| 4224292655297723eb98691001100052 | 10 |
|
||||
| 4224292655297723eb98691001100052 | 11 |
|
||||
| 4224292655297723eb98691001100052 | 12 |
|
||||
| 4224292655297723eb98691001100052 | 13 |
|
||||
| 4224292655297723eb98691001100052 | 14 |
|
||||
| 4224292655297723eb98691001100052 | 15 |
|
||||
| 4224292655297723eb98691001100052 | 16 |
|
||||
| 4224292655297723eb98691001100052 | 17 |
|
||||
|
||||
|
||||
Scenario: Get the Output Documents List when should be exactly two output documents
|
||||
Given I request "project/4224292655297723eb98691001100052/output-documents"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 2 records
|
||||
And the "out_doc_title" property in row 0 equals "Endpoint Old Version (base)"
|
||||
And the "out_doc_title" property in row 1 equals "Endpoint New Version (base)"
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
@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>",
|
||||
"out_doc_template": "<out_doc_template>",
|
||||
"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_current_revision": "<out_doc_current_revision>",
|
||||
"out_doc_field_mapping": "<out_doc_field_mapping>",
|
||||
"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:
|
||||
|
||||
| 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_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 | error_code | error_message |
|
||||
| Invalid PDF Generator | 4224292655297723eb98691001100052 | Endpoint New Version 4 | Output Document new version - EndPoint | Output 5 | | @#$%¼¤¾½ | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | 400 | out_doc_report_generator |
|
||||
| Invalid landscape | 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 | 400 | out_doc_landscape |
|
||||
| Invalid media type | 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 | | | | 400 | out_doc_media |
|
||||
| Invalid document type | 4224292655297723eb98691001100052 | Endpoint New Version PDF7 | Output Document new version solo pdf | Output 8 | | TCPDF | 0 | Legal | 25,56.98 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print | 400 | out_doc_left_margin |
|
||||
| Invalid left margin | 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 | | | | 400 | out_doc_right_margin |
|
||||
| Invalid right margin | 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 | 400 | out_doc_top_margin |
|
||||
| Invalid top margin | 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 | | | | 400 | out_doc_bottom_margin |
|
||||
| Invalid bottom margin | 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 | 400 | out_doc_generate |
|
||||
| Invalid current revision | 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 | 400 | out_doc_current_revision |
|
||||
| Invalid doc versioning | 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 | 400 | out_doc_versioning |
|
||||
| Invalid doc pdf security enabled | 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 | | | | 400 | out_doc_generate |
|
||||
| Invalid doc pdf security permissions | 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 | 400 | out_doc_pdf_security_permissions |
|
||||
| Field requered out doc title | 4224292655297723eb98691001100052 | | Output Document old version - EndPoint | Output 22 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | 400 | out_doc_title |
|
||||
| Field required out doc filename | 4224292655297723eb98691001100052 | Endpoint Old Version Doc | Output Document old version solo doc | | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | | 400 | out_doc_generate |
|
||||
| Output created with same name | 4224292655297723eb98691001100052 | Endpoint Old Version (base) | Output Document old version solo doc | Output 23 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 0 | | | | 400 | Output Document with the same name in this process |
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: ProcessPermissions Resources
|
||||
|
||||
@1: TEST FOR GET PROCESS PERMISSIONS /----------------------------------------------------------------------
|
||||
Scenario: List all the process permissions (result 0 process permissions)
|
||||
Given that I have a valid access_token
|
||||
And I request "project/251815090529619a99a2bf4013294414/process-permissions"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 0 record
|
||||
|
||||
|
||||
@2: TEST FOR POST PROCESS PERMISSION /----------------------------------------------------------------------
|
||||
Scenario: Create a new process permission
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"tas_uid": "",
|
||||
"usr_uid": "00000000000000000000000000000001",
|
||||
"op_user_relation": "1",
|
||||
"op_obj_type": "ANY",
|
||||
"op_task_source" : "",
|
||||
"op_participate": "0",
|
||||
"op_action": "BLOCK",
|
||||
"op_case_status": "DRAFT"
|
||||
}
|
||||
"""
|
||||
And I request "project/251815090529619a99a2bf4013294414/process-permission"
|
||||
Then the response status code should be 201
|
||||
And store "op_uid" in session array
|
||||
|
||||
@3: TEST FOR GET PROCESS PERMISSIONS /----------------------------------------------------------------------
|
||||
Scenario: List all the process permissions (result 1 process permission)
|
||||
Given that I have a valid access_token
|
||||
And I request "project/251815090529619a99a2bf4013294414/process-permissions"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 1 record
|
||||
|
||||
@4: TEST FOR PUT PROCESS PERMISSION /-----------------------------------------------------------------------
|
||||
Scenario: Update a process permission
|
||||
Given that I have a valid access_token
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"tas_uid": "",
|
||||
"usr_uid": "00000000000000000000000000000001",
|
||||
"op_user_relation": "1",
|
||||
"op_obj_type": "ANY",
|
||||
"op_task_source" : "",
|
||||
"op_participate": "0",
|
||||
"op_action": "VIEW",
|
||||
"op_case_status": "TO_DO"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "op_uid" stored in session array
|
||||
And I request "project/251815090529619a99a2bf4013294414/process-permission"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
@5: TEST FOR GET PROCESS PERMISSION /-----------------------------------------------------------------------
|
||||
Scenario: Get a process permission (with change in "op_action" and "op_case_status")
|
||||
Given that I have a valid access_token
|
||||
And that I want to get a resource with the key "op_uid" stored in session array
|
||||
And I request "project/251815090529619a99a2bf4013294414/process-permission"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "op_action" is set to "VIEW"
|
||||
And that "op_case_status" is set to "TO_DO"
|
||||
|
||||
|
||||
@6: TEST FOR DELETE PROCESS PERMISSION /-----------------------------------------------------------------------
|
||||
Scenario: Delete a process permission
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "op_uid" stored in session array
|
||||
And I request "project/251815090529619a99a2bf4013294414/process-permission"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
@7: TEST FOR GET PROCESS PERMISSIONS /----------------------------------------------------------------------
|
||||
Scenario: List all the process permissions (result 0 process permissions)
|
||||
Given that I have a valid access_token
|
||||
And I request "project/251815090529619a99a2bf4013294414/process-permissions"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 0 record
|
||||
@@ -0,0 +1,239 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Process Permissions Resources Tests
|
||||
Requirements:
|
||||
a workspace with the process 67021149152e27240dc54d2095572343 ("Test Process Permissions") already loaded
|
||||
there are zero Process Permissions in the process
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario: Get a List of current Process Permissions of a project
|
||||
Given I request "project/67021149152e27240dc54d2095572343/process-permissions"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 0 record
|
||||
|
||||
|
||||
Scenario Outline: Create a new Process permission
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"op_case_status": "<op_case_status>",
|
||||
"tas_uid": "<tas_uid>",
|
||||
"op_user_relation": "<op_user_relation>",
|
||||
"usr_uid": "<usr_uid>",
|
||||
"op_task_source" : "<op_task_source>",
|
||||
"op_participate": "<op_participate>",
|
||||
"op_obj_type": "<op_obj_type>",
|
||||
"dynaforms" : "<dynaforms>",
|
||||
"inputs" : "<inputs>",
|
||||
"outputs" : "<outputs>",
|
||||
"op_action": "<op_action>"
|
||||
}
|
||||
"""
|
||||
And I request "project/67021149152e27240dc54d2095572343/process-permission"
|
||||
Then the response status code should be 201
|
||||
And store "op_uid" in session array
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And store "op_uid" in session array as variable "op_uid_<op_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | op_number | op_case_status | tas_uid | op_user_relation| usr_uid | op_task_source | op_participate | op_obj_type | dynaforms | inputs | outputs | op_action |
|
||||
| Create with Status Case All and type All in task 1 | 1 | ALL | | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case All and type Dynaform in task 1 | 2 | ALL | | 1 | 25286582752d56713231082039265791 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859555852e280acd84654094971976 | | | BLOCK |
|
||||
| Create with Status Case All and type Input in task 1 | 3 | ALL | | 2 | 54731929352d56741de9d42002704749 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 52547398752e28118ab06a3068272571 | | BLOCK |
|
||||
| Create with Status Case All and type Output in task 1 | 4 | ALL | | 1 | 32444503652d5671778fd20059078570 | 36792129552e27247a483f6069605623 | 1 | OUTPUT | | | 56569355852e28145a16ec7038754814 | BLOCK |
|
||||
| Create with Status Case All and type Case Note in task 1 | 5 | ALL | | 1 | 16333273052d567284e6766029512960 | 36792129552e27247a483f6069605623 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case All and type Messages in task 1 | 6 | ALL | | 1 | 34289569752d5673d310e82094574281 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
| Create with Status Case Draft and type All in task 2 | 7 | DRAFT | 55416900252e272492318b9024750146 | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case Draft and type Dynaform in task 2 | 8 | DRAFT | 55416900252e272492318b9024750146 | 1 | 11206717452d5673913aa69053050085 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859555852e280acd84654094971976 | | | BLOCK |
|
||||
| Create with Status Case Draft and type Input in task 2 | 9 | DRAFT | 55416900252e272492318b9024750146 | 2 | 53254668952d56744764b08079100881 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 52547398752e28118ab06a3068272571 | | BLOCK |
|
||||
| Create with Status Case Draft and type Output in task 2 | 10 | DRAFT | 55416900252e272492318b9024750146 | 1 | 14093514252d56720bff5b4038518272 | 36792129552e27247a483f6069605623 | 1 | OUTPUT | | | 56569355852e28145a16ec7038754814 | BLOCK |
|
||||
| Create with Status Case Draft and type Case Note in task 2 | 11 | DRAFT | 55416900252e272492318b9024750146 | 1 | 19834612352d5673c73ea89076646062 | 36792129552e27247a483f6069605623 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case Draft and type Messages in task 2 | 12 | DRAFT | 55416900252e272492318b9024750146 | 2 | 89064231952d567452ea008014804965 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
| Create with Status Case To Do and type All in task 1 | 13 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case To Do and type Dynaform in task 1 | 14 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 36116269152d56733b20e86062657385 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859555852e280acd84654094971976 | | | BLOCK |
|
||||
| Create with Status Case To Do and type Input in task 1 | 15 | TO_DO | 36792129552e27247a483f6069605623 | 2 | 97026620152d5673fe945e9005039411 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 52547398752e28118ab06a3068272571 | | BLOCK |
|
||||
| Create with Status Case To Do and type Output in task 1 | 16 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 38102442252d5671a629009013495090 | 36792129552e27247a483f6069605623 | 1 | OUTPUT | | | 56569355852e28145a16ec7038754814 | BLOCK |
|
||||
| Create with Status Case To Do and type Case Note in task 1 | 17 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 44114647252d567264eb9e4061647705 | 36792129552e27247a483f6069605623 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case To Do and type Messages in task 1 | 18 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 44811996752d567110634a1013636964 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
| Create with Status Case Paused and type All in task 2 | 19 | PAUSED | 55416900252e272492318b9024750146 | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case Paused and type Dynaform in task 2 | 20 | PAUSED | 55416900252e272492318b9024750146 | 1 | 50011635952d5673246a575079973262 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 51960945752e280ce802ce7007126361 | | | BLOCK |
|
||||
| Create with Status Case Paused and type Input in task 2 | 21 | PAUSED | 55416900252e272492318b9024750146 | 2 | 65379765252d56743ca1a22048946834 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 61273332352e28125254f97072882826 | | BLOCK |
|
||||
| Create with Status Case Paused and type Output in task 2 | 22 | PAUSED | 55416900252e272492318b9024750146 | 1 | 50562411252d5671e788c02016273245 | 36792129552e27247a483f6069605623 | 1 | OUTPUT | | | 56977080352e281696ead88064880692 | BLOCK |
|
||||
| Create with Status Case Paused and type Case Note in task 2 | 23 | PAUSED | 55416900252e272492318b9024750146 | 1 | 50912153352d5673b0b7e42000221953 | 36792129552e27247a483f6069605623 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case Paused and type Messages in task 2 | 24 | PAUSED | 55416900252e272492318b9024750146 | 2 | 81090718052d567492e1852081697260 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
| Create with Status Case Completed and type All in task 3 | 25 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 00000000000000000000000000000001 | 55416900252e272492318b9024750146 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case Completed and type Dynaform in task 3 | 26 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 62511352152d5673bba9cd4062743508 | 55416900252e272492318b9024750146 | 1 | DYNAFORM | 51960945752e280ce802ce7007126361 | | | BLOCK |
|
||||
| Create with Status Case Completed and type Input in task 3 | 27 | COMPLETED | 64296230152e2724a8b3589070508795 | 2 | 47593815252d5673e93e048007155938 | 55416900252e272492318b9024750146 | 0 | INPUT | | 61273332352e28125254f97072882826 | | BLOCK |
|
||||
| Create with Status Case Completed and type Output in task 3 | 28 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 69125570352d56720061f83026430750 | 55416900252e272492318b9024750146 | 1 | OUTPUT | | | 56977080352e281696ead88064880692 | BLOCK |
|
||||
| Create with Status Case Completed and type Case Note in task 3 | 29 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 69578334752d5672aabb946025792134 | 55416900252e272492318b9024750146 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case Completed and type Messages in task 3 | 30 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 73005191052d56727901138030694610 | 55416900252e272492318b9024750146 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
|
||||
|
||||
|
||||
Scenario: Get a List of current Process Permissions of a project when there are exactly xxxxxx Process Permissions
|
||||
Given I request "project/67021149152e27240dc54d2095572343/process-permissions"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 30 records
|
||||
|
||||
|
||||
Scenario Outline: Get a Single Process Permissions of a project when the Process Permissions is previously created
|
||||
|
||||
Given that I want to get a resource with the key "op_uid" stored in session array as variable "op_uid_<op_number>"
|
||||
And I request "project/67021149152e27240dc54d2095572343/process-permission"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And the "USR_UID" property equals "<usr_uid>"
|
||||
And the "OP_USER_RELATION" property equals "<op_user_relation>"
|
||||
And the "OP_OBJ_TYPE" property equals "<op_obj_type>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | op_number | op_case_status | tas_uid | op_user_relation| usr_uid | op_task_source | op_participate | op_obj_type | dynaforms | inputs | outputs | op_action |
|
||||
| Create with Status Case All and type All in task 1 | 1 | ALL | | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case All and type Dynaform in task 1 | 2 | ALL | | 1 | 25286582752d56713231082039265791 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859555852e280acd84654094971976 | | | BLOCK |
|
||||
| Create with Status Case All and type Input in task 1 | 3 | ALL | | 2 | 54731929352d56741de9d42002704749 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 52547398752e28118ab06a3068272571 | | BLOCK |
|
||||
| Create with Status Case All and type Output in task 1 | 4 | ALL | | 1 | 32444503652d5671778fd20059078570 | 36792129552e27247a483f6069605623 | 1 | OUTPUT | | | 56569355852e28145a16ec7038754814 | BLOCK |
|
||||
| Create with Status Case All and type Case Note in task 1 | 5 | ALL | | 1 | 16333273052d567284e6766029512960 | 36792129552e27247a483f6069605623 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case All and type Messages in task 1 | 6 | ALL | | 1 | 34289569752d5673d310e82094574281 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
| Create with Status Case Draft and type All in task 2 | 7 | DRAFT | 55416900252e272492318b9024750146 | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case Draft and type Dynaform in task 2 | 8 | DRAFT | 55416900252e272492318b9024750146 | 1 | 11206717452d5673913aa69053050085 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859555852e280acd84654094971976 | | | BLOCK |
|
||||
| Create with Status Case Draft and type Input in task 2 | 9 | DRAFT | 55416900252e272492318b9024750146 | 2 | 53254668952d56744764b08079100881 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 52547398752e28118ab06a3068272571 | | BLOCK |
|
||||
| Create with Status Case Draft and type Output in task 2 | 10 | DRAFT | 55416900252e272492318b9024750146 | 1 | 14093514252d56720bff5b4038518272 | 36792129552e27247a483f6069605623 | 1 | OUTPUT | | | 56569355852e28145a16ec7038754814 | BLOCK |
|
||||
| Create with Status Case Draft and type Case Note in task 2 | 11 | DRAFT | 55416900252e272492318b9024750146 | 1 | 19834612352d5673c73ea89076646062 | 36792129552e27247a483f6069605623 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case Draft and type Messages in task 2 | 12 | DRAFT | 55416900252e272492318b9024750146 | 2 | 89064231952d567452ea008014804965 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
| Create with Status Case To Do and type All in task 1 | 13 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case To Do and type Dynaform in task 1 | 14 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 36116269152d56733b20e86062657385 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859555852e280acd84654094971976 | | | BLOCK |
|
||||
| Create with Status Case To Do and type Input in task 1 | 15 | TO_DO | 36792129552e27247a483f6069605623 | 2 | 97026620152d5673fe945e9005039411 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 52547398752e28118ab06a3068272571 | | BLOCK |
|
||||
| Create with Status Case To Do and type Output in task 1 | 16 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 38102442252d5671a629009013495090 | 36792129552e27247a483f6069605623 | 1 | OUTPUT | | | 56569355852e28145a16ec7038754814 | BLOCK |
|
||||
| Create with Status Case To Do and type Case Note in task 1 | 17 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 44114647252d567264eb9e4061647705 | 36792129552e27247a483f6069605623 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case To Do and type Messages in task 1 | 18 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 44811996752d567110634a1013636964 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
| Create with Status Case Paused and type All in task 2 | 19 | PAUSED | 55416900252e272492318b9024750146 | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case Paused and type Dynaform in task 2 | 20 | PAUSED | 55416900252e272492318b9024750146 | 1 | 50011635952d5673246a575079973262 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 51960945752e280ce802ce7007126361 | | | BLOCK |
|
||||
| Create with Status Case Paused and type Input in task 2 | 21 | PAUSED | 55416900252e272492318b9024750146 | 2 | 65379765252d56743ca1a22048946834 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 61273332352e28125254f97072882826 | | BLOCK |
|
||||
| Create with Status Case Paused and type Output in task 2 | 22 | PAUSED | 55416900252e272492318b9024750146 | 1 | 50562411252d5671e788c02016273245 | 36792129552e27247a483f6069605623 | 1 | OUTPUT | | | 56977080352e281696ead88064880692 | BLOCK |
|
||||
| Create with Status Case Paused and type Case Note in task 2 | 23 | PAUSED | 55416900252e272492318b9024750146 | 1 | 50912153352d5673b0b7e42000221953 | 36792129552e27247a483f6069605623 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case Paused and type Messages in task 2 | 24 | PAUSED | 55416900252e272492318b9024750146 | 2 | 81090718052d567492e1852081697260 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
| Create with Status Case Completed and type All in task 3 | 25 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 00000000000000000000000000000001 | 55416900252e272492318b9024750146 | 1 | ANY | | | | VIEW |
|
||||
| Create with Status Case Completed and type Dynaform in task 3 | 26 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 62511352152d5673bba9cd4062743508 | 55416900252e272492318b9024750146 | 1 | DYNAFORM | 51960945752e280ce802ce7007126361 | | | BLOCK |
|
||||
| Create with Status Case Completed and type Input in task 3 | 27 | COMPLETED | 64296230152e2724a8b3589070508795 | 2 | 47593815252d5673e93e048007155938 | 55416900252e272492318b9024750146 | 0 | INPUT | | 61273332352e28125254f97072882826 | | BLOCK |
|
||||
| Create with Status Case Completed and type Output in task 3 | 28 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 69125570352d56720061f83026430750 | 55416900252e272492318b9024750146 | 1 | OUTPUT | | | 56977080352e281696ead88064880692 | BLOCK |
|
||||
| Create with Status Case Completed and type Case Note in task 3 | 29 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 69578334752d5672aabb946025792134 | 55416900252e272492318b9024750146 | 0 | CASES_NOTES | | | | BLOCK |
|
||||
| Create with Status Case Completed and type Messages in task 3 | 30 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 73005191052d56727901138030694610 | 55416900252e272492318b9024750146 | 0 | MSGS_HISTORY | | | | BLOCK |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Update the Process Permission and then check if the values had changed
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"tas_uid": "<tas_uid>",
|
||||
"usr_uid": "<usr_uid>",
|
||||
"op_user_relation": "<op_user_relation>",
|
||||
"op_obj_type": "<op_obj_type>",
|
||||
"op_task_source" : "<op_task_source>",
|
||||
"op_participate": "<op_participate>",
|
||||
"op_action": "<op_action>",
|
||||
"op_case_status": "<op_case_status>"
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
And that I want to update a resource with the key "op_uid" stored in session array as variable "op_uid_<op_number>"
|
||||
And I request "project/67021149152e27240dc54d2095572343/process-permission"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | op_number | op_case_status | tas_uid | op_user_relation| usr_uid | op_task_source | op_participate | op_obj_type | op_action |
|
||||
| Update Status Case Completed and type All in task 3 | 6 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 00000000000000000000000000000001 | 55416900252e272492318b9024750146 | 1 | ANY | VIEW |
|
||||
| Update Status Case Paused and type Messages in task 2 | 7 | PAUSED | 55416900252e272492318b9024750146 | 2 | 81090718052d567492e1852081697260 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | BLOCK |
|
||||
| Update Status Case Paused and type All in task 2 | 12 | PAUSED | 55416900252e272492318b9024750146 | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | VIEW |
|
||||
| Update Status Case To Do and type Messages in task 1 | 13 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 44811996752d567110634a1013636964 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | BLOCK |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Get a Single Process Permissions and check some properties
|
||||
|
||||
|
||||
Given that I want to get a resource with the key "op_uid" stored in session array as variable "op_uid_<op_number>"
|
||||
And I request "project/67021149152e27240dc54d2095572343/process-permission"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And the "OP_CASE_STATUS" property equals "<op_case_status>"
|
||||
And the "TAS_UID" property equals "<tas_uid>"
|
||||
And the "OP_USER_RELATION" property equals "<op_user_relation>"
|
||||
And the "USR_UID" property equals "<usr_uid>"
|
||||
And the "OP_TASK_SOURCE" property equals "<op_task_source>"
|
||||
And the "OP_PARTICIPATE" property equals "<op_participate>"
|
||||
And the "OP_OBJ_TYPE" property equals "<op_obj_type>"
|
||||
And the "OP_ACTION" property equals "<op_action>"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | op_number | op_case_status | tas_uid | op_user_relation| usr_uid | op_task_source | op_participate | op_obj_type | op_action |
|
||||
| Update Status Case Completed and type All in task 3 | 6 | COMPLETED | 64296230152e2724a8b3589070508795 | 1 | 00000000000000000000000000000001 | 55416900252e272492318b9024750146 | 1 | ANY | VIEW |
|
||||
| Update Status Case Paused and type Messages in task 2 | 7 | PAUSED | 55416900252e272492318b9024750146 | 2 | 81090718052d567492e1852081697260 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | BLOCK |
|
||||
| Update Status Case Paused and type All in task 2 | 12 | PAUSED | 55416900252e272492318b9024750146 | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | VIEW |
|
||||
| Update Status Case To Do and type Messages in task 1 | 13 | TO_DO | 36792129552e27247a483f6069605623 | 1 | 44811996752d567110634a1013636964 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | BLOCK |
|
||||
|
||||
|
||||
Scenario Outline: Delete all Process Supervisor created previously in this script
|
||||
Given that I want to delete a resource with the key "op_uid" stored in session array as variable "op_uid_<op_number>"
|
||||
And I request "project/67021149152e27240dc54d2095572343/process-permission"
|
||||
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:
|
||||
|
||||
| op_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
| 3 |
|
||||
| 4 |
|
||||
| 5 |
|
||||
| 6 |
|
||||
| 7 |
|
||||
| 8 |
|
||||
| 9 |
|
||||
| 10 |
|
||||
| 11 |
|
||||
| 12 |
|
||||
| 13 |
|
||||
| 14 |
|
||||
| 15 |
|
||||
| 16 |
|
||||
| 17 |
|
||||
| 18 |
|
||||
| 19 |
|
||||
| 20 |
|
||||
| 21 |
|
||||
| 22 |
|
||||
| 23 |
|
||||
| 24 |
|
||||
| 25 |
|
||||
| 26 |
|
||||
| 27 |
|
||||
| 28 |
|
||||
| 29 |
|
||||
| 30 |
|
||||
|
||||
Scenario: Get a List of current Process Permissions of a project
|
||||
Given I request "project/67021149152e27240dc54d2095572343/process-permissions"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 0 record
|
||||
@@ -0,0 +1,247 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Process supervisor Resources
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Get a List of current process supervisors of a project
|
||||
Given I request "project/<project>/process-supervisors"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| test_description | project | records |
|
||||
| List current unique process supervisor | 85794888452ceeef3675164057928956 | 0 |
|
||||
|
||||
|
||||
Scenario Outline: Get a specific process supervisor details of a project
|
||||
Given I request "project/<project>/process-supervisor/<pu_uid>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| test_description | project | pu_uid |
|
||||
| Get the supervisor details | 85794888452ceeef3675164057928956 | 70662784652cef0878516f7085532841 |
|
||||
|
||||
|
||||
Scenario Outline: Get a List of available process supervisor of a project
|
||||
Given I request "project/<project>/available-process-supervisors"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| test_description | project | records |
|
||||
| List users and groups available to be supervisors | 85794888452ceeef3675164057928956 | 24 |
|
||||
|
||||
|
||||
Scenario Outline: Get a List of available groups process supervisor of a project
|
||||
Given I request "project/<project>/available-process-supervisors?obj_type=group"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| test_description | project | records |
|
||||
| List the 23 groups available to be supervisors | 85794888452ceeef3675164057928956 | 23 |
|
||||
|
||||
|
||||
Scenario Outline: Get a List of available users elegible as process supervisor
|
||||
Given I request "project/<project>/available-process-supervisors?obj_type=user"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| test_description | project | records |
|
||||
| List the unique admin user available to be supervisor | 85794888452ceeef3675164057928956 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Get a List of dynaforms assigned to a process supervisor
|
||||
Given I request "project/<project>/process-supervisor/dynaforms"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| test_description | project | records |
|
||||
| List the 2 pre-assigned dynaforms #1 & #2 | 85794888452ceeef3675164057928956 | 2 |
|
||||
|
||||
|
||||
Scenario Outline: Get a specific dynaform detail assigned to a process supervisor
|
||||
Given I request "project/<project>/process-supervisor/dynaform/<pud_uid>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| test_description | project | pud_uid |
|
||||
| Get details of the first assigend dynaform | 85794888452ceeef3675164057928956 | 56779160652cef174108c76074755720 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Get a List of available dynaforms to be assigned to a process supervisor
|
||||
Given I request "project/<project>/process-supervisor/available-dynaforms"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| test_description | project | records |
|
||||
| Get a list of available dynaforms to be assigned | 85794888452ceeef3675164057928956 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Get a List of assigend input-documents to a process supervisor
|
||||
Given I request "project/<project>/process-supervisor/input-documents"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| test_description | project | records |
|
||||
| Get a list of pre-assigned input doucments | 85794888452ceeef3675164057928956 | 2 |
|
||||
|
||||
|
||||
Scenario Outline: Get a List of available input-documents to be assigned to a process supervisor
|
||||
Given I request "project/<project>/process-supervisor/available-input-documents"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| test_description | project | records |
|
||||
| Get a list of 1 record of available input documents | 85794888452ceeef3675164057928956 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Get a specific input document assigned to a process supervisor
|
||||
Given I request "project/<project>/process-supervisor/input-document/<pui_uid>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| test_description | project | pui_uid |
|
||||
| Get details of assigend input document | 85794888452ceeef3675164057928956 | 64558052052d8a715de8936029381436 |
|
||||
|
||||
|
||||
Scenario Outline: Assign a user and a group as process supervisors
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"pu_type": "<pu_type>",
|
||||
"usr_uid": "<usr_uid>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/process-supervisor"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "pu_uid" in session array as variable "pu_uid_<pu_number>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | pu_number | pu_type | usr_uid |
|
||||
| Assign a group as Supervisor | 85794888452ceeef3675164057928956 | 1 | GROUP_SUPERVISOR | 54731929352d56741de9d42002704749 |
|
||||
| Assign a user as Supervisor | 85794888452ceeef3675164057928956 | 2 | SUPERVISOR | 00000000000000000000000000000001 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Assign a dynaform to a process supervisor
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"dyn_uid": "<dyn_uid>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/process-supervisor/dynaform"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "pud_uid" in session array as variable "pud_uid_<pud_number>"
|
||||
|
||||
|
||||
Examples:
|
||||
| test_description | project | pud_number | dyn_uid |
|
||||
| Assign a dynaform # 3 for Supervisor | 85794888452ceeef3675164057928956 | 1 | 92562207752ceef36c7d874048012431 |
|
||||
|
||||
|
||||
Scenario Outline: Assign an input document to a process supervisor
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"inp_doc_uid": "<inp_doc_uid>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/process-supervisor/input-document"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "pui_uid" in session array as variable "pui_inpdoc_uid_<dps_number>"
|
||||
|
||||
|
||||
|
||||
Examples:
|
||||
| test_description | project | dps_number | inp_doc_uid |
|
||||
| Assign an Input document for Supervisor | 85794888452ceeef3675164057928956 | 1 | 30053187052ddfa4e1fdca4001721051 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Delete a process supervisor
|
||||
Given that I want to delete a resource with the key "pu_uid" stored in session array as variable "pu_uid_<pu_number>"
|
||||
And I request "project/<project>/process-supervisor"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
| test_description | project | pu_number |
|
||||
| Remove first assigned supervisor | 85794888452ceeef3675164057928956 | 1 |
|
||||
| Remove second assigned supervisor | 85794888452ceeef3675164057928956 | 2 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Delete a input-document process supervisor of a project
|
||||
Given that I want to delete a resource with the key "pui_uid" stored in session array as variable "pui_inpdoc_uid_<dps_number>"
|
||||
And I request "project/85794888452ceeef3675164057928956/process-supervisor/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
| test_description | project | dps_number |
|
||||
| Assign an Input document for Supervisor | 85794888452ceeef3675164057928956 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Delete an dynaform to a process supervisor
|
||||
Given that I want to delete a resource with the key "pui_uid" stored in session array as variable "pud_uid_<pud_number>"
|
||||
And I request "project/<project>/process-supervisor/dynaform"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
| test_description | project | pud_number |
|
||||
| Delete dynaform # 3 for Supervisor | 85794888452ceeef3675164057928956 | 1 |
|
||||
@@ -0,0 +1,63 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Process Supervisor Negative tests
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Assign a user and a group to a process supervisor for a project with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"pu_type": "<pu_type>",
|
||||
"usr_uid": "<usr_uid>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/process-supervisor"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | pu_type | usr_uid | error_code | error_message |
|
||||
| Invalid pu_type | 85794888452ceeef3675164057928956 | GROUP_USER_DEPARTAMENT | 46138556052cda43a051110007756836 | 400 | pu_type |
|
||||
| Invalid usr_uid | 85794888452ceeef3675164057928956 | SUPERVISOR | 0000000000000gtr@#$0000000000001 | 400 | id |
|
||||
| Field requered project | | SUPERVISOR | 00000000000000000000000000000001 | 400 | prjUid |
|
||||
| Field requered pu_type | 85794888452ceeef3675164057928956 | | 00000000000000000000000000000001 | 400 | pu_type |
|
||||
| Field requered urs_uid | 85794888452ceeef3675164057928956 | SUPERVISOR | | 400 | usr_uid |
|
||||
|
||||
|
||||
Scenario Outline: Assign a dynaform to a process supervisor for a project with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"dyn_uid": "<dyn_uid>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/process-supervisor/dynaform"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
|
||||
Examples:
|
||||
| test_description | project | dyn_uid | error_code | error_message |
|
||||
| Invalid dyn_uid | 85794888452ceeef3675164057928956 | 2ceeef36751640grgrtgrg#$%#%# | 400 | dyn_uid |
|
||||
| Field requered project | | 78212661352ceef2dc4e987081647602 | 400 | prjUid |
|
||||
| Field requered dyn_uid | 85794888452ceeef3675164057928956 | 78212661352ceef2dc4e987081640002 | 400 | dyn_uid |
|
||||
|
||||
|
||||
Scenario Outline: Assign a Input Document to a process supervisor for a project with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"dyn_uid": "<inp_doc_uid>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/process-supervisor/input-document"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
|
||||
Examples:
|
||||
| test_description | project | inp_doc_uid | error_code | error_message |
|
||||
| Invalid inp_doc_uid | 85794888452ceeef3675164057928956 | 25205290452ceef5@#$41c3067266323 | 400 | inp_doc_uid |
|
||||
| Field requered project | | 25205290452ceef570741c3067266323 | 400 | prjUid |
|
||||
| Field requered inp_doc_uid | 85794888452ceeef3675164057928956 | | 400 | inp_doc_uid |
|
||||
@@ -0,0 +1,167 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Activity Resources Main Tests
|
||||
Requirements:
|
||||
a workspace with the process 251815090529619a99a2bf4013294414 already loaded
|
||||
the process name is "Test (Triggers, Activity)"
|
||||
there are three Activity Resources in the process
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario Outline: Get the Properties and Definition of 3 Activities
|
||||
Given I request "project/<project>/activity/<activity>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the "definition" property type is "array"
|
||||
And the "properties" property type is "object"
|
||||
And that "tas_title" is set to "<tas_title>"
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | tas_title |
|
||||
| 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | Task 1 |
|
||||
| 251815090529619a99a2bf4013294414 | 95655319552a5c790b69a04054667879 | Task 2 |
|
||||
| 251815090529619a99a2bf4013294414 | 63843886052a5cc066e4c04056414372 | Task 3 |
|
||||
|
||||
|
||||
Scenario Outline: Get the Properties of a Activity are exactly three activity
|
||||
Given I request "project/<project>/activity/<activity>?filter=properties"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the response has not a "definition" property
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | tas_title |
|
||||
| 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | Task 1 |
|
||||
| 251815090529619a99a2bf4013294414 | 95655319552a5c790b69a04054667879 | Task 2 |
|
||||
| 251815090529619a99a2bf4013294414 | 63843886052a5cc066e4c04056414372 | Task 3 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Get the Definition of a Activity are exactly three activity
|
||||
Given I request "project/<project>/activity/<activity>?filter=definition"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the response has not a "properties" property
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | tas_title |
|
||||
| 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | Task 1 |
|
||||
| 251815090529619a99a2bf4013294414 | 95655319552a5c790b69a04054667879 | Task 2 |
|
||||
| 251815090529619a99a2bf4013294414 | 63843886052a5cc066e4c04056414372 | Task 3 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Update the Definition of a Activity and the check if the values had changed
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"definition": {},
|
||||
"properties":
|
||||
{
|
||||
"tas_title": "<tas_title>",
|
||||
"tas_description": "<tas_description>",
|
||||
"tas_priority_variable": "<tas_priority_variable>",
|
||||
"tas_derivation_screen_tpl": "<tas_derivation_screen_tpl>",
|
||||
"tas_start": "<tas_start>",
|
||||
"tas_assign_type" : "<tas_assign_type>",
|
||||
"tas_assign_variable": "<tas_assign_variable>",
|
||||
"tas_group_variable": "<tas_group_variable>",
|
||||
"tas_selfservice_timeout": "<tas_selfservice_timeout>",
|
||||
"tas_selfservice_time": "<tas_selfservice_time>",
|
||||
"tas_selfservice_time_unit" : "<tas_selfservice_time_unit>",
|
||||
"tas_selfservice_trigger_uid" : "<tas_selfservice_trigger_uid>",
|
||||
"tas_transfer_fly": "<tas_transfer_fly>",
|
||||
"tas_duration" : "<tas_duration>",
|
||||
"tas_timeunit" : "<tas_timeunit>",
|
||||
"tas_type_day": "<tas_type_day>",
|
||||
"tas_calendar": "<tas_calendar>",
|
||||
"tas_type": "<tas_type>",
|
||||
"tas_def_title": "<tas_def_title>",
|
||||
"tas_def_description": "<tas_def_description>",
|
||||
"tas_send_last_email": "<tas_send_last_email>",
|
||||
"tas_def_subject_message": "<tas_def_subject_message>",
|
||||
"tas_def_message_type": "<tas_def_message_type>",
|
||||
"tas_def_message": "<tas_def_message>",
|
||||
"tas_def_message_template": "<tas_def_message_template>"
|
||||
}
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/activity/<activity>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | tas_title | tas_description | tas_priority_variable | tas_derivation_screen_tpl | tas_start | tas_assign_type | tas_assign_variable| tas_group_variable | tas_selfservice_timeout | tas_selfservice_time | tas_selfservice_time_unit | tas_selfservice_trigger_uid | tas_transfer_fly | tas_duration | tas_timeunit | tas_type_day | tas_calendar | tas_type | tas_def_title | tas_def_description | tas_send_last_email | tas_def_subject_message | tas_def_message_type | tas_def_message | tas_def_message_template |
|
||||
| Update (tas_title, tas_description), tas_assign_type=BALANCED, tas_selfservice_timeout=1, tas_selfservice_time_unit=DAYS | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | update activity task1 | update description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html |
|
||||
| | 251815090529619a99a2bf4013294414 | 95655319552a5c790b69a04054667879 | update activity task2 | update description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html |
|
||||
| | 251815090529619a99a2bf4013294414 | 63843886052a5cc066e4c04056414372 | update activity task3 | update description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html |
|
||||
|
||||
|
||||
@5: TEST FOR GET ACTIVITY /-----------------------------------------------------------------------
|
||||
Scenario Outline: Get a activity
|
||||
Given I request "project/<project>/activity/<activity>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "tas_title" is set to "<tas_title>"
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | tas_title |
|
||||
| 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | Task Edit |
|
||||
|
||||
@6: TEST FOR GET PROPERTIES & DEFINITION OF A ACTIVITY /-----------------------------------------------------------------------
|
||||
Scenario Outline: Get an activity
|
||||
Given I request "project/<project>/activity/<activity>"
|
||||
Then the response status code should be <error_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | tas_title | error_code |
|
||||
| 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095845000 | Task 1 | 400 |
|
||||
| 251815090529619a99a2bf4013294414 | | Task 1 | 404 |
|
||||
| | 97192372152a5c78f04a794095806311 | Task 1 | 400 |
|
||||
|
||||
|
||||
@7: TEST FOR GET PROPERTIES ACTIVITY /---------------------------------------------------------
|
||||
Scenario Outline: Get properties of activity
|
||||
Given I request "project/<project>/activity/<activity>?filter=properties"
|
||||
Then the response status code should be <error_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | error_code |
|
||||
| 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095801000 | 400 |
|
||||
| 251815090529619a99a2bf4013294414 | | 404 |
|
||||
| | 97192372152a5c78f04a794095806311 | 400 |
|
||||
|
||||
@8: TEST FOR GET DEFINITION ACTIVITY /---------------------------------------------------------
|
||||
Scenario Outline: Get definition of activity
|
||||
Given I request "project/<project>/activity/<activity>?filter=definition"
|
||||
Then the response status code should be <error_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | error_code |
|
||||
| 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095200000 | 400 |
|
||||
| 251815090529619a99a2bf4013294414 | | 404 |
|
||||
| | 97192372152a5c78f04a794095806311 | 400 |
|
||||
@@ -0,0 +1,126 @@
|
||||
@ProcessMakerMichelangelo @RestAPI @assignee
|
||||
Feature: Project Properties -Adhoc Assignee Resources
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Get a list of available adhoc users and groups to be assigned to an activity
|
||||
Given I request "project/<project>/activity/<activity>/adhoc-available-assignee"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
And the "ada_uid" property in row 0 equals "<ada_uid>"
|
||||
And the "ada_type" property in row 0 equals "<ada_type>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | records | ada_uid | ada_type |
|
||||
| check if the list of possible users and groups to be assigned is correct | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 84 | 54731929352d56741de9d42002704749 | group |
|
||||
|
||||
Scenario Outline: Get a list of available adhoc users and groups to be assigned to an activity with filter
|
||||
Given I request "project/<project>/activity/<activity>/adhoc-available-assignee?filter=<filter>&start=<start>&limit=<limit>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
And the "ada_uid" property in row 0 equals "<ada_uid>"
|
||||
And the "ada_type" property in row 0 equals "<ada_type>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | filter | start | limit | records | ada_uid | ada_type |
|
||||
| Using filter get available users that match with "fin" | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | fin | 0 | 50 | 2 | 66623507552d56742865613066097298 | group |
|
||||
| Using filter get 1 available user that match with "fin" | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | fin | 0 | 1 | 1 | 66623507552d56742865613066097298 | group |
|
||||
|
||||
Scenario Outline: Assign a adhoc user or group to an activity
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"ada_uid": "<ada_uid>",
|
||||
"ada_type": "<ada_type>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/activity/<activity>/adhoc-assignee"
|
||||
Then the response status code should be 201
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | ada_uid | ada_type |
|
||||
| assign a user to the first task | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 73005191052d56727901138030694610 | user |
|
||||
| assign a user to the first task | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 25286582752d56713231082039265791 | user |
|
||||
| assign a group to the first task | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 54731929352d56741de9d42002704749 | group |
|
||||
| assign a group to the second task | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | 36775342552d5674146d9c2078497230 | group |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: List adhoc assignees of an activity
|
||||
Given I request "project/<project>/activity/<activity>/adhoc-assignee"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
And the "ada_uid" property in row 0 equals "<ada_uid>"
|
||||
And the "ada_type" property in row 0 equals "<ada_type>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | records | ada_uid | ada_type |
|
||||
| Verify that the activity has expected quantity of asignees | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 5 | 54731929352d56741de9d42002704749 | group |
|
||||
| Verify that the activity has expected quantity of asignees | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | 1 | 36775342552d5674146d9c2078497230 | group |
|
||||
|
||||
|
||||
Scenario Outline: After assignation - List adhoc assignees of an activity with filter
|
||||
Given I request "project/<project>/activity/<activity>/adhoc-assignee?filter=<filter>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 1 record
|
||||
And the "ada_uid" property in row 0 equals "<ada_uid>"
|
||||
And the "ada_type" property in row 0 equals "<ada_type>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | records | ada_uid | ada_type | filter |
|
||||
| Filtered list should return 1 record | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 1 | 73005191052d56727901138030694610 | user | oli |
|
||||
| Filtered list should return 1 record | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | 1 | 36775342552d5674146d9c2078497230 | group | emp |
|
||||
|
||||
Scenario Outline: Get a single adhoc user or group of an activity
|
||||
Given I request "project/<project>/activity/<activity>/adhoc-assignee/<ada_uid>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And the "ada_uid" property equals "<ada_uid>"
|
||||
And the "ada_name" property equals "<ada_name>"
|
||||
And the "ada_lastname" property equals "<ada_lastname>"
|
||||
And the "ada_username" property equals "<ada_username>"
|
||||
And the "ada_type" property equals "user"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | ada_uid | ada_type | ada_name | ada_lastname | ada_username |
|
||||
| Obtain details of user assigend to an activity | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 73005191052d56727901138030694610 | user | Olivia | Austin | olivia |
|
||||
|
||||
Scenario Outline: Remove adhoc assignee from an activity
|
||||
Given that I want to delete a resource with the key "ada_uid" stored in session array
|
||||
And I request "project/<project>/activity/<activity>/adhoc-assignee/<ada_uid>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | ada_uid |
|
||||
| Remove a user from activity | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 73005191052d56727901138030694610 |
|
||||
| Remove a user from activity | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 25286582752d56713231082039265791 |
|
||||
| Remove a user from activity | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 54731929352d56741de9d42002704749 |
|
||||
| Remove a user from activity | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | 36775342552d5674146d9c2078497230 |
|
||||
|
||||
Scenario: List assignees of an activity
|
||||
Given I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485/adhoc-assignee"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 2 records
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
@ProcessMakerMichelangelo @RestAPI @adhoc-assignee @negative
|
||||
Feature: Project Properties -Adhoc Assignee Resources - Negative tests
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: List assignees of an activity with bad parameters
|
||||
Given I request "project/<project>/activity/<activity>/adhoc-assignee"
|
||||
Then the response status code should be 400
|
||||
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity |
|
||||
| Use an invalid project ID and empty activity | 4224292655297723eb98691001100052 | 1234556 |
|
||||
| Use an invalid project ID | 122134324 | 65496814252977243d57684076211485 |
|
||||
| Use an invalid activity ID | 345345345 | 345345345 |
|
||||
|
||||
|
||||
Scenario Outline: Assign a user or group to an activity (Field validation)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"ass_uid": "<aas_uid>",
|
||||
"ass_type": "<aas_type>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/activity/<activity>/adhoc-assignee"
|
||||
Then the response status code should be 400
|
||||
And the type is "object"
|
||||
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | aas_uid | aas_type |
|
||||
| Asignando un user inexistente | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | | |
|
||||
| Asignando un usuario Con tipo inexistente | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | !@#$%^&*()_+=-[]{};:~, | user |
|
||||
| Asignando un usuario como grupo | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 15746307552d00a66624889076110382 | group |
|
||||
| Asignando un usuario con type inexistente | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 69191356252cda41acde328048794164 | department |
|
||||
|
||||
|
||||
@@ -0,0 +1,450 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Project Properties - Step Resources
|
||||
#STEPS OF A ACTIVITY
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/steps
|
||||
# List assigned Steps to an Activity
|
||||
Scenario: List assigned Steps to "Task1"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/steps"
|
||||
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 json data is an empty array
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step
|
||||
# Assign a Step to an Activity
|
||||
Scenario: Assign "DynaForm Demo1" to "Task1"
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"step_type_obj": "DYNAFORM",
|
||||
"step_uid_obj": "50332332752cd9b9a7cc989003652905",
|
||||
"step_condition": "",
|
||||
"step_position": 1,
|
||||
"step_mode": "EDIT"
|
||||
}
|
||||
"""
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/step"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "step_uid" in session array as variable "step1"
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step
|
||||
# Assign a Step to an Activity
|
||||
Scenario: Assign "InputDocument Demo" to "Task1"
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"step_type_obj": "INPUT_DOCUMENT",
|
||||
"step_uid_obj": "83199959452cd62589576c1018679557",
|
||||
"step_condition": "",
|
||||
"step_position": 2,
|
||||
"step_mode": "EDIT"
|
||||
}
|
||||
"""
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/step"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "step_uid" in session array as variable "step2"
|
||||
|
||||
#PUT /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}
|
||||
# Update a Step assignation of an Activity
|
||||
Scenario: Update Step "DynaForm Demo1" assigned to "Task1"
|
||||
Given that I have a valid access_token
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"step_condition": "@@FIELD1 == 1",
|
||||
"step_mode": "VIEW"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "step1" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/step"
|
||||
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"
|
||||
And that "step_condition" is set to "@@FIELD1 == 1"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/steps
|
||||
# List assigned Steps to an Activity
|
||||
Scenario: List assigned Steps to "Task1"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/steps"
|
||||
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 "step_type_obj" property in row 1 equals "INPUT_DOCUMENT"
|
||||
And the "step_uid_obj" property in row 1 equals "83199959452cd62589576c1018679557"
|
||||
And the "step_condition" property in row 1 equals ""
|
||||
And the "step_position" property in row 1 equals "2"
|
||||
And the "step_mode" property in row 1 equals "EDIT"
|
||||
And the "obj_title" property in row 1 equals "InputDocument Demo"
|
||||
And the "obj_description" property in row 1 equals "Description"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/available-steps
|
||||
# List available Steps to assign to an Activity
|
||||
Scenario: List available Steps to assign to "Task1"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/available-steps"
|
||||
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 "obj_uid" property in row 1 equals "32743823452cd63105006e1076595203"
|
||||
And the "obj_title" property in row 1 equals "OutputDocument Demo"
|
||||
And the "obj_description" property in row 1 equals "Description"
|
||||
And the "obj_type" property in row 1 equals "OUTPUT_DOCUMENT"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}
|
||||
# Get a single Step assigned to an Activity
|
||||
Scenario: Get a single Step "DynaForm Demo1" assigned to "Task1"
|
||||
Given that I have a valid access_token
|
||||
And that I want to get a resource with the key "step1" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/step"
|
||||
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"
|
||||
And that "step_type_obj" is set to "DYNAFORM"
|
||||
And that "step_uid_obj" is set to "50332332752cd9b9a7cc989003652905"
|
||||
And that "step_condition" is set to "@@FIELD1 == 1"
|
||||
And that "step_position" is set to "1"
|
||||
And that "step_mode" is set to "VIEW"
|
||||
And that "obj_title" is set to "DynaForm Demo1"
|
||||
And that "obj_description" is set to "Description"
|
||||
|
||||
#DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}
|
||||
# Unassign a Step from an Activity
|
||||
Scenario: Unassign "DynaForm Demo1" from "Task1"
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "step1" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/step"
|
||||
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}/activity/{act_uid}/step/{step_uid}
|
||||
# Unassign a Step from an Activity
|
||||
Scenario: Unassign "InputDocument Demo" from "Task1"
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "step2" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/step"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/steps
|
||||
# List assigned Steps to an Activity
|
||||
Scenario: List assigned Steps to "Task1"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/steps"
|
||||
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 json data is an empty array
|
||||
|
||||
#TRIGGERS OF A STEP
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers
|
||||
# List assigned Triggers to a Step
|
||||
Scenario: List Triggers assigned to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/triggers"
|
||||
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 json data is an empty array
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger
|
||||
# Assign a Trigger to a Step
|
||||
Scenario: Assign "Trigger Demo1" to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_uid": "81919273152cd636c665080083928728",
|
||||
"st_type": "BEFORE",
|
||||
"st_condition": "",
|
||||
"st_position": 1
|
||||
}
|
||||
"""
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/trigger"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger
|
||||
# Assign a Trigger to a Step
|
||||
Scenario: Assign "Trigger Demo2" to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_uid": "56359776552cd6378b38e47080912028",
|
||||
"st_type": "BEFORE",
|
||||
"st_condition": "",
|
||||
"st_position": 2
|
||||
}
|
||||
"""
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/trigger"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
#PUT /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}
|
||||
# Update a Trigger assignation of a Step
|
||||
Scenario: Update "Trigger Demo1" assigned to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"st_type": "BEFORE",
|
||||
"st_condition": "@@FIELD2 == 2"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "tgr1" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/trigger/81919273152cd636c665080083928728"
|
||||
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"
|
||||
And that "st_condition" is set to "@@FIELD2 == 2"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers
|
||||
# List assigned Triggers to a Step
|
||||
Scenario: List Triggers assigned to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/triggers"
|
||||
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 "tri_uid" property in row 1 equals "56359776552cd6378b38e47080912028"
|
||||
And the "tri_title" property in row 1 equals "Trigger Demo2"
|
||||
And the "tri_description" property in row 1 equals "Description"
|
||||
And the "st_type" property in row 1 equals "BEFORE"
|
||||
And the "st_condition" property in row 1 equals ""
|
||||
And the "st_position" property in row 1 equals "2"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/available-triggers/{type}
|
||||
# List available Triggers to assign to a Step
|
||||
Scenario: List available Triggers to assign to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/available-triggers/before"
|
||||
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 "tri_uid" property in row 0 equals "57401970252cd6393531551040242546"
|
||||
And the "tri_title" property in row 0 equals "Trigger Demo3"
|
||||
And the "tri_description" property in row 0 equals "Description"
|
||||
And the "tri_type" property in row 0 equals "SCRIPT"
|
||||
And the "tri_webbot" property in row 0 equals ""
|
||||
And the "tri_param" property in row 0 equals ""
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}
|
||||
# Get a single Trigger assigned to a Step
|
||||
Scenario: Get a single Trigger "Trigger Demo1" assigned to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/trigger/81919273152cd636c665080083928728/before"
|
||||
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"
|
||||
And that "tri_uid" is set to "81919273152cd636c665080083928728"
|
||||
And that "tri_title" is set to "Trigger Demo1"
|
||||
And that "tri_description" is set to "Description"
|
||||
And that "st_type" is set to "BEFORE"
|
||||
And that "st_condition" is set to "@@FIELD2 == 2"
|
||||
And that "st_position" is set to "1"
|
||||
|
||||
#DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}
|
||||
# Remove a Trigger assignation of a Step
|
||||
Scenario: Remove "Trigger Demo1" assigned to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "tgr1" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/trigger/81919273152cd636c665080083928728/before"
|
||||
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}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid}/{type}
|
||||
# Remove a Trigger assignation of a Step
|
||||
Scenario: Remove "Trigger Demo2" assigned to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "tgr2" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/trigger/56359776552cd6378b38e47080912028/before"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers
|
||||
# List assigned Triggers to a Step
|
||||
Scenario: List Triggers assigned to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/triggers"
|
||||
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 json data is an empty array
|
||||
|
||||
#TRIGGERS OF STEP "ASSIGN TASK"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/triggers
|
||||
# List assigned Triggers to a Step
|
||||
Scenario: List Triggers assigned to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/triggers"
|
||||
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 json data is an empty array
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/trigger
|
||||
# Assign a Trigger to a Step
|
||||
Scenario: Assign "Trigger Demo1" to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_uid": "81919273152cd636c665080083928728",
|
||||
"st_type": "BEFORE_ASSIGNMENT",
|
||||
"st_condition": "",
|
||||
"st_position": 1
|
||||
}
|
||||
"""
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/trigger"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/trigger
|
||||
# Assign a Trigger to a Step
|
||||
Scenario: Assign "Trigger Demo2" to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_uid": "56359776552cd6378b38e47080912028",
|
||||
"st_type": "BEFORE_ASSIGNMENT",
|
||||
"st_condition": "",
|
||||
"st_position": 2
|
||||
}
|
||||
"""
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/trigger"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
#PUT /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}
|
||||
# Update a Trigger assignation of a Step
|
||||
Scenario: Update "Trigger Demo1" assigned to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"st_type": "BEFORE_ASSIGNMENT",
|
||||
"st_condition": "@@FIELD2 == 2"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "tgr1" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/trigger/81919273152cd636c665080083928728"
|
||||
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"
|
||||
And that "st_condition" is set to "@@FIELD2 == 2"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/triggers
|
||||
# List assigned Triggers to a Step
|
||||
Scenario: List Triggers assigned to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/triggers"
|
||||
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 "tri_uid" property in row 1 equals "56359776552cd6378b38e47080912028"
|
||||
And the "tri_title" property in row 1 equals "Trigger Demo2"
|
||||
And the "tri_description" property in row 1 equals "Description"
|
||||
And the "st_type" property in row 1 equals "BEFORE_ASSIGNMENT"
|
||||
And the "st_condition" property in row 1 equals ""
|
||||
And the "st_position" property in row 1 equals "2"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/available-triggers/{type}
|
||||
# List available Triggers to assign to a Step
|
||||
Scenario: List available Triggers to assign to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/available-triggers/before-assignment"
|
||||
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 "tri_uid" property in row 0 equals "57401970252cd6393531551040242546"
|
||||
And the "tri_title" property in row 0 equals "Trigger Demo3"
|
||||
And the "tri_description" property in row 0 equals "Description"
|
||||
And the "tri_type" property in row 0 equals "SCRIPT"
|
||||
And the "tri_webbot" property in row 0 equals ""
|
||||
And the "tri_param" property in row 0 equals ""
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}
|
||||
# Get a single Trigger assigned to a Step
|
||||
Scenario: Get a single Trigger "Trigger Demo1" assigned to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/trigger/81919273152cd636c665080083928728/before-assignment"
|
||||
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"
|
||||
And that "tri_uid" is set to "81919273152cd636c665080083928728"
|
||||
And that "tri_title" is set to "Trigger Demo1"
|
||||
And that "tri_description" is set to "Description"
|
||||
And that "st_type" is set to "BEFORE_ASSIGNMENT"
|
||||
And that "st_condition" is set to "@@FIELD2 == 2"
|
||||
And that "st_position" is set to "1"
|
||||
|
||||
#DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/trigger/{tri_uid}/{type}
|
||||
# Remove a Trigger assignation of a Step
|
||||
Scenario: Remove "Trigger Demo1" assigned to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "tgr1" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/trigger/81919273152cd636c665080083928728/before-assignment"
|
||||
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}/activity/{act_uid}/step/trigger/{tri_uid}/{type}
|
||||
# Remove a Trigger assignation of a Step
|
||||
Scenario: Remove "Trigger Demo2" assigned to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "tgr2" stored in session array
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/trigger/56359776552cd6378b38e47080912028/before-assignment"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/triggers
|
||||
# List assigned Triggers to a Step
|
||||
Scenario: List Triggers assigned to Step "Assign Task" of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/triggers"
|
||||
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 json data is an empty array
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Project Properties - Step Resources Main Tests
|
||||
Requirements:
|
||||
a workspace with the process 16062437052cd6141881e06088349078 already loaded
|
||||
the process name is "Sample Project #3 (Project Properties - Step Resources)"
|
||||
there are two steps in the process
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: List assigned Steps to "Task1"
|
||||
Given I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/steps"
|
||||
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 json data is an empty array
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Assign a 5 Steps to an Activity
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"step_type_obj": "<step_type_obj>",
|
||||
"step_uid_obj": "<step_uid_obj>",
|
||||
"step_condition": "<step_condition>",
|
||||
"step_position": "<step_position>",
|
||||
"step_mode": "<step_mode>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/activity/<activity>/step"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "step_uid" in session array as variable "step_uid_<step_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step_type_obj | step_uid_obj | step_condition | step_position | step_mode | step_number |
|
||||
| Dynaform assigned to Task 1 in mode edit | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | DYNAFORM | 50332332752cd9b9a7cc989003652905 | | 1 | EDIT | 1 |
|
||||
| Input Document assigned to Task 1 in mode edit | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | INPUT_DOCUMENT | 83199959452cd62589576c1018679557 | | 2 | EDIT | 2 |
|
||||
| Output Document assigned to Task 1 in mode edit | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | OUTPUT_DOCUMENT | 32743823452cd63105006e1076595203 | | 3 | EDIT | 3 |
|
||||
| Dynaform assigned to Task 2 in mode edit with condition | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | DYNAFORM | 63293140052cd61b29e21a9056770986 | @@YEAR==2013 | 1 | EDIT | 4 |
|
||||
| Dynaform assigned to Task 2 in mode view | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | DYNAFORM | 50332332752cd9b9a7cc989003652905 | | 2 | VIEW | 5 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Update the five steps and then check if the values had changed
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"step_type_obj": "<step_type_obj>",
|
||||
"step_uid_obj": "<step_uid_obj>",
|
||||
"step_condition": "<step_condition>",
|
||||
"step_position": "<step_position>",
|
||||
"step_mode": "<step_mode>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "step_uid" stored in session array as variable "step_uid_<step_number>"
|
||||
And I request "project/<project>/activity/<activity>/step"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step_condition | step_position | step_mode | step_type_obj | step_uid_obj | step_number |
|
||||
| Update Dynaform Task 1 (step_condition, step_position, step_mode) | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | @@YEAR==2013 | 2 | VIEW | DYNAFORM | 50332332752cd9b9a7cc989003652905 | 1 |
|
||||
| Update Input Document Task 1 (step_condition, step_position, step_mode) | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | @@YEAR==2014 | 3 | VIEW | INPUT_DOCUMENT | 83199959452cd62589576c1018679557 | 2 |
|
||||
| Update Output Document Task 1 (step_condition, step_position, step_mode) | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | | 1 | VIEW | OUTPUT_DOCUMENT | 32743823452cd63105006e1076595203 | 3 |
|
||||
| Update Dynaform Task 2 (step_condition, step_position, step_mode) | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | @@YEAR==2014 | 2 | VIEW | DYNAFORM | 63293140052cd61b29e21a9056770986 | 4 |
|
||||
| Update Dynaform Task 2 (step_condition, step_position, step_mode) | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | @@YEAR==2014 | 1 | EDIT | DYNAFORM | 50332332752cd9b9a7cc989003652905 | 5 |
|
||||
|
||||
|
||||
Scenario Outline: List assigned Steps to "Task1" & "Task 2"
|
||||
Given I request "project/<project>/activity/<activity>/steps"
|
||||
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 response has <records> records
|
||||
And the "step_uid_obj" property in row 0 equals "<step_uid_obj>"
|
||||
And the "aas_type" property in row 0 equals "<step_type_obj>"
|
||||
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | records | step_type_obj | step_uid_obj |
|
||||
| 3 steps in task 1 - verify that the first record is the first position | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | 3 | OUTPUT_DOCUMENT | 32743823452cd63105006e1076595203 |
|
||||
| 2 steps in task 2 - verify that the first record is the first position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 2 | DYNAFORM | 50332332752cd9b9a7cc989003652905 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Unassign all steps assigned previously in this script in task 1
|
||||
Given that I want to delete a resource with the key "step_uid" stored in session array as variable "step_uid_<step_number>"
|
||||
And I request "project/<project>/activity/<activity>/step"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | step_uid_obj | step_number |
|
||||
| 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | 50332332752cd9b9a7cc989003652905 | 1 |
|
||||
| 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | 83199959452cd62589576c1018679557 | 2 |
|
||||
| 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | 32743823452cd63105006e1076595203 | 3 |
|
||||
|
||||
|
||||
|
||||
|
||||
Scenario: List assigned Steps to "Task1"
|
||||
Given I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/steps"
|
||||
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 json data is an empty array
|
||||
|
||||
|
||||
#STEP TRIGGERS
|
||||
|
||||
Scenario: List assigned Triggers to "Task2"
|
||||
Given I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/63293140052cd61b29e21a9056770986/triggers"
|
||||
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 json data is an empty array
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step_type_obj | step_uid_obj | step_condition | step_position | step_mode | step_number |
|
||||
| Dynaform assigned to Task 2 in mode edit with condition | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | DYNAFORM | 63293140052cd61b29e21a9056770986 | @@YEAR==2013 | 1 | EDIT | 4 |
|
||||
| Dynaform assigned to Task 2 in mode view | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | DYNAFORM | 50332332752cd9b9a7cc989003652905 | | 2 | VIEW | 5 |
|
||||
|
||||
|
||||
Scenario: List available Triggers to "Task2" when there are exactly three triggers
|
||||
Given I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/available-triggers/before"
|
||||
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 response has 3 records
|
||||
|
||||
|
||||
Scenario Outline: Assign a 3 triggers to a Step
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_uid": "<tri_uid>",
|
||||
"st_type": "<st_type>",
|
||||
"st_condition": "<st_condition>",
|
||||
"st_position": "<st_position>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/activity/<activity>/step/<step>/trigger"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "step_uid" in session array as variable "tri_uid_<tri_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step |tri_uid_number | tri_uid | st_type | st_condition | st_position |
|
||||
| Trigger assigned to Task 2 in type before | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 1 | 81919273152cd636c665080083928728 | BEFORE | | 1 |
|
||||
| Trigger assigned to Task 2 in type After | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 2 | 56359776552cd6378b38e47080912028 | AFTER | | 1 |
|
||||
| Trigger assigned to Task 2 in type After | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 3 | 57401970252cd6393531551040242546 | AFTER | | 2 |
|
||||
|
||||
|
||||
Scenario: List available Triggers to "Task2" when there are exactly zero triggers
|
||||
Given I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/available-triggers/before"
|
||||
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 response has 0 records
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Update a Trigger assignation of a Step if the values had changed
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"tri_uid": "<tri_uid>",
|
||||
"st_type": "<st_type>",
|
||||
"st_condition": "<st_condition>",
|
||||
"st_position": "<st_position>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "step_uid" stored in session array as variable "tri_uid_<tri_uid_number>"
|
||||
And I request "project/<project>/activity/<activity>/step/<step>/trigger"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step |tri_uid_number | tri_uid | st_type | st_condition | st_position |
|
||||
| Update st_type, st_condition | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 1 | 81919273152cd636c665080083928728 | AFTER | @@var1 == 1 | 1 |
|
||||
| Update st_type, st_condition and st_position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 2 | 56359776552cd6378b38e47080912028 | BEFORE | @@var1 == 2 | 2 |
|
||||
| Update st_type, st_condition and st_position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 3 | 57401970252cd6393531551040242546 | BEFORE | @@var1 == 1 | 1 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Get a single Triggers and check some properties
|
||||
Given that I want to get a resource with the key "tri_uid" stored in session array as variable "tri_uid_<tri_uid_number>"
|
||||
And I request "project/<project>/activity/<activity>/step/<step>/trigger"
|
||||
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 that "tri_uid" is set to "<tri_uid>"
|
||||
And that "st_type" is set to "<st_type>"
|
||||
And that "st_condition" is set to "<st_condition>"
|
||||
And that "st_position" is set to "<st_position>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step |tri_uid_number | tri_uid | st_type | st_condition | st_position |
|
||||
| Update st_type, st_condition | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 1 | 81919273152cd636c665080083928728 | AFTER | @@var1 == 1 | 1 |
|
||||
| Update st_type, st_condition and st_position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 2 | 56359776552cd6378b38e47080912028 | BEFORE | @@var1 == 2 | 2 |
|
||||
| Update st_type, st_condition and st_position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 3 | 57401970252cd6393531551040242546 | BEFORE | @@var1 == 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Delete all Triggers assignation of a Step
|
||||
Given that I want to delete a resource with the key "tri_uid" stored in session array as variable "tri_uid_<tri_uid_number>"
|
||||
And I request "project/<project>/activity/<activity>/step/<step>/trigger/<trigger>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | step |tri_uid_number | tri_uid |
|
||||
| 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 1 | 81919273152cd636c665080083928728 |
|
||||
| 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 2 | 56359776552cd6378b38e47080912028 |
|
||||
| 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 3 | 57401970252cd6393531551040242546 |
|
||||
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers
|
||||
# List assigned Triggers to a Step
|
||||
Scenario: List Triggers assigned to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/triggers"
|
||||
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 json data is an empty array
|
||||
|
||||
|
||||
|
||||
#TRIGGERS OF STEP "ASSIGN TASK"
|
||||
|
||||
Scenario: List Triggers assigned to Step "Assign Task" of "Task2", when are exactly three triggers
|
||||
Given I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/triggers"
|
||||
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 json data is an empty array
|
||||
|
||||
|
||||
Scenario Outline: Assign a three triggers to a Step "Assign Task"
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_uid": "<tri_uid>",
|
||||
"st_type": "<st_type>",
|
||||
"st_condition": "<st_condition>",
|
||||
"st_position": "<st_position>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/activity/<activity>/step/<step>/trigger"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "step_uid" in session array as variable "tri_uid_<tri_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step |tri_uid_number | tri_uid | st_type | st_condition | st_position |
|
||||
| Trigger assigned to Task 2 in type before | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 1 | 81919273152cd636c665080083928728 | BEFORE_ASSIGNMENT | | 1 |
|
||||
| Trigger assigned to Task 2 in type After | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 2 | 56359776552cd6378b38e47080912028 | BEFORE_ROUTING | | 1 |
|
||||
| Trigger assigned to Task 2 in type After | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 3 | 57401970252cd6393531551040242546 | AFTER_ROUTING | | 2 |
|
||||
|
||||
|
||||
|
||||
Scenario: List available Triggers to "Task2" when there are exactly zero triggers
|
||||
Given I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/available-triggers"
|
||||
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 response has 0 records
|
||||
|
||||
|
||||
Scenario Outline: Update a Trigger assignation of a Step if the values had changed
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"tri_uid": "<tri_uid>",
|
||||
"st_type": "<st_type>",
|
||||
"st_condition": "<st_condition>",
|
||||
"st_position": "<st_position>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "step_uid" stored in session array as variable "tri_uid_<tri_uid_number>"
|
||||
And I request "project/<project>/activity/<activity>/step/<step>/trigger"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step |tri_uid_number | tri_uid | st_type | st_condition | st_position |
|
||||
| Update st_type, st_condition | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 1 | 81919273152cd636c665080083928728 | AFTER_ROUTING | @@var1 == 1 | 1 |
|
||||
| Update st_type, st_condition and st_position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 2 | 56359776552cd6378b38e47080912028 | BEFORE_ASSIGNMENT | @@var1 == 2 | 2 |
|
||||
| Update st_type, st_condition and st_position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 3 | 57401970252cd6393531551040242546 | BEFORE_ROUTING | @@var1 == 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Get a single Triggers and check some properties
|
||||
Given that I want to get a resource with the key "tri_uid" stored in session array as variable "tri_uid_<tri_uid_number>"
|
||||
And I request "project/<project>/activity/<activity>/step/<step>/trigger"
|
||||
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 that "tri_uid" is set to "<tri_uid>"
|
||||
And that "st_type" is set to "<st_type>"
|
||||
And that "st_condition" is set to "<st_condition>"
|
||||
And that "st_position" is set to "<st_position>"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step |tri_uid_number | tri_uid | st_type | st_condition | st_position |
|
||||
| Update st_type, st_condition | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 1 | 81919273152cd636c665080083928728 | AFTER_ROUTING | @@var1 == 1 | 1 |
|
||||
| Update st_type, st_condition and st_position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 2 | 56359776552cd6378b38e47080912028 | BEFORE_ASSIGNMENT | @@var1 == 2 | 2 |
|
||||
| Update st_type, st_condition and st_position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 3 | 57401970252cd6393531551040242546 | BEFORE_ROUTING | @@var1 == 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Delete all Triggers assignation of a Step
|
||||
Given that I want to delete a resource with the key "tri_uid" stored in session array as variable "tri_uid_<tri_uid_number>"
|
||||
And I request "project/<project>/activity/<activity>/step/<step>/trigger/<trigger>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
|
||||
| project | activity | step |tri_uid_number | tri_uid |
|
||||
| 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 1 | 81919273152cd636c665080083928728 |
|
||||
| 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 2 | 56359776552cd6378b38e47080912028 |
|
||||
| 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 65093024352cd9df93d9675058012924 | 3 | 57401970252cd6393531551040242546 |
|
||||
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers
|
||||
# List assigned Triggers to a Step
|
||||
Scenario: List Triggers assigned to first Step of "Task2"
|
||||
Given that I have a valid access_token
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/89706843252cd9decdcf9b3047762708/step/65093024352cd9df93d9675058012924/triggers"
|
||||
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 json data is an empty array
|
||||
@@ -0,0 +1,33 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Steps Resources Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Assign a 5 Steps to an Activity
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"step_type_obj": "<step_type_obj>",
|
||||
"step_uid_obj": "<step_uid_obj>",
|
||||
"step_condition": "<step_condition>",
|
||||
"step_position": "<step_position>",
|
||||
"step_mode": "step_mode"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/activity/<activity>/step"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | step_type_obj | step_uid_obj | step_condition | step_position | step_mode | error_code | error_message |
|
||||
| Invalid step_type_obj - Dynaform | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | DYNA123@#$% | 50332332752cd9b9a7cc989003652905 | | 1 | EDIT | 400 | step_type_obj |
|
||||
| Invalid step_type_obj - Input Document | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | INP_DOCUM123@#$ | 83199959452cd62589576c1018679557 | | 2 | EDIT | 400 | step_type_obj |
|
||||
| Invalid step_type_obj - Ôutput Document | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | OUTT_DMEN123@#$ | 32743823452cd63105006e1076595203 | | 3 | EDIT | 400 | step_type_obj |
|
||||
| Invalid step_position | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | DYNAFORM | 63293140052cd61b29e21a9056770986 | @@YEAR==2013 | 2,34/76 | EDIT | 400 | step_position |
|
||||
| Invalid step_mode | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | DYNAFORM | 63293140052cd61b29e21a9056770986 | | 5 | sample12 | 400 | step_mode |
|
||||
| Field requered project | | 10163687452cd6234e0dd25086954968 | DYNAFORM | 50332332752cd9b9a7cc989003652905 | | 1 | EDIT | 400 | project |
|
||||
| Field requered activity | 16062437052cd6141881e06088349078 | | DYNAFORM | 50332332752cd9b9a7cc989003652905 | | 1 | EDIT | 400 | activity |
|
||||
| Field requered step_uid_obj | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | DYNAFORM | | | 1 | EDIT | 400 | step_uid_obj |
|
||||
@@ -0,0 +1,131 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Assignee Resources
|
||||
Requirements:
|
||||
a workspace with the process 4224292655297723eb98691001100052 ("Test Users-Step-Properties End Point") already loaded
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Get the list of available users and groups to be assigned to an activity
|
||||
Check that there are exactly 82 available users for task "Task 1"
|
||||
Given I request "project/<project>/activity/<activity>/available-assignee"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
And the "aas_uid" property in row 0 equals "<aas_uid>"
|
||||
And the "aas_type" property in row 0 equals "<aas_type>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | records | aas_uid | aas_type |
|
||||
| check if the list of possible users and groups to be assigned is correct | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 82 | 54731929352d56741de9d42002704749 | group |
|
||||
|
||||
Scenario Outline: Get the list of available users and groups to be assigned to an activity using filter
|
||||
Given I request "project/<project>/activity/<activity>/available-assignee?filter=<filter>&start=<start>&limit=<limit>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
And the "aas_uid" property in row 0 equals "<aas_uid>"
|
||||
And the "aas_type" property in row 0 equals "<aas_type>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | filter | start | limit | records | aas_uid | aas_type|
|
||||
| Using filter="fin" with no limits should return 2 groups | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | fin | 0 | 50 | 2 | 66623507552d56742865613066097298 | group |
|
||||
| Using filter="fin", start="1", limit="1" should return 1 group | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | fin | 0 | 1 | 1 | 66623507552d56742865613066097298 | group |
|
||||
| Using filter="financial" should return 1 available group | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | financial | 0 | 1 | 1 | 62528621852cda436afe755036997717 | group |
|
||||
| Using filter="finance" should return 1 available group | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | finance | 0 | 1 | 1 | 17707415052cda432dd4774063621869 | group |
|
||||
|
||||
|
||||
Scenario Outline: Assign 2 users and 2 group to an activity
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"aas_uid": "<aas_uid>",
|
||||
"aas_type": "<aas_type>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/activity/<activity>/assignee"
|
||||
Then the response status code should be 201
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | aas_uid | aas_type |
|
||||
| assign a user to the first task | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 73005191052d56727901138030694610 | user |
|
||||
| assign a user to the first task | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 25286582752d56713231082039265791 | user |
|
||||
| assign a group to the first task | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 54731929352d56741de9d42002704749 | group |
|
||||
| assign a group to the second task | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | 36775342552d5674146d9c2078497230 | group |
|
||||
|
||||
|
||||
Scenario Outline: After assignation - List assignees of each activity
|
||||
Given I request "project/<project>/activity/<activity>/assignee"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
And the "aas_uid" property in row 0 equals "<aas_uid>"
|
||||
And the "aas_type" property in row 0 equals "<aas_type>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | records | aas_uid | aas_type |
|
||||
| Verify that the activity has expected quantity of asignees | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 7 | 54731929352d56741de9d42002704749 | group |
|
||||
| Verify that the activity has expected quantity of asignees | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | 5 | 36775342552d5674146d9c2078497230 | group |
|
||||
|
||||
|
||||
Scenario Outline: List assignees of an activity using a filter
|
||||
Given I request "project/<project>/activity/<activity>/assignee?filter=<filter>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has <records> record
|
||||
And the "aas_uid" property in row 0 equals "<aas_uid>"
|
||||
And the "aas_type" property in row 0 equals "<aas_type>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | records | aas_uid | aas_type | filter |
|
||||
| Filtered list should return 1 record | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 1 | 73005191052d56727901138030694610 | user | oli |
|
||||
| Filtered list should return 1 record | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | 1 | 36775342552d5674146d9c2078497230 | group | emp |
|
||||
|
||||
|
||||
Scenario Outline: Get a single user or group of an activity
|
||||
Given I request "project/<project>/activity/<activity>/assignee/<aas_uid>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And the "aas_uid" property equals "<aas_uid>"
|
||||
And the "aas_name" property equals "<aas_name>"
|
||||
And the "aas_lastname" property equals "<aas_lastname>"
|
||||
And the "aas_username" property equals "<aas_username>"
|
||||
And the "aas_type" property equals "<aas_type>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | aas_uid | aas_type | aas_name | aas_lastname | aas_username |
|
||||
| Obtain details of user assigned to an activity | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 73005191052d56727901138030694610 | user | Olivia | Austin | olivia |
|
||||
|
||||
|
||||
Scenario Outline: Remove assignee from an activity
|
||||
Given that I want to delete a resource with the key "aas_uid" stored in session array
|
||||
And I request "project/<project>/activity/<activity>/assignee/<aas_uid>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | aas_uid |
|
||||
| Remove a user from activity | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 73005191052d56727901138030694610 |
|
||||
| Remove a user from activity | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 25286582752d56713231082039265791 |
|
||||
| Remove a user from activity | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 54731929352d56741de9d42002704749 |
|
||||
| Remove a user from activity | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | 36775342552d5674146d9c2078497230 |
|
||||
|
||||
|
||||
Scenario: List assignees of an activity
|
||||
Given I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485/assignee"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 4 records
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
@ProcessMakerMichelangelo @RestAPI @assignee @negative
|
||||
Feature: Project Properties -Assignee Resources - Negative tests
|
||||
Requirements:
|
||||
a workspace with the process 4224292655297723eb98691001100052 ("Test Users-Step-Properties End Point") already loaded
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario Outline: List assignees of an activity with bad parameters
|
||||
Given I request "project/<project>/activity/<activity>/assignee"
|
||||
Then the response status code should be 400
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity |
|
||||
| Use an invalid project ID and empty activity | 4224292655297723eb98691001100052 | 1234556 |
|
||||
| Use an invalid project ID | 122134324 | 65496814252977243d57684076211485 |
|
||||
| Use an invalid activity ID | 345345345 | 345345345 |
|
||||
|
||||
|
||||
Scenario Outline: Assign a user or group to an activity (Field validation)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"ass_uid": "<aas_uid>",
|
||||
"ass_type": "<aas_type>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/activity/<activity>/assignee"
|
||||
Then the response status code should be 400
|
||||
And the type is "object"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | activity | aas_uid | aas_type |
|
||||
| Asignando un user inexistente | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | | |
|
||||
| Asignando un usuario Con tipo inexistente | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | !@#$%^&*()_+=-[]{};:~, | user |
|
||||
| Asignando un usuario como grupo | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 69191356252cda41acde328048794164 | group |
|
||||
| Asignando un usuario con type inexistente | 4224292655297723eb98691001100052 | 65496814252977243d57684076211485 | 69191356252cda41acde328048794164 | department |
|
||||
|
||||
|
||||
Scenario Outline: List assignees of an activity using different filters
|
||||
Given I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485/assignee?filter=<filter>&start=<start>&limit=<limit>"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "<type>"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| test_description | filter | start | limit | records | http_code | type |
|
||||
| lowercase | admin | 0 | 1 | 1 | 200 | array |
|
||||
| uppercase | ADMIN | 0 | 1 | 1 | 200 | array |
|
||||
| limit=3 | a | 0 | 3 | 3 | 200 | array |
|
||||
| limit and start | a | 1 | 2 | 2 | 200 | array |
|
||||
| high number for start | a | 1000 | 1 | 0 | 200 | array |
|
||||
| high number for start | a | 1000 | 0 | 0 | 200 | array |
|
||||
| empty result | xyz | 0 | 0 | 0 | 200 | array |
|
||||
| empty string | | 0 | 10000 | 3 | 200 | array |
|
||||
| empty string | | 1 | 2 | 2 | 200 | array |
|
||||
| invalid start | a | b | c | 0 | 400 | string|
|
||||
| invalid limit | a | 0 | c | 0 | 400 | string|
|
||||
| search 0 | 0 | 0 | 0 | 0 | 200 | array |
|
||||
| search 0 | 0 | 0 | 100 | 0 | 200 | array |
|
||||
| negative numbers | a | -10 | -20 | 0 | 400 | string|
|
||||
| real numbers | a | 0.0 | 1.0 | 1 | 200 | string|
|
||||
| real numbers | a | 0.0 | 0.0 | 3 | 200 | string|
|
||||
| real numbers | a | 0.1 | 1.4599 | 0 | 400 | string|
|
||||
| real numbers | a | 1.5 | 1.4599 | 0 | 400 | string|
|
||||
|
||||
|
||||
143
features/backend/triggers_resources/main_tests_triggers.feature
Normal file
143
features/backend/triggers_resources/main_tests_triggers.feature
Normal file
@@ -0,0 +1,143 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Testing triggers Main Tests
|
||||
Requirements:
|
||||
a workspace with the process 251815090529619a99a2bf4013294414 already loaded
|
||||
the process name is "Test (Triggers, Activity)"
|
||||
there are two triggers in the process
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: Get the Triggers List when there are exactly two triggers
|
||||
Given I request "project/251815090529619a99a2bf4013294414/triggers"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 2 records
|
||||
And the "tri_title" property in row 0 equals "For event: change description"
|
||||
And the "tri_title" property in row 1 equals "para eventos"
|
||||
|
||||
|
||||
|
||||
Scenario: Get a single trigger of a project
|
||||
the trigger is previously created
|
||||
Given I request "project/251815090529619a99a2bf4013294414/trigger/65317729852cf0ce339bfa4020392914"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And the "tri_title" property equals "For event: change description"
|
||||
And the "tri_description" property equals "Autogenerated For event: change description"
|
||||
|
||||
|
||||
Scenario Outline: Create 5 new triggers
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_title": "<tri_title>",
|
||||
"tri_description": "<tri_description>",
|
||||
"tri_type": "<tri_type>",
|
||||
"tri_webbot": "<tri_webbot>",
|
||||
"tri_param": "<tri_param>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/trigger"
|
||||
Then the response status code should be 201
|
||||
And store "tri_uid" in session array as variable "tri_uid_<tri_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | tri_number | tri_title | tri_description |tri_type | tri_webbot | tri_param |
|
||||
| Create trigger with title alphabetic and with webbot | 251815090529619a99a2bf4013294414 | 1 | nuevo trigger 1 | descripcion del primer trigger 1 |SCRIPT | @@user1 = @@USER_LOGGED; \n $x = rand(); | PRIVATE |
|
||||
| Create trigger with title alphanumeric and with webbot | 251815090529619a99a2bf4013294414 | 2 | otro trigger 2 | descripcion del segundo trigger 2 |SCRIPT | //Trigger with comments | PRIVATE |
|
||||
| Create trigger without webbot | 251815090529619a99a2bf4013294414 | 3 | otro trigger 3 | descripcion del tercer trigger 3 |SCRIPT | | PRIVATE |
|
||||
| Create trigger without tri type | 251815090529619a99a2bf4013294414 | 4 | otro trigger 4 | descripcion del tercer trigger 4 | | | PRIVATE |
|
||||
| Create trigger without tri param | 251815090529619a99a2bf4013294414 | 5 | otro trigger 5 | descripcion del tercer trigger 5 | | | |
|
||||
|
||||
|
||||
Scenario: Get the Triggers List when there are 7 records
|
||||
Given I request "project/251815090529619a99a2bf4013294414/triggers"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 7 records
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Update the Triggers and then check if the values had changed
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"tri_title": "<tri_title>",
|
||||
"tri_description": "<tri_description>",
|
||||
"tri_type": "<tri_type>",
|
||||
"tri_webbot": "<tri_webbot>",
|
||||
"tri_param": "<tri_param>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "tri_uid" stored in session array as variable "tri_uid_<tri_number>"
|
||||
And I request "project/<project>/trigger"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | tri_number | tri_title | tri_description |tri_type | tri_webbot | tri_param |
|
||||
| Update title | 251815090529619a99a2bf4013294414 | 1 | Update nuevo trigger 1 @#$%^&*½²³€¼½ | descripcion del primer trigger 1 |SCRIPT | @@user1 = @@USER_LOGGED; \n $x = rand(); | PRIVATE |
|
||||
| Update Description | 251815090529619a99a2bf4013294414 | 2 | otro trigger 2 | Update descripcion del segundo trigger 2 @#$%^&*½²³€¼½ |SCRIPT | //Trigger with comments | PRIVATE |
|
||||
| Update webbot | 251815090529619a99a2bf4013294414 | 3 | otro trigger 3 | descripcion del tercer trigger 3 |SCRIPT | //Trigger with comments update | PRIVATE |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Get a single triggers and check some properties
|
||||
Given that I want to get a resource with the key "tri_uid" stored in session array as variable "tri_uid_<tri_number>"
|
||||
And I request "project/<project>/trigger"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "tri_title" is set to "<tri_title>"
|
||||
And that "tri_description" is set to "<tri_description>"
|
||||
And that "tri_webbot" is set to "<tri_webbot>"
|
||||
|
||||
Examples:
|
||||
|
||||
| project | tri_number | tri_title | tri_description | tri_webbot |
|
||||
| 251815090529619a99a2bf4013294414 | 1 | Update nuevo trigger 1 @#$%^&*½²³€¼½ | descripcion del primer trigger 1 | @@user1 = @@USER_LOGGED; \n $x = rand(); |
|
||||
| 251815090529619a99a2bf4013294414 | 2 | otro trigger 2 | Update descripcion del segundo trigger 2 @#$%^&*½²³€¼½ | //Trigger with comments |
|
||||
| 251815090529619a99a2bf4013294414 | 3 | otro trigger 3 | descripcion del tercer trigger 3 | //Trigger with comments update |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Delete all Triggers created previously in this script
|
||||
Given that I want to delete a resource with the key "tri_uid" stored in session array as variable "tri_uid_<tri_number>"
|
||||
And I request "project/<project>/trigger"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| project | tri_number |
|
||||
| 251815090529619a99a2bf4013294414 | 1 |
|
||||
| 251815090529619a99a2bf4013294414 | 2 |
|
||||
| 251815090529619a99a2bf4013294414 | 3 |
|
||||
| 251815090529619a99a2bf4013294414 | 4 |
|
||||
| 251815090529619a99a2bf4013294414 | 5 |
|
||||
|
||||
|
||||
Scenario: Get the Triggers List when there are exactly two triggers
|
||||
Given I request "project/251815090529619a99a2bf4013294414/triggers"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 2 records
|
||||
And the "tri_title" property in row 0 equals "For event: change description"
|
||||
And the "tri_title" property in row 1 equals "para eventos"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Triggers Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Create a new Triggers for a project with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_title": "<tri_title>",
|
||||
"tri_description": "<tri_description>",
|
||||
"tri_type": "<tri_type>",
|
||||
"tri_webbot": "<tri_webbot>",
|
||||
"tri_param": "<tri_param>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/trigger"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | tri_title | tri_description |tri_type | error_code | error_message |
|
||||
| Field required tri title | 251815090529619a99a2bf4013294414 | | Trigger con nombre en blanco |SCRIPT | 400 | tri_title |
|
||||
|
||||
Reference in New Issue
Block a user