Merge branch 'master' of bitbucket.org:colosa/processmaker

This commit is contained in:
Brayan Osmar Pereyra Suxo
2014-04-07 12:23:37 -04:00
13 changed files with 678 additions and 293 deletions

View File

@@ -74,7 +74,7 @@ Scenario Outline: Create a new case in workspace with process "Derivation rules
{ {
"pro_uid": "<pro_uid>", "pro_uid": "<pro_uid>",
"tas_uid": "<tas_uid>", "tas_uid": "<tas_uid>",
"variables": [{"name": "admin", "lastname":"admin"}] "variables": [{"name": "admin", "amount":"1030"}]
} }
""" """
And I request "cases" And I request "cases"

View File

@@ -1,7 +1,8 @@
@ProcessMakerMichelangelo @RestAPI @ProcessMakerMichelangelo @RestAPI
Feature: Cases Actions - the features in this script are (getCaseInfo, taskCase, newCase, newCaseImpersonate, reassignCase and routeCase) Feature: Cases Actions - the features in this script are (getCaseInfo, taskCase, newCase, newCaseImpersonate, reassignCase, routeCase, cancelCase, pauseCase, unpauseCase, executeTrigger, DELETE Case)
Requirements: Requirements:
a workspace with five cases of the process "Test micheangelo" and "Test Users-Step-Properties End Point" a workspace with 57 cases distributed in the processes "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection", "Derivation rules - sequential"
Background: Background:
Given that I have a valid access_token Given that I have a valid access_token
@@ -48,7 +49,7 @@ Scenario: Returns a list of the cases for the logged in user (Paused)
And the response has 12 records And the response has 12 records
Scenario: Returns information about a given case of the list Inbox of process "Derivation rules - Parallel" Scenario: Returns information about a given case of the list Inbox
Given I request "cases/220090038533b0c40688174019225585" Given I request "cases/220090038533b0c40688174019225585"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
@@ -58,7 +59,7 @@ Scenario: Returns information about a given case of the list Inbox of process "D
And the "app_name" property equals "#137" And the "app_name" property equals "#137"
And the "app_status" property equals "TO_DO" And the "app_status" property equals "TO_DO"
And the "app_init_usr_uid" property equals "00000000000000000000000000000001" And the "app_init_usr_uid" property equals "00000000000000000000000000000001"
And the "app_init_usr_username" property equals "Administrator" And the "app_init_usr_username" property equals "Administrator "
And the "pro_uid" property equals "35894775350ec7daa099378048029617" And the "pro_uid" property equals "35894775350ec7daa099378048029617"
And the "pro_name" property equals "Derivation rules - Parallel" And the "pro_name" property equals "Derivation rules - Parallel"
And the "app_create_date" property equals "2014-04-01 14:58:08" And the "app_create_date" property equals "2014-04-01 14:58:08"
@@ -66,7 +67,7 @@ Scenario: Returns information about a given case of the list Inbox of process "D
Scenario: Returns the current task for a given case of the list Inbox Scenario: Returns the current task for a given case of the list Inbox
Given I request "cases/48177942153275bfa28bd04070312685/current-task" Given I request "cases/356811158533b13641ef789000630231/current-task"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
@@ -76,58 +77,49 @@ Scenario: Returns the current task for a given case of the list Inbox
Scenario Outline: Create a new case in workspace with process "Derivation rules - sequential", "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection" Scenario Outline: Create a new case in workspace with process "Derivation rules - sequential", "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection"
Given POST this data: Given POST this data:
""" """
{ {
"pro_uid": "<pro_uid>", "pro_uid": "<pro_uid>",
"tas_uid": "<tas_uid>", "tas_uid": "<tas_uid>",
"variables": [{"name": "admin", "lastname":"admin"}] "variables": [{"name": "admin", "amount":"1030"}]
} }
""" """
And I request "cases" And I request "cases"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "object" And the type is "object"
And store "app_uid" in session array as variable "app_uid_<app_uid_number>" And store "app_uid" in session array as variable "app_uid_<case_number>"
And store "app_number" in session array as variable "app_number_<app_uid_number>" And store "app_number" in session array as variable "app_number_<case_number>"
Examples: Examples:
| Description | app_uid_number | pro_uid | tas_uid | variables | | Description | case_number | pro_uid | tas_uid |
| Create new case with process "Derivation rules - sequential" | 1 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 | | | Create new case with process "Derivation rules - sequential" | 1 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 |
| Create new case with process "Derivation rules - evaluation" | 2 | 46279907250ec73b9b25a78031279680 | 99371337850ec73c0a38eb6024620271 | | | Create new case with process "Derivation rules - evaluation" | 2 | 46279907250ec73b9b25a78031279680 | 99371337850ec73c0a38eb6024620271 |
| Create new case with process "Derivation rules - Parallel" | 3 | 35894775350ec7daa099378048029617 | 52838134750ec7dd0989fc0015625952 | | | Create new case with process "Derivation rules - Parallel" | 3 | 35894775350ec7daa099378048029617 | 52838134750ec7dd0989fc0015625952 |
| Create new case with process "Derivation rules - parallel evaluation" | 4 | 34579467750ec8d55e8b115057818502 | 89648437550ec8d593c2159010276089 | | | Create new case with process "Derivation rules - parallel evaluation" | 4 | 34579467750ec8d55e8b115057818502 | 89648437550ec8d593c2159010276089 |
| Create new case with process "Derivation rules - selection" | 5 | 82458496050ec668981ecc7039804404 | 56900024450ec668e4a9243080698854 | | | Create new case with process "Derivation rules - selection" | 5 | 82458496050ec668981ecc7039804404 | 56900024450ec668e4a9243080698854 |
| Create new case with process "Derivation rules - sequential" | 6 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 |
| Create new case with process "Derivation rules - evaluation" | 7 | 46279907250ec73b9b25a78031279680 | 99371337850ec73c0a38eb6024620271 |
| Create new case with process "Derivation rules - Parallel" | 8 | 35894775350ec7daa099378048029617 | 52838134750ec7dd0989fc0015625952 |
Scenario Outline: Create a new case Impersonate in workspace with process "Derivation rules - sequential", "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection" | Create new case with process "Derivation rules - parallel evaluation" | 9 | 34579467750ec8d55e8b115057818502 | 89648437550ec8d593c2159010276089 |
Given POST this data: | Create new case with process "Derivation rules - selection" | 10 | 82458496050ec668981ecc7039804404 | 56900024450ec668e4a9243080698854 |
""" | Create new case with process "Derivation rules - sequential" | 11 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 |
{ | Create new case with process "Derivation rules - evaluation" | 12 | 46279907250ec73b9b25a78031279680 | 99371337850ec73c0a38eb6024620271 |
"pro_uid": "<pro_uid>", | Create new case with process "Derivation rules - Parallel" | 13 | 35894775350ec7daa099378048029617 | 52838134750ec7dd0989fc0015625952 |
"usr_uid": "<usr_uid>", | Create new case with process "Derivation rules - parallel evaluation" | 14 | 34579467750ec8d55e8b115057818502 | 89648437550ec8d593c2159010276089 |
"tas_uid": "<tas_uid>", | Create new case with process "Derivation rules - selection" | 15 | 82458496050ec668981ecc7039804404 | 56900024450ec668e4a9243080698854 |
"variables": [{"name": "pruebaQA", "amount":"10400"}] | Create new case with process "Derivation rules - sequential" | 16 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 |
} | Create new case with process "Derivation rules - evaluation" | 17 | 46279907250ec73b9b25a78031279680 | 99371337850ec73c0a38eb6024620271 |
""" | Create new case with process "Derivation rules - Parallel" | 18 | 35894775350ec7daa099378048029617 | 52838134750ec7dd0989fc0015625952 |
And I request "cases/impersonate" | Create new case with process "Derivation rules - parallel evaluation" | 19 | 34579467750ec8d55e8b115057818502 | 89648437550ec8d593c2159010276089 |
Then the response status code should be 200 | Create new case with process "Derivation rules - selection" | 20 | 82458496050ec668981ecc7039804404 | 56900024450ec668e4a9243080698854 |
And the response charset is "UTF-8" | Create new case with process "Derivation rules - sequential" | 21 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 |
And the content type is "application/json" | Create new case with process "Derivation rules - evaluation" | 22 | 46279907250ec73b9b25a78031279680 | 99371337850ec73c0a38eb6024620271 |
And the type is "object" | Create new case with process "Derivation rules - Parallel" | 23 | 35894775350ec7daa099378048029617 | 52838134750ec7dd0989fc0015625952 |
And store "app_uid" in session array as variable "app_uid_<app_uid_number>" | Create new case with process "Derivation rules - parallel evaluation" | 24 | 34579467750ec8d55e8b115057818502 | 89648437550ec8d593c2159010276089 |
And store "app_number" in session array as variable "app_number_<app_uid_number>" | Create new case with process "Derivation rules - selection" | 25 | 82458496050ec668981ecc7039804404 | 56900024450ec668e4a9243080698854 |
Examples:
| Description | app_uid_number | pro_uid | usr_uid | tas_uid | variables |
| Create new case with process "Derivation rules - sequential" - Case Start with chris | 6 | 99209594750ec27ea338927000421575 | 24166330352d56730cdd525035621101 | 68707275350ec281ada1c95068712556 | |
| Create new case with process "Derivation rules - evaluation" - Case Start with adam | 7 | 46279907250ec73b9b25a78031279680 | 44811996752d567110634a1013636964 | 99371337850ec73c0a38eb6024620271 | |
| Create new case with process "Derivation rules - Parallel" - Case Start with aaron | 8 | 35894775350ec7daa099378048029617 | 51049032352d56710347233042615067 | 52838134750ec7dd0989fc0015625952 | |
| Create new case with process "Derivation rules - parallel evaluation"- Case Start with jeremiah | 9 | 34579467750ec8d55e8b115057818502 | 86677227852d5671f40ba25017213081 | 89648437550ec8d593c2159010276089 | |
| Create new case with process "Derivation rules - selection" - Case Start with admin | 10 | 82458496050ec668981ecc7039804404 | 62625000752d5672d6661e6072881167 | 56900024450ec668e4a9243080698854 | |
Scenario: Returns a list of the cases for the logged in user (Draft) Scenario: Returns a list of the cases for the logged in user (Draft)
@@ -135,7 +127,34 @@ Scenario: Returns a list of the cases for the logged in user (Draft)
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
And the response has 11 records And the response has 30 records
Scenario Outline: Create a new case Impersonate in workspace with process "Derivation rules - sequential", "Derivation rules - evaluation", "Derivation rules - Parallel", "Derivation rules - parallel evaluation", "Derivation rules - selection"
Given POST this data:
"""
{
"pro_uid": "99209594750ec27ea338927000421575",
"usr_uid": "<usr_uid>",
"tas_uid": "68707275350ec281ada1c95068712556",
"variables": [{"name": "pruebaQA", "amount":"10400"}]
}
"""
And I request "cases/impersonate"
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 store "app_uid" in session array as variable "app_uid_<case_number>"
And store "app_number" in session array as variable "app_number_<case_number>"
Examples:
| Description | case_number | usr_uid |
| Create new case with process "Derivation rules - sequential" - Case Start with chris | 26 | 51049032352d56710347233042615067 |
| Create new case with process "Derivation rules - evaluation" - Case Start with adam | 27 | 44811996752d567110634a1013636964 |
| Create new case with process "Derivation rules - Parallel" - Case Start with aaron | 28 | 24166330352d56730cdd525035621101 |
| Create new case with process "Derivation rules - parallel evaluation"- Case Start with jeremiah | 29 | 86677227852d5671f40ba25017213081 |
| Create new case with process "Derivation rules - selection" - Case Start with admin | 30 | 62625000752d5672d6661e6072881167 |
Scenario Outline: Reassigns a case to a different user Scenario Outline: Reassigns a case to a different user
@@ -143,24 +162,129 @@ Scenario Outline: Reassigns a case to a different user
""" """
{ {
"usr_uid_source": "<usr_uid_source>", "usr_uid_source": "<usr_uid_source>",
"usr_uid_target": "<usr_uid_target>", "usr_uid_target": "<usr_uid_target>"
} }
""" """
And that I want to update a resource with the key "app_uid_<app_uid_number>" stored in session array And I request "cases/app_uid/reassign-case" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
And I request "cases/app_uid/reassign-case" with the key "app_uid" stored in session array as variable "app_uid_<app_uid_number>" Then the response status code should be 200
Then the response status code should be 200 And the content type is "application/json"
And the content type is "application/json" And the response charset is "UTF-8"
And the response charset is "UTF-8" And the type is "object"
And the type is "object"
Examples: Examples:
| test_description | case_number | usr_uid_source | usr_uid_target |
| Reassign the user adam | 1 | 00000000000000000000000000000001 | 44811996752d567110634a1013636964 |
| Reassign the user aaron | 2 | 00000000000000000000000000000001 | 51049032352d56710347233042615067 |
| Reassign the user jeremiah | 3 | 00000000000000000000000000000001 | 86677227852d5671f40ba25017213081 |
| Reassign the user chris | 4 | 00000000000000000000000000000001 | 24166330352d56730cdd525035621101 |
| Reassign the user zachary | 5 | 00000000000000000000000000000001 | 62625000752d5672d6661e6072881167 |
| Reassign the user admin | 26 | 99209594750ec27ea338927000421575 | 00000000000000000000000000000001 |
Scenario: Returns a list of the cases for the logged in user (Draft)
Given I request "cases/draft"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 30 records
Scenario Outline: Returns the variables can be system variables and/or case variables.
Given I request "cases/app_uid/variables" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And the "ar" property equals ""
And the "br" property equals ""
And the "ba" property equals ""
Examples:
| test_description | case_number |
| Derivate case of the process "Derivation rules - sequential" | 6 |
Scenario Outline: Sends variables to a case
Given PUT this data:
"""
{
"continue": "yes",
"tasks": "Cyclical"
}
"""
And I request "cases/app_uid/variable" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
Then the response status code should be 200
And the content type is "application/json"
And the response charset is "UTF-8"
And the type is "object"
Examples:
| test_description | case_number |
| Derivate case of the process "Derivation rules - sequential" | 6 |
| Derivate case of the process "Derivation rules - evaluation" | 7 |
| Derivate case of the process "Derivation rules - Parallel" | 8 |
| Derivate case of the process "Derivation rules - parallel evaluation" | 9 |
| Derivate case of the process "Derivation rules - selection" | 10 |
| Derivate case of the process "Derivation rules - evaluation" | 27 |
Scenario Outline: Route a case to the next task in the process
Given PUT this data:
"""
{
"case_uid": "<case_number>",
"del_index": "1"
}
"""
And I request "cases/app_uid/route-case" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
Then the response status code should be 200
And the content type is "application/json"
And the response charset is "UTF-8"
And the type is "object"
Examples:
| test_description | case_number |
| Derivate case of the process "Derivation rules - sequential" | 6 |
| Derivate case of the process "Derivation rules - evaluation" | 7 |
| Derivate case of the process "Derivation rules - Parallel" | 8 |
| Derivate case of the process "Derivation rules - parallel evaluation" | 9 |
| Derivate case of the process "Derivation rules - selection" | 10 |
| Derivate case of the process "Derivation rules - evaluation" | 27 |
Scenario Outline: Returns the variables can be system variables and/or case variables.
Given I request "cases/app_uid/variables" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
| Description | app_uid_number | usr_uid_source | usr_uid_target |
| Reassign the user adam | 1 | 00000000000000000000000000000001 | 44811996752d567110634a1013636964 | And the "ar" property equals "OK"
| Reassign the user aaron | 2 | 00000000000000000000000000000001 | 51049032352d56710347233042615067 | And the "br" property equals "OK"
| Reassign the user admin | 6 | 24166330352d56730cdd525035621101 | 00000000000000000000000000000001 | And the "ba" property equals "OK"
| Reassign the user admin | 7 | 44811996752d567110634a1013636964 | 00000000000000000000000000000001 |
Examples:
| test_description | case_number |
| Derivate case of the process "Derivation rules - sequential" | 6 |
Scenario: Returns a list of the cases for the logged in user (Inbox)
Given I request "cases"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 18 records
Scenario Outline: Cancel a case Scenario Outline: Cancel a case
Given PUT this data: Given PUT this data:
@@ -169,8 +293,7 @@ Scenario Outline: Cancel a case
} }
""" """
And that I want to update a resource with the key "app_uid_<app_uid_number>" stored in session array And I request "cases/app_uid/cancel" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
And I request "cases/app_uid/cancel" with the key "app_uid" stored in session array as variable "app_uid_<app_uid_number>"
Then the response status code should be 200 Then the response status code should be 200
And the content type is "application/json" And the content type is "application/json"
And the response charset is "UTF-8" And the response charset is "UTF-8"
@@ -178,21 +301,23 @@ Scenario Outline: Cancel a case
Examples: Examples:
| Description | app_uid_number | | Description | case_number |
| Cancel of the process "Derivation rules - Parallel" | 3 | | Cancel of the process "Derivation rules - sequential" | 11 |
| Cancel of the process "Derivation rules - parallel evaluation" | 5 | | Cancel of the process "Derivation rules - evaluation" | 12 |
| Cancel of the process "Derivation rules - selection" | 10 | | Cancel of the process "Derivation rules - Parallel" | 13 |
| Cancel of the process "Derivation rules - parallel evaluation" | 14 |
| Cancel of the process "Derivation rules - selection" | 15 |
| Cancel of the process "Derivation rules - Parallel" | 28 |
Scenario Outline: Pause a case Scenario Outline: Pause a case
Given PUT this data: Given PUT this data:
""" """
{ {
"unpaused_date": "2016-12-12"
} }
""" """
And that I want to update a resource with the key "app_uid_<app_uid_number>" stored in session array And I request "cases/app_uid/pause" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
And I request "cases/app_uid/pause" with the key "app_uid" stored in session array as variable "app_uid_<app_uid_number>"
Then the response status code should be 200 Then the response status code should be 200
And the content type is "application/json" And the content type is "application/json"
And the response charset is "UTF-8" And the response charset is "UTF-8"
@@ -200,10 +325,21 @@ Scenario Outline: Pause a case
Examples: Examples:
| Description | app_uid_number | | Description | case_number |
| Pause of the process "Derivation rules - parallel evaluation" | 4 | | Pause of the process "Derivation rules - sequential" | 16 |
| Pause of the process "Derivation rules - Parallel" | 8 | | Pause of the process "Derivation rules - evaluation" | 17 |
| Pause of the process "Derivation rules - parallel evaluation" | 9 | | Pause of the process "Derivation rules - Parallel" | 18 |
| Pause of the process "Derivation rules - parallel evaluation" | 19 |
| Pause of the process "Derivation rules - selection" | 20 |
| Pause of the process "Derivation rules - parallel evaluation" | 29 |
Scenario: Returns a list of the cases for the logged in user (Paused)
Given I request "cases/paused"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 17 records
Scenario Outline: Unpause a case Scenario Outline: Unpause a case
@@ -213,8 +349,7 @@ Scenario Outline: Unpause a case
} }
""" """
And that I want to update a resource with the key "app_uid_<app_uid_number>" stored in session array And I request "cases/app_uid/unpause" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
And I request "cases/app_uid/unpause" with the key "app_uid" stored in session array as variable "app_uid_<app_uid_number>"
Then the response status code should be 200 Then the response status code should be 200
And the content type is "application/json" And the content type is "application/json"
And the response charset is "UTF-8" And the response charset is "UTF-8"
@@ -222,84 +357,130 @@ Scenario Outline: Unpause a case
Examples: Examples:
| Description | app_uid_number | | Description | case_number |
| Unpause of the process "Derivation rules - parallel evaluation" | 4 | | Unpause of the process "Derivation rules - sequential" | 16 |
| Unpause of the process "Derivation rules - Parallel" | 8 | | Unpause of the process "Derivation rules - evaluation" | 17 |
| Unpause of the process "Derivation rules - parallel evaluation" | 9 | | Unpause of the process "Derivation rules - Parallel" | 18 |
| Unpause of the process "Derivation rules - parallel evaluation" | 19 |
| Unpause of the process "Derivation rules - selection" | 20 |
| Unpause of the process "Derivation rules - parallel evaluation" | 29 |
Scenario Outline: Trigger a case Scenario: Returns a list of the cases for the logged in user (Paused)
Given PUT this data: Given I request "cases/paused"
"""
{
}
"""
And that I want to update a resource with the key "app_uid_<app_uid_number>" stored in session array
And I request "cases/app_uid/execute-trigger/{tri_uid}" with the key "app_uid" stored in session array as variable "app_uid_<app_uid_number>"
Then the response status code should be 200 Then the response status code should be 200
And the content type is "application/json"
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "object" And the type is "array"
And the response has 12 records
Examples:
| Description | app_uid_number |
| | |
| | |
| | |
Scenario Outline: Executes a ProcessMaker trigger for a case
Scenario Outline: Route a case to the next task in the process
Given PUT this data: Given PUT this data:
""" """
{ {
} }
""" """
And that I want to update a resource with the key "app_uid_<app_uid_number>" stored in session array And I request "cases/app_uid/execute-trigger/<tri_uid>" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
And I request "case/app_uid/route-case" with the key "app_uid" stored in session array as variable "app_uid_<app_uid_number>"
Then the response status code should be 200 Then the response status code should be 200
And the content type is "application/json" And the content type is "application/json"
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "object" And the type is "object"
Examples: Examples:
| Description | app_uid_number | | test_description | case_number | tri_uid |
| Route next activity "Derivation rules - sequential" | 1 | | Ejecucion de trigger | 5 | 54962158250ec613ba5bc89016850103 |
| Route next activity "Derivation rules - evaluation" | 2 |
| Route next activity "Derivation rules - Parallel" | 3 |
| Route next activity "Derivation rules - parallel evaluation" | 4 |
| Route next activity "Derivation rules - selection" | 5 |
| Route next activity "Derivation rules - sequential" | 6 |
| Route next activity "Derivation rules - evaluation" | 7 |
| Route next activity "Derivation rules - Parallel" | 8 |
| Route next activity "Derivation rules - parallel evaluation" | 9 |
| Route next activity "Derivation rules - selection" | 10 |
Scenario Outline: Delete a case
Given PUT this data:
"""
{
}
"""
And that I want to delete a resource with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
And I request "cases"
Then the response status code should be 200
And the content type is "application/json"
And the response charset is "UTF-8"
And the type is "object"
Scenario Outline: Delete of the cases created in this script. Examples:
Given that I want to delete a resource with the key "app_doc_uid" stored in session array as variable "app_doc_uid_<app_doc_uid_number>"
And I request "cases/551390121533343ee886813057396196/output-document" | test_description | case_number |
And the response status code should be 200 | Delete a case 1, created in this script | 1 |
And the content type is "application/json" | Delete a case 2, created in this script | 2 |
| Delete a case 3, created in this script | 3 |
| Delete a case 4, created in this script | 4 |
| Delete a case 5, created in this script | 5 |
| Delete a case 6, created in this script | 6 |
| Delete a case 7, created in this script | 7 |
| Delete a case 8, created in this script | 8 |
| Delete a case 9, created in this script | 9 |
| Delete a case 10, created in this script | 10 |
| Delete a case 11, created in this script | 11 |
| Delete a case 12, created in this script | 12 |
| Delete a case 13, created in this script | 13 |
| Delete a case 14, created in this script | 14 |
| Delete a case 15, created in this script | 15 |
| Delete a case 16, created in this script | 16 |
| Delete a case 17, created in this script | 17 |
| Delete a case 18, created in this script | 18 |
| Delete a case 19, created in this script | 19 |
| Delete a case 20, created in this script | 20 |
| Delete a case 21, created in this script | 21 |
| Delete a case 22, created in this script | 22 |
| Delete a case 23, created in this script | 23 |
| Delete a case 24, created in this script | 24 |
| Delete a case 25, created in this script | 25 |
| Delete a case 26, created in this script | 26 |
| Delete a case 27, created in this script | 27 |
| Delete a case 28, created in this script | 28 |
| Delete a case 29, created in this script | 29 |
| Delete a case 30, created in this script | 30 |
#Listado de casos
Scenario: Returns a list of the cases for the logged in user (Inbox)
Given I request "cases"
Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "object" And the type is "array"
And the response has 14 records
Examples:
| app_doc_uid_number | Scenario: Returns a list of the cases for the logged in user (Draft)
| 1 | Given I request "cases/draft"
| 2 | Then the response status code should be 200
| 3 | And the response charset is "UTF-8"
| 4 | And the type is "array"
| 5 | And the response has 15 records
| 6 |
| 7 |
| 8 | Scenario: Returns a list of the cases for the logged in user (Participated)
| 9 | Given I request "cases/participated"
| 10 | Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 30 records
Scenario: Returns a list of the cases for the logged in user (Unassigned)
Given I request "cases/unassigned"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 12 records
Scenario: Returns a list of the cases for the logged in user (Paused)
Given I request "cases/paused"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 12 records

View File

@@ -0,0 +1,123 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Cases Actions - the features in this script are (getCaseInfo, taskCase, newCase, newCaseImpersonate, reassignCase, routeCase, cancelCase, pauseCase, unpauseCase, executeTrigger and DELETE Case) Negative Tests
Background:
Given that I have a valid access_token
Scenario Outline: Create a new case (Negative Test)
Given POST this data:
"""
{
"pro_uid": "<pro_uid>",
"tas_uid": "<tas_uid>",
"variables": [{"name": "admin", "amount":"1030"}]
}
"""
And I request "cases"
Then the response status code should be <error_code>
And the response status message should have the following text "<error_message>"
Examples:
| Description | pro_uid | tas_uid | error_code | error_message |
| Create new case with pro_uid wrong | 99209594750ec1111111927000421575 | 68707275350ec281ada1c95068712556 | 400 | pro_uid |
| Create new case with task_uid wrong | 46279907250ec73b9b25a78031279680 | 99371337811111111111116024620271 | 400 | task_uid |
| Create new case without pro_uid | | 52838134750ec7dd0989fc0015625952 | 400 | pro_uid |
| Create new case without tas_uid | 34579467750ec8d55e8b115057818502 | | 400 | task_uid |
| Create new case whith pro_uid and tas_uid wrong | 8245849601111111181ecc7039804404 | 5690001111111118e4a9243080698854 | 400 | pro_uid |
Scenario Outline: Create a new case Impersonate (Negative Test)
Given POST this data:
"""
{
"pro_uid": "99209594750ec27ea338927000421575",
"usr_uid": "<usr_uid>",
"tas_uid": "68707275350ec281ada1c95068712556",
"variables": [{"name": "pruebaQA", "amount":"10400"}]
}
"""
And I request "cases/impersonate"
Then the response status code should be <error_code>
And the response status message should have the following text "<error_message>"
Examples:
| Description | case_number | usr_uid | error_code | error_message |
| Create new case with process "Derivation rules - sequential" - Case Start with chris | 26 | 51049032352d56710347233042615067 | 400 | pro_uid |
| Create new case with process "Derivation rules - evaluation" - Case Start with adam | 27 | 44811996752d567110634a1013636964 | 400 | task_uid |
| Create new case with process "Derivation rules - Parallel" - Case Start with aaron | 28 | 24166330352d56730cdd525035621101 | 400 | pro_uid |
| Create new case with process "Derivation rules - parallel evaluation"- Case Start with jeremiah | 29 | 86677227852d5671f40ba25017213081 | 400 | task_uid |
| Create new case with process "Derivation rules - selection" - Case Start with admin | 30 | 62625000752d5672d6661e6072881167 | 400 | |
Scenario Outline: Create a case, derivate and cancel. then try do pause or route
#Create case
Given POST this data:
"""
{
"pro_uid": "<pro_uid>",
"tas_uid": "<tas_uid>",
"variables": [{"name": "admin", "amount":"1030"}]
}
"""
And I request "cases"
Then the response status code should be 200
And store "app_uid" in session array as variable "app_uid_<case_number>"
#Send some variables
And PUT this data:
"""
{
"continue": "yes",
"tasks": "Cyclical"
}
"""
And I request "cases/app_uid/variable" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
Then the response status code should be 200
And the content type is "application/json"
And the response charset is "UTF-8"
And the type is "object"
#Cancel case
And PUT this data:
"""
{
}
"""
And I request "cases/app_uid/cancel" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
Then the response status code should be 200
And the content type is "application/json"
And the response charset is "UTF-8"
And the type is "object"
#Route case: it should not allow
And PUT this data:
"""
{
"case_uid": "<case_number>",
"del_index": "1"
}
"""
And I request "cases/app_uid/route-case" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
Then the response status code should be 400
And the response status message should have the following text "<error_message_route>"
#Pause case
And PUT this data:
"""
{
"unpaused_date": "2016-12-12"
}
"""
And I request "cases/app_uid/pause" with the key "app_uid" stored in session array as variable "app_uid_<case_number>"
Then the response status code should be 400
And the response status message should have the following text "<error_message_pause>"
Examples:
| Description | case_number | pro_uid | tas_uid | error_message_route | error_message_pause |
| Create new case with process "Derivation rules - sequential" | 1 | 99209594750ec27ea338927000421575 | 68707275350ec281ada1c95068712556 | This case delegation is already closed | This case delegation is already closed |

View File

@@ -9,6 +9,7 @@ Background:
Scenario: List of case notes for this case Scenario: List of case notes for this case
Given I request "cases/1185553665335d2e209f723099733152/notes" Given I request "cases/1185553665335d2e209f723099733152/notes"
the response time should at least be (\d+) milliseconds$/
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
@@ -30,7 +31,7 @@ Scenario: Create a new case note for specified case
} }
""" """
And I request "cases/1185553665335d2e209f723099733152/note" And I request "cases/1185553665335d2e209f723099733152/note"
Then the response status code should be 201 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "object" And the type is "object"

View File

@@ -8,7 +8,7 @@ Background:
Scenario: List of case notes for this case Scenario: List of case notes for this case
Given I request "cases/{uid}/notes" Given I request "cases/1185553665335d2e209f723099733152/notes"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
@@ -22,7 +22,7 @@ Scenario: Create a new case note for specified case
"send_email": 1 "send_email": 1
} }
""" """
And I request "case/{uid}/case" And I request "case/1185553665335d2e209f723099733152/case"
Then the response status code should be 201 Then the response status code should be 201
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"

View File

@@ -47,32 +47,32 @@ Scenario: Returns the variables can be system variables and/or case variables.
And the "date4" property equals "2014-03-01" And the "date4" property equals "2014-03-01"
And the "suggest2" property equals "51049032352d56710347233042615067" And the "suggest2" property equals "51049032352d56710347233042615067"
And the "suggest2_label" property equals "aaron" And the "suggest2_label" property equals "aaron"
And the "sample" property in row 1 of property "grid" equals "jose" And the "sample" property in object 1 of property "grid" equals "jose"
And the "currency1" property equals "12,334,444.00" And the "currency1" property in object 1 of property "grid" equals "12,334,444.00"
And the "percentage1" property equals "333.00 %" And the "percentage1" property in object 1 of property "grid" equals "333.00 %"
And the "suggest1_label" property equals "gavin" And the "suggest1_label" property in object 1 of property "grid" equals "gavin"
And the "suggest1" property equals "33140476452d5671b0abda5073786635" And the "suggest1" property in object 1 of property "grid" equals "33140476452d5671b0abda5073786635"
And the "textarea1" property equals "ninguno" And the "textarea1" property in object 1 of property "grid" equals "ninguno"
And the "dropdown1" property equals "dos" And the "dropdown1" property in object 1 of property "grid" equals "dos"
And the "dropdown1_label" property equals "dos" And the "dropdown1_label" property in object 1 of property "grid" equals "dos"
And the "yesno1" property equals "1" And the "yesno1" property in object 1 of property "grid" equals "1"
And the "checkbox1" property equals "On" And the "checkbox1" property in object 1 of property "grid" equals "On"
And the "date1" property equals "2014-03-13" And the "date1" property in object 1 of property "grid" equals "2014-03-13"
And the "link1" property equals "http://www.google.com/" And the "link1" property in object 1 of property "grid" equals "http://www.google.com/"
And the "link1_label" property equals "link1" And the "link1_label" property in object 1 of property "grid" equals "link1"
And the "sample" property equals "maria" And the "sample" property in object 2 of property "grid" equals "maria"
And the "currency1" property equals "132,424.00" And the "currency1" property in object 2 of property "grid" equals "132,424.00"
And the "percentage1" property equals "344.00 %" And the "percentage1" property in object 2 of property "grid" equals "344.00 %"
And the "suggest1_label" property equals "emily" And the "suggest1_label" property in object 2 of property "grid" equals "emily"
And the "suggest1" property equals "34289569752d5673d310e82094574281" And the "suggest1" property in object 2 of property "grid" equals "34289569752d5673d310e82094574281"
And the "textarea1" property equals "sample" And the "textarea1" property in object 2 of property "grid" equals "sample"
And the "dropdown1" property equals "uno" And the "dropdown1" property in object 2 of property "grid" equals "uno"
And the "dropdown1_label" property equals "uno" And the "dropdown1_label" property in object 2 of property "grid" equals "uno"
And the "yesno1" property equals "0" And the "yesno1" property in object 2 of property "grid" equals "0"
And the "checkbox1" property equals "Off" And the "checkbox1" property in object 2 of property "grid" equals "Off"
And the "date1" property equals "2014-03-29" And the "date1" property in object 2 of property "grid" equals "2014-03-29"
And the "link1" property equals "http://www.google.com/" And the "link1" property in object 2 of property "grid" equals "http://www.google.com/"
And the "link1_label" property equals "link1" And the "link1_label" property in object 2 of property "grid" equals "link1"
Scenario: Sends variables to a case Scenario: Sends variables to a case
@@ -243,29 +243,29 @@ Scenario: Returns the variables can be system variables and/or case variables.
And the "date4" property equals "2014-03-01" And the "date4" property equals "2014-03-01"
And the "suggest2" property equals "51049032352d56710347233042615067" And the "suggest2" property equals "51049032352d56710347233042615067"
And the "suggest2_label" property equals "aaron" And the "suggest2_label" property equals "aaron"
And the "sample" property equals "jose" And the "sample" property in object 1 of property "grid" equals "jose"
And the "currency1" property equals "12,334,444.00" And the "currency1" property in object 1 of property "grid" equals "12,334,444.00"
And the "percentage1" property equals "333.00 %" And the "percentage1" property in object 1 of property "grid" equals "333.00 %"
And the "suggest1_label" property equals "gavin" And the "suggest1_label" property in object 1 of property "grid" equals "gavin"
And the "suggest1" property equals "33140476452d5671b0abda5073786635" And the "suggest1" property in object 1 of property "grid" equals "33140476452d5671b0abda5073786635"
And the "textarea1" property equals "ninguno" And the "textarea1" property in object 1 of property "grid" equals "ninguno"
And the "dropdown1" property equals "dos" And the "dropdown1" property in object 1 of property "grid" equals "dos"
And the "dropdown1_label" property equals "dos" And the "dropdown1_label" property in object 1 of property "grid" equals "dos"
And the "yesno1" property equals "1" And the "yesno1" property in object 1 of property "grid" equals "1"
And the "checkbox1" property equals "On" And the "checkbox1" property in object 1 of property "grid" equals "On"
And the "date1" property equals "2014-03-13" And the "date1" property in object 1 of property "grid" equals "2014-03-13"
And the "link1" property equals "http://www.google.com/" And the "link1" property in object 1 of property "grid" equals "http://www.google.com/"
And the "link1_label" property equals "link1" And the "link1_label" property in object 1 of property "grid" equals "link1"
And the "sample" property equals "maria" And the "sample" property in object 1 of property "grid" equals "maria"
And the "currency1" property equals "132,424.00" And the "currency1" property in object 1 of property "grid" equals "132,424.00"
And the "percentage1" property equals "344.00 %" And the "percentage1" property in object 1 of property "grid" equals "344.00 %"
And the "suggest1_label" property equals "emily" And the "suggest1_label" property in object 1 of property "grid" equals "emily"
And the "suggest1" property equals "34289569752d5673d310e82094574281" And the "suggest1" property in object 1 of property "grid" equals "34289569752d5673d310e82094574281"
And the "textarea1" property equals "sample" And the "textarea1" property in object 1 of property "grid" equals "sample"
And the "dropdown1" property equals "uno" And the "dropdown1" property in object 1 of property "grid" equals "uno"
And the "dropdown1_label" property equals "uno" And the "dropdown1_label" property in object 1 of property "grid" equals "uno"
And the "yesno1" property equals "0" And the "yesno1" property in object 1 of property "grid" equals "0"
And the "checkbox1" property equals "Off" And the "checkbox1" property in object 1 of property "grid" equals "Off"
And the "date1" property equals "2014-03-29" And the "date1" property in object 1 of property "grid" equals "2014-03-29"
And the "link1" property equals "http://www.google.com/" And the "link1" property in object 1 of property "grid" equals "http://www.google.com/"
And the "link1_label" property equals "link1" And the "link1_label" property in object 1 of property "grid" equals "link1"

View File

@@ -65,8 +65,8 @@ Scenario Outline: Get paging of list inbox
Then the response status code should be <http_code> Then the response status code should be <http_code>
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "array" And the type is "object"
And the response has <records> records And the response has <records> records in property "data"
Examples: Examples:
@@ -88,7 +88,7 @@ Scenario Outline: Get paging of list inbox
| start equals zero | 0 | 20 | 14 | 200 | | start equals zero | 0 | 20 | 14 | 200 |
| search 0 | 0 | 0 | 14 | 200 | | search 0 | 0 | 0 | 14 | 200 |
| search 0 | 0 | 100 | 14 | 200 | | search 0 | 0 | 100 | 14 | 200 |
| negative numbers in start | -10 | 25 | 4 | 200 | | negative numbers in start | -10 | 25 | 5 | 200 |
| negative numbers in limit | 1 | -25 | 14 | 200 | | negative numbers in limit | 1 | -25 | 14 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 |
@@ -154,8 +154,8 @@ Scenario Outline: Get order type of Search of number the process
Examples: Examples:
| test_description | search | records | | test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 18 | 1 |
| Filter all cases | | 4 | | Filter all cases | | 14 |
Scenario: Returns a list of the cases for the logged in user (Draft) Scenario: Returns a list of the cases for the logged in user (Draft)
@@ -171,8 +171,8 @@ Scenario Outline: Get paging of list Draft
Then the response status code should be <http_code> Then the response status code should be <http_code>
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "array" And the type is "object"
And the response has <records> records And the response has <records> records in property "data"
Examples: Examples:
@@ -193,7 +193,7 @@ Scenario Outline: Get paging of list Draft
| start equals zero | 0 | 20 | 15 | 200 | | start equals zero | 0 | 20 | 15 | 200 |
| search 0 | 0 | 0 | 15 | 200 | | search 0 | 0 | 0 | 15 | 200 |
| search 0 | 0 | 100 | 15 | 200 | | search 0 | 0 | 100 | 15 | 200 |
| negative numbers in start | -10 | 25 | 5 | 200 | | negative numbers in start | -10 | 25 | 6 | 200 |
| negative numbers in limit | 1 | -25 | 15 | 200 | | negative numbers in limit | 1 | -25 | 15 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 |
@@ -230,7 +230,7 @@ Scenario Outline: Get order type of Process Category
Examples: Examples:
| test_description | cat_uid | records | | test_description | cat_uid | records |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 9 | | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 8 |
| Filter all categories | | 15 | | Filter all categories | | 15 |
@@ -245,7 +245,7 @@ Scenario Outline: Get order type of Process
Examples: Examples:
| test_description | pro_uid | records | | test_description | pro_uid | records |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 2 | | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 1 |
| Filter all cases | | 15 | | Filter all cases | | 15 |
@@ -260,7 +260,7 @@ Scenario Outline: Get order type of Search of the process
Examples: Examples:
| test_description | search | records | | test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 4 | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 16 | 4 |
| Filter all cases | | 15 | | Filter all cases | | 15 |
@@ -276,8 +276,8 @@ Scenario Outline: Get paging of list Participated
Then the response status code should be <http_code> Then the response status code should be <http_code>
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "array" And the type is "object"
And the response has <records> records And the response has <records> records in property "data"
Examples: Examples:
@@ -295,7 +295,7 @@ Scenario Outline: Get paging of list Participated
| empty string | 1 | 10000 | 30 | 200 | | empty string | 1 | 10000 | 30 | 200 |
| invalid start | b | 25 | 25 | 200 | | invalid start | b | 25 | 25 | 200 |
| invalid limit | 1 | c | 30 | 200 | | invalid limit | 1 | c | 30 | 200 |
| start equals zero | 0 | 20 | 30 | 200 | | start equals zero | 0 | 20 | 20 | 200 |
| search 0 | 0 | 0 | 30 | 200 | | search 0 | 0 | 0 | 30 | 200 |
| search 0 | 0 | 100 | 30 | 200 | | search 0 | 0 | 100 | 30 | 200 |
| negative numbers in start | -10 | 25 | 15 | 200 | | negative numbers in start | -10 | 25 | 15 | 200 |
@@ -304,7 +304,7 @@ Scenario Outline: Get paging of list Participated
| real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 |
| real numbers in limit | 1 | 1.4599 | 1 | 200 | | real numbers in limit | 1 | 1.4599 | 1 | 200 |
| only start | 1 | | 30 | 200 | | only start | 1 | | 30 | 200 |
| only limit | | 25 | 30 | 200 | | only limit | | 25 | 25 | 200 |
| without start and limit | | | 30 | 200 | | without start and limit | | | 30 | 200 |
@@ -335,7 +335,7 @@ Scenario Outline: Get order type of Process Category
Examples: Examples:
| test_description | cat_uid | records | | test_description | cat_uid | records |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 27 | | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 26 |
| Filter all categories | | 30 | | Filter all categories | | 30 |
@@ -350,7 +350,7 @@ Scenario Outline: Get order type of Process
Examples: Examples:
| test_description | pro_uid | records | | test_description | pro_uid | records |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 3 | | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 2 |
| Filter all cases | | 30 | | Filter all cases | | 30 |
@@ -366,7 +366,7 @@ Scenario Outline: Get order type of Search
Examples: Examples:
| test_description | search | records | | test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 17 | 10 |
| Filter all cases | | 30 | | Filter all cases | | 30 |
@@ -379,12 +379,12 @@ Scenario: Returns a list of the cases for the logged in user (Unassigned)
Scenario Outline: Get paging of list Unassigned Scenario Outline: Get paging of list Unassigned
Given I request "cases/Unassigned/paged?start=<start>&limit=<limit>" Given I request "cases/unassigned/paged?start=<start>&limit=<limit>"
Then the response status code should be <http_code> Then the response status code should be <http_code>
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "array" And the type is "object"
And the response has <records> records And the response has <records> records in property "data"
Examples: Examples:
@@ -405,7 +405,7 @@ Scenario Outline: Get paging of list Unassigned
| start equals zero | 0 | 20 | 12 | 200 | | start equals zero | 0 | 20 | 12 | 200 |
| search 0 | 0 | 0 | 12 | 200 | | search 0 | 0 | 0 | 12 | 200 |
| search 0 | 0 | 100 | 12 | 200 | | search 0 | 0 | 100 | 12 | 200 |
| negative numbers in start | -10 | 25 | 2 | 200 | | negative numbers in start | -10 | 25 | 3 | 200 |
| negative numbers in limit | 1 | -25 | 12 | 200 | | negative numbers in limit | 1 | -25 | 12 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 |
@@ -471,7 +471,7 @@ Scenario Outline: Get order type of Search
Examples: Examples:
| test_description | search | records | | test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 16 | 1 |
| Filter all cases | | 12 | | Filter all cases | | 12 |
@@ -511,7 +511,7 @@ Scenario Outline: Get paging of list Paused
| start equals zero | 0 | 20 | 12 | 200 | | start equals zero | 0 | 20 | 12 | 200 |
| search 0 | 0 | 0 | 12 | 200 | | search 0 | 0 | 0 | 12 | 200 |
| search 0 | 0 | 100 | 12 | 200 | | search 0 | 0 | 100 | 12 | 200 |
| negative numbers in start | -10 | 25 | 2 | 200 | | negative numbers in start | -10 | 25 | 3 | 200 |
| negative numbers in limit | 1 | -25 | 12 | 200 | | negative numbers in limit | 1 | -25 | 12 | 200 |
| real numbers | 0.0 | 1.0 | 1 | 200 | | real numbers | 0.0 | 1.0 | 1 | 200 |
| real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 |
@@ -577,7 +577,7 @@ Scenario Outline: Get order type of Search
Examples: Examples:
| test_description | search | records | | test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 2 | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 16 | 4 |
| Filter all cases | | 12 | | Filter all cases | | 12 |
@@ -594,8 +594,8 @@ Scenario Outline: Get paging of list Advanced Search
Then the response status code should be <http_code> Then the response status code should be <http_code>
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "array" And the type is "object"
And the response has <records> records And the response has <records> records in property "data"
Examples: Examples:
@@ -611,7 +611,7 @@ Scenario Outline: Get paging of list Advanced Search
| high number for start | 1000 | 0 | 0 | 200 | | high number for start | 1000 | 0 | 0 | 200 |
| empty result | 1 | 0 | 30 | 200 | | empty result | 1 | 0 | 30 | 200 |
| empty string | 1 | 10000 | 30 | 200 | | empty string | 1 | 10000 | 30 | 200 |
| invalid start | b | 25 | 30 | 200 | | invalid start | b | 25 | 25 | 200 |
| invalid limit | 1 | c | 30 | 200 | | invalid limit | 1 | c | 30 | 200 |
| start equals zero | 0 | 20 | 20 | 200 | | start equals zero | 0 | 20 | 20 | 200 |
| search 0 | 0 | 0 | 30 | 200 | | search 0 | 0 | 0 | 30 | 200 |
@@ -622,7 +622,7 @@ Scenario Outline: Get paging of list Advanced Search
| real numbers in start | 0.0 | 12 | 12 | 200 | | real numbers in start | 0.0 | 12 | 12 | 200 |
| real numbers in limit | 1 | 1.4599 | 1 | 200 | | real numbers in limit | 1 | 1.4599 | 1 | 200 |
| only start | 1 | | 30 | 200 | | only start | 1 | | 30 | 200 |
| only limit | | 25 | 30 | 200 | | only limit | | 25 | 25 | 200 |
| without start and limit | | | 30 | 200 | | without start and limit | | | 30 | 200 |
@@ -652,7 +652,7 @@ Scenario Outline: Get order type of Process Category
Examples: Examples:
| test_description | cat_uid | records | | test_description | cat_uid | records |
| Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 25 | | Filter for Category "Category Cases Lists" | 4177095085330818c324501061677193 | 26 |
| Filter all categories | | 30 | | Filter all categories | | 30 |
@@ -668,7 +668,7 @@ Scenario Outline: Get order type of Process
Examples: Examples:
| test_description | pro_uid | records | | test_description | pro_uid | records |
| Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 3 | | Filter for cases "Derivation rules - sequential" | 99209594750ec27ea338927000421575 | 2 |
| Filter all cases | | 30 | | Filter all cases | | 30 |
@@ -684,8 +684,8 @@ Scenario Outline: Get order type of Search
Examples: Examples:
| test_description | search | records | | test_description | search | records |
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 2 | | Filter for cases "Derivation rules - Parallel -> Case number 6" | 17 | 10 |
| Filter all cases | | 2 | | Filter all cases | | 30 |
Scenario Outline: Get order for Status Scenario Outline: Get order for Status
@@ -699,10 +699,10 @@ Scenario Outline: Get order for Status
Examples: Examples:
| test_description | app_status | records | | test_description | app_status | records |
| Filter Status = All Status | | 25 | | Filter Status = All Status | | 30 |
| Filter Status = Completed | COMPLETED | 2 | | Filter Status = Completed | COMPLETED | 2 |
| Filter Status = Draft | DRAFT | 15 | | Filter Status = Draft | DRAFT | 15 |
| Filter Status = To Do | TO_DO | 25 | | Filter Status = To Do | TO_DO | 30 |
Scenario Outline: Get order for User Scenario Outline: Get order for User
@@ -716,10 +716,10 @@ Scenario Outline: Get order for User
Examples: Examples:
| test_description | usr_uid | records | | test_description | usr_uid | records |
| Filter Status = All User | | 25 | | Filter Status = All User | | 30 |
| Filter Status = aaron | 51049032352d56710347233042615067 | 2 | | Filter Status = aaron | 51049032352d56710347233042615067 | 4 |
| Filter Status = admin | 00000000000000000000000000000001 | 2 | | Filter Status = admin | 00000000000000000000000000000001 | 30 |
| Filter Status = chris | 24166330352d56730cdd525035621101 | 2 | | Filter Status = chris | 24166330352d56730cdd525035621101 | 6 |
Scenario Outline: Get order for date Scenario Outline: Get order for date
@@ -734,4 +734,4 @@ Scenario Outline: Get order for date
| test_description | date_from | date_to | records | | test_description | date_from | date_to | records |
| Filter date = 2014-03-01 | 2014-03-01 | 2014-03-31 | 5 | | Filter date = 2014-03-01 | 2014-03-01 | 2014-03-31 | 5 |
| Filter date = 2014-03-15 | 2014-03-15 | 2014-04-01 | 25 | | Filter date = 2014-03-15 | 2014-03-15 | 2014-04-01 | 30 |

View File

@@ -4,43 +4,38 @@ Feature: Cases Actions - the features in this script are (inbox, draftCaseList,
Background: Background:
Given that I have a valid access_token Given that I have a valid access_token
Scenario: Returns a list of the cases for the logged in user (Inbox)
Given I request "cases"
Then the response status code should be 400
And the response has 4 records
And the response status message should have the following text "Records"
Scenario: Get paging of list inbox (Negative Test)
Scenario: Returns a list of the cases for the logged in user (Draft) Given I request "cases/pawdd?start=4&limit=10"
Given I request "cases/draft"
Then the response status code should be 400 Then the response status code should be 400
And the response has 4 records And the response status message should have the following text "app_uid"
And the response status message should have the following text "Records"
Scenario: Returns a list of the cases for the logged in user (Participated) Scenario: Get paging of list inbox (Negative Test)
Given I request "cases/participated" Given I request "cases/draft/pawdd?start=4&limit=10"
Then the response status code should be 400 Then the response status code should be 404
And the response has 4 records And the response status message should have the following text "Not Found"
And the response status message should have the following text "Records"
Scenario: Returns a list of the cases for the logged in user (Unassigned) Scenario: Get paging of list inbox (Negative Test)
Given I request "cases/unassigned" Given I request "cases/participated/pawdd?start=4&limit=10"
Then the response status code should be 400 Then the response status code should be 404
And the response has 4 records And the response status message should have the following text "Not Found"
And the response status message should have the following text "Records"
Scenario: Returns a list of the cases for the logged in user (Paused) Scenario: Get paging of list inbox (Negative Test)
Given I request "cases/paused" Given I request "cases/unassigned/pawdd?start=4&limit=10"
Then the response status code should be 400 Then the response status code should be 404
And the response has 4 records And the response status message should have the following text "Not Found"
And the response status message should have the following text "Records"
Scenario: Returns a list of the cases for the logged in user (Advanced Search)
Given I request "cases/advanced-search" Scenario: Get paging of list inbox (Negative Test)
Then the response status code should be 400 Given I request "cases/paused/pawdd?start=4&limit=10"
And the response has 4 records Then the response status code should be 404
And the response status message should have the following text "Records" And the response status message should have the following text "Not Found"
Scenario: Get paging of list inbox (Negative Test)
Given I request "cases/advanced-search/pawdd?start=4&limit=10"
Then the response status code should be 404
And the response status message should have the following text "Not Found"

View File

@@ -9,7 +9,7 @@ Background:
Scenario: Returns a list of the uploaded documents for a given case Scenario: Returns a list of the uploaded documents for a given case
Given I request "cases/64654381053382b8bb4c415067063003/input-documents" Given I request "cases/170220159534214f642abb8058832933/input-documents"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
@@ -17,14 +17,14 @@ Scenario: Returns a list of the uploaded documents for a given case
Scenario: Returns an uploaded documents for a given case Scenario: Returns an uploaded documents for a given case
Given I request "cases/64654381053382b8bb4c415067063003/input-document/6075490825331a1c5eebff9015468244" Given I request "cases/170220159534214f642abb8058832933/input-document/6075490825331a1c5eebff9015468244"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "object" And the type is "object"
Scenario: Post metadata and then upload documents for a given case Scenario: Post metadata and then upload documents for a given case
Given POST upload an input document "/home/wendy/uploadfiles/test1.html" to "cases/64654381053382b8bb4c415067063003/input-document" Given POST upload an input document "/home/wendy/uploadfiles/test1.html" to "cases/170220159534214f642abb8058832933/input-document"
""" """
{ {
@@ -35,16 +35,16 @@ Scenario: Post metadata and then upload documents for a given case
} }
""" """
Then the response status code should be 201 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "object" And the type is "object"
And store "" in session array And store "app_doc_uid" in session array
Scenario: Delete an uploaded or generated document from a case. Scenario: Delete an uploaded or generated document from a case.
Given that I want to delete a resource with the key "" stored in session array Given that I want to delete a resource with the key "app_doc_uid" stored in session array
And I request "cases/64654381053382b8bb4c415067063003/input-document/{app_doc_uid}" And I request "cases/170220159534214f642abb8058832933/input-document"
Then the response status code should be 200 Then the response status code should be 200
And the content type is "application/json" And the content type is "application/json"
And the response charset is "UTF-8" And the response charset is "UTF-8"

View File

@@ -9,7 +9,7 @@ Background:
Scenario: Returns a list of the uploaded documents for a given case Scenario: Returns a list of the uploaded documents for a given case
Given I request "cases/64654381053382b8bb4c415067063003/input-documents" Given I request "cases/170220159534214f642abb8058832933/input-documents"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
@@ -34,10 +34,10 @@ Scenario Outline: Post metadata and then upload documents for a given case
Examples: Examples:
| app_doc_uid_number | document_file | case_uid | inp_doc_uid | tas_uid | app_doc_comment | | app_doc_uid_number | document_file | case_uid | inp_doc_uid | tas_uid | app_doc_comment |
| 1 | /home/wendy/uploadfiles/test1.html | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | | 1 | /home/wendy/uploadfiles/test1.html | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| 2 | /home/wendy/uploadfiles/random.jpg | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | | 2 | /home/wendy/uploadfiles/random.jpg | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| 3 | /home/wendy/uploadfiles/test.pm | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | | 3 | /home/wendy/uploadfiles/test.pm | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| 4 | /home/wendy/uploadfiles/test.txt | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | | 4 | /home/wendy/uploadfiles/test.txt | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
Scenario Outline: Returns an uploaded documents for a given case Scenario Outline: Returns an uploaded documents for a given case
Given I request "cases/<case_uid>/output-document/app_doc_uid" with the key "app_doc_uid" stored in session array as variable "app_doc_uid_<app_doc_uid_number>" Given I request "cases/<case_uid>/output-document/app_doc_uid" with the key "app_doc_uid" stored in session array as variable "app_doc_uid_<app_doc_uid_number>"
@@ -57,16 +57,16 @@ Scenario Outline: Returns an uploaded documents for a given case
Examples: Examples:
| test_description | app_doc_uid_number | case_uid | inp_doc_uid | tas_uid | app_doc_comment | | test_description | app_doc_uid_number | case_uid | inp_doc_uid | tas_uid | app_doc_comment |
| Get Input "Desert.jpg" | 1 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | | Get Input "Desert.jpg" | 1 | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| Get Input "Screenshot Case Archive.docx" | 2 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | | Get Input "Screenshot Case Archive.docx" | 2 | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| Get Input "alert_message.html" | 3 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | | Get Input "alert_message.html" | 3 | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| Get Input "actionsByEmail-2.5.0.28.tar" | 4 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 | | Get Input "actionsByEmail-2.5.0.28.tar" | 4 | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
Scenario Outline: Delete an uploaded or generated document from a case. Scenario Outline: Delete an uploaded or generated document from a case.
Given that I want to delete a resource with the key "app_doc_uid_<app_doc_uid_number>" stored in session array Given that I want to delete a resource with the key "app_doc_uid" stored in session array as variable "app_doc_uid_<app_doc_uid_number>"
And I request "cases/64654381053382b8bb4c415067063003/input-document/" And I request "cases/170220159534214f642abb8058832933/input-document"
Then the response status code should be 200 Then the response status code should be 200
And the content type is "application/json" And the content type is "application/json"
And the response charset is "UTF-8" And the response charset is "UTF-8"

View File

@@ -0,0 +1,35 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Input Documents cases - negative
Requirements:
a workspace with one case of the process "Test Input Document Case"
and there are three Input Document in the process and the verify in one case
Background:
Given that I have a valid access_token
Scenario: Returns a list of the uploaded documents for a given case
Given I request "cases/170220159534214f642abb8058832000/input-documents"
Then the response status code should be 404
Scenario Outline: Post metadata and then upload documents for a given case
Given POST upload an input document "<document_file>" to "cases/<case_uid>/input-document"
"""
{
"inp_doc_uid": "<inp_doc_uid>",
"tas_uid": "<tas_uid>",
"app_doc_comment": "<app_doc_comment>"
}
"""
Then the response status code should be 400
Examples:
| app_doc_uid_number | document_file | case_uid | inp_doc_uid | tas_uid | app_doc_comment |
| 1 | /inexistent_test1.html | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
| 1 | /home/wendy/uploadfiles/test1.html | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | | comment 1 |
| 1 | /home/wendy/uploadfiles/test1.html | 170220159534214f642abb8058832933 | | 19582733053319e304cfa76025663570 | comment 1 |

View File

@@ -41,7 +41,7 @@ Feature: Output Documents Negative Tests
Examples: 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 | | 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 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 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 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 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 |

View File

@@ -384,6 +384,7 @@ class RestContext extends BehatContext
$putFields = is_object($this->_restObject) $putFields = is_object($this->_restObject)
? (array)$this->_restObject ? (array)$this->_restObject
: $this->_restObject; : $this->_restObject;
$this->printDebug("URL F: $url\n");
$this->_request = $this->_client $this->_request = $this->_client
->put($url, $this->_headers, ->put($url, $this->_headers,
(empty($this->_requestBody) ? $putFields : (empty($this->_requestBody) ? $putFields :
@@ -1504,4 +1505,53 @@ class RestContext extends BehatContext
} }
/**
* @Given /^the "([^"]*)" property in object (\d+) of property "([^"]*)" equals "([^"]*)"$/
*/
public function thePropertyInObjectOfPropertyEquals($propertyName, $row, $propertyParent, $propertyValue)
{
$data = $this->_data;
if (empty($data)) {
throw new Exception("Response is empty or was not JSON\n\n"
. $this->_response->getBody(true));
return;
}
if (!isset($data->$propertyParent)) {
throw new Exception("Response has not the property '$propertyParent'\n\n"
. $this->_response->getBody(true));
return;
}
$data = $data->$propertyParent;
if (!empty($data)) {
if (!is_object($data)) {
throw new Exception("the $propertyParent in Response data is not an array!\n\n" );
}
if (is_object($data) && !isset($data->$row)) {
throw new Exception("the Response data is an array, but the row '$row' does not exists!\n\n" );
}
if (!isset($data->$row->$propertyName)) {
throw new Exception("Property '"
. $propertyName . "' is not set!\n\n"
);
}
if (is_array($data->$row->$propertyName)) {
throw new Exception("$propertyName is an array and we expected a value\n\n"
. $this->_response->getBody(true));
}
if ($data->$row->$propertyName != $propertyValue) {
throw new \Exception('Property value mismatch! (given: '
. $propertyValue . ', match: '
. $data->$row->$propertyName . ")\n\n"
);
}
} else {
throw new Exception("Response was not JSON\n\n"
. $this->_response->getBody(true));
}
}
} }