Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
@@ -74,7 +74,7 @@ Scenario Outline: Create a new case in workspace with process "Derivation rules
|
||||
{
|
||||
"pro_uid": "<pro_uid>",
|
||||
"tas_uid": "<tas_uid>",
|
||||
"variables": [{"name": "admin", "lastname":"admin"}]
|
||||
"variables": [{"name": "admin", "amount":"1030"}]
|
||||
}
|
||||
"""
|
||||
And I request "cases"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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 |
|
||||
|
||||
@@ -9,6 +9,7 @@ Background:
|
||||
|
||||
Scenario: List of case notes for this case
|
||||
Given I request "cases/1185553665335d2e209f723099733152/notes"
|
||||
the response time should at least be (\d+) milliseconds$/
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
@@ -30,7 +31,7 @@ Scenario: Create a new case note for specified case
|
||||
}
|
||||
"""
|
||||
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 content type is "application/json"
|
||||
And the type is "object"
|
||||
|
||||
@@ -8,7 +8,7 @@ Background:
|
||||
|
||||
|
||||
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
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
@@ -22,7 +22,7 @@ Scenario: Create a new case note for specified case
|
||||
"send_email": 1
|
||||
}
|
||||
"""
|
||||
And I request "case/{uid}/case"
|
||||
And I request "case/1185553665335d2e209f723099733152/case"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
|
||||
@@ -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 "suggest2" property equals "51049032352d56710347233042615067"
|
||||
And the "suggest2_label" property equals "aaron"
|
||||
And the "sample" property in row 1 of property "grid" equals "jose"
|
||||
And the "currency1" property equals "12,334,444.00"
|
||||
And the "percentage1" property equals "333.00 %"
|
||||
And the "suggest1_label" property equals "gavin"
|
||||
And the "suggest1" property equals "33140476452d5671b0abda5073786635"
|
||||
And the "textarea1" property equals "ninguno"
|
||||
And the "dropdown1" property equals "dos"
|
||||
And the "dropdown1_label" property equals "dos"
|
||||
And the "yesno1" property equals "1"
|
||||
And the "checkbox1" property equals "On"
|
||||
And the "date1" property equals "2014-03-13"
|
||||
And the "link1" property equals "http://www.google.com/"
|
||||
And the "link1_label" property equals "link1"
|
||||
And the "sample" property equals "maria"
|
||||
And the "currency1" property equals "132,424.00"
|
||||
And the "percentage1" property equals "344.00 %"
|
||||
And the "suggest1_label" property equals "emily"
|
||||
And the "suggest1" property equals "34289569752d5673d310e82094574281"
|
||||
And the "textarea1" property equals "sample"
|
||||
And the "dropdown1" property equals "uno"
|
||||
And the "dropdown1_label" property equals "uno"
|
||||
And the "yesno1" property equals "0"
|
||||
And the "checkbox1" property equals "Off"
|
||||
And the "date1" property equals "2014-03-29"
|
||||
And the "link1" property equals "http://www.google.com/"
|
||||
And the "link1_label" property equals "link1"
|
||||
And the "sample" property in object 1 of property "grid" equals "jose"
|
||||
And the "currency1" property in object 1 of property "grid" equals "12,334,444.00"
|
||||
And the "percentage1" property in object 1 of property "grid" equals "333.00 %"
|
||||
And the "suggest1_label" property in object 1 of property "grid" equals "gavin"
|
||||
And the "suggest1" property in object 1 of property "grid" equals "33140476452d5671b0abda5073786635"
|
||||
And the "textarea1" property in object 1 of property "grid" equals "ninguno"
|
||||
And the "dropdown1" property in object 1 of property "grid" equals "dos"
|
||||
And the "dropdown1_label" property in object 1 of property "grid" equals "dos"
|
||||
And the "yesno1" property in object 1 of property "grid" equals "1"
|
||||
And the "checkbox1" property in object 1 of property "grid" equals "On"
|
||||
And the "date1" property in object 1 of property "grid" equals "2014-03-13"
|
||||
And the "link1" property in object 1 of property "grid" equals "http://www.google.com/"
|
||||
And the "link1_label" property in object 1 of property "grid" equals "link1"
|
||||
And the "sample" property in object 2 of property "grid" equals "maria"
|
||||
And the "currency1" property in object 2 of property "grid" equals "132,424.00"
|
||||
And the "percentage1" property in object 2 of property "grid" equals "344.00 %"
|
||||
And the "suggest1_label" property in object 2 of property "grid" equals "emily"
|
||||
And the "suggest1" property in object 2 of property "grid" equals "34289569752d5673d310e82094574281"
|
||||
And the "textarea1" property in object 2 of property "grid" equals "sample"
|
||||
And the "dropdown1" property in object 2 of property "grid" equals "uno"
|
||||
And the "dropdown1_label" property in object 2 of property "grid" equals "uno"
|
||||
And the "yesno1" property in object 2 of property "grid" equals "0"
|
||||
And the "checkbox1" property in object 2 of property "grid" equals "Off"
|
||||
And the "date1" property in object 2 of property "grid" equals "2014-03-29"
|
||||
And the "link1" property in object 2 of property "grid" equals "http://www.google.com/"
|
||||
And the "link1_label" property in object 2 of property "grid" equals "link1"
|
||||
|
||||
|
||||
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 "suggest2" property equals "51049032352d56710347233042615067"
|
||||
And the "suggest2_label" property equals "aaron"
|
||||
And the "sample" property equals "jose"
|
||||
And the "currency1" property equals "12,334,444.00"
|
||||
And the "percentage1" property equals "333.00 %"
|
||||
And the "suggest1_label" property equals "gavin"
|
||||
And the "suggest1" property equals "33140476452d5671b0abda5073786635"
|
||||
And the "textarea1" property equals "ninguno"
|
||||
And the "dropdown1" property equals "dos"
|
||||
And the "dropdown1_label" property equals "dos"
|
||||
And the "yesno1" property equals "1"
|
||||
And the "checkbox1" property equals "On"
|
||||
And the "date1" property equals "2014-03-13"
|
||||
And the "link1" property equals "http://www.google.com/"
|
||||
And the "link1_label" property equals "link1"
|
||||
And the "sample" property equals "maria"
|
||||
And the "currency1" property equals "132,424.00"
|
||||
And the "percentage1" property equals "344.00 %"
|
||||
And the "suggest1_label" property equals "emily"
|
||||
And the "suggest1" property equals "34289569752d5673d310e82094574281"
|
||||
And the "textarea1" property equals "sample"
|
||||
And the "dropdown1" property equals "uno"
|
||||
And the "dropdown1_label" property equals "uno"
|
||||
And the "yesno1" property equals "0"
|
||||
And the "checkbox1" property equals "Off"
|
||||
And the "date1" property equals "2014-03-29"
|
||||
And the "link1" property equals "http://www.google.com/"
|
||||
And the "link1_label" property equals "link1"
|
||||
And the "sample" property in object 1 of property "grid" equals "jose"
|
||||
And the "currency1" property in object 1 of property "grid" equals "12,334,444.00"
|
||||
And the "percentage1" property in object 1 of property "grid" equals "333.00 %"
|
||||
And the "suggest1_label" property in object 1 of property "grid" equals "gavin"
|
||||
And the "suggest1" property in object 1 of property "grid" equals "33140476452d5671b0abda5073786635"
|
||||
And the "textarea1" property in object 1 of property "grid" equals "ninguno"
|
||||
And the "dropdown1" property in object 1 of property "grid" equals "dos"
|
||||
And the "dropdown1_label" property in object 1 of property "grid" equals "dos"
|
||||
And the "yesno1" property in object 1 of property "grid" equals "1"
|
||||
And the "checkbox1" property in object 1 of property "grid" equals "On"
|
||||
And the "date1" property in object 1 of property "grid" equals "2014-03-13"
|
||||
And the "link1" property in object 1 of property "grid" equals "http://www.google.com/"
|
||||
And the "link1_label" property in object 1 of property "grid" equals "link1"
|
||||
And the "sample" property in object 1 of property "grid" equals "maria"
|
||||
And the "currency1" property in object 1 of property "grid" equals "132,424.00"
|
||||
And the "percentage1" property in object 1 of property "grid" equals "344.00 %"
|
||||
And the "suggest1_label" property in object 1 of property "grid" equals "emily"
|
||||
And the "suggest1" property in object 1 of property "grid" equals "34289569752d5673d310e82094574281"
|
||||
And the "textarea1" property in object 1 of property "grid" equals "sample"
|
||||
And the "dropdown1" property in object 1 of property "grid" equals "uno"
|
||||
And the "dropdown1_label" property in object 1 of property "grid" equals "uno"
|
||||
And the "yesno1" property in object 1 of property "grid" equals "0"
|
||||
And the "checkbox1" property in object 1 of property "grid" equals "Off"
|
||||
And the "date1" property in object 1 of property "grid" equals "2014-03-29"
|
||||
And the "link1" property in object 1 of property "grid" equals "http://www.google.com/"
|
||||
And the "link1_label" property in object 1 of property "grid" equals "link1"
|
||||
@@ -65,8 +65,8 @@ Scenario Outline: Get paging of list inbox
|
||||
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 "array"
|
||||
And the response has <records> records
|
||||
And the type is "object"
|
||||
And the response has <records> records in property "data"
|
||||
|
||||
|
||||
Examples:
|
||||
@@ -88,7 +88,7 @@ Scenario Outline: Get paging of list inbox
|
||||
| start equals zero | 0 | 20 | 14 | 200 |
|
||||
| search 0 | 0 | 0 | 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 |
|
||||
| real numbers | 0.0 | 1.0 | 1 | 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:
|
||||
|
||||
| test_description | search | records |
|
||||
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 3 |
|
||||
| Filter all cases | | 4 |
|
||||
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 18 | 1 |
|
||||
| Filter all cases | | 14 |
|
||||
|
||||
|
||||
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>
|
||||
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 type is "object"
|
||||
And the response has <records> records in property "data"
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -193,7 +193,7 @@ Scenario Outline: Get paging of list Draft
|
||||
| start equals zero | 0 | 20 | 15 | 200 |
|
||||
| search 0 | 0 | 0 | 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 |
|
||||
| real numbers | 0.0 | 1.0 | 1 | 200 |
|
||||
| real numbers in start | 0.0 | 12 | 12 | 200 |
|
||||
@@ -230,7 +230,7 @@ Scenario Outline: Get order type of Process Category
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ Scenario Outline: Get order type of Process
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ Scenario Outline: Get order type of Search of the process
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -276,8 +276,8 @@ Scenario Outline: Get paging of list Participated
|
||||
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 "array"
|
||||
And the response has <records> records
|
||||
And the type is "object"
|
||||
And the response has <records> records in property "data"
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -295,7 +295,7 @@ Scenario Outline: Get paging of list Participated
|
||||
| empty string | 1 | 10000 | 30 | 200 |
|
||||
| invalid start | b | 25 | 25 | 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 | 100 | 30 | 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 limit | 1 | 1.4599 | 1 | 200 |
|
||||
| only start | 1 | | 30 | 200 |
|
||||
| only limit | | 25 | 30 | 200 |
|
||||
| only limit | | 25 | 25 | 200 |
|
||||
| without start and limit | | | 30 | 200 |
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ Scenario Outline: Get order type of Process Category
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ Scenario Outline: Get order type of Process
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ Scenario Outline: Get order type of Search
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -379,12 +379,12 @@ Scenario: Returns a list of the cases for the logged in user (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>
|
||||
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 type is "object"
|
||||
And the response has <records> records in property "data"
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -405,7 +405,7 @@ Scenario Outline: Get paging of list Unassigned
|
||||
| start equals zero | 0 | 20 | 12 | 200 |
|
||||
| search 0 | 0 | 0 | 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 |
|
||||
| real numbers | 0.0 | 1.0 | 1 | 200 |
|
||||
| real numbers in start | 0.0 | 12 | 12 | 200 |
|
||||
@@ -471,7 +471,7 @@ Scenario Outline: Get order type of Search
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -511,7 +511,7 @@ Scenario Outline: Get paging of list Paused
|
||||
| start equals zero | 0 | 20 | 12 | 200 |
|
||||
| search 0 | 0 | 0 | 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 |
|
||||
| real numbers | 0.0 | 1.0 | 1 | 200 |
|
||||
| real numbers in start | 0.0 | 12 | 12 | 200 |
|
||||
@@ -577,7 +577,7 @@ Scenario Outline: Get order type of Search
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -594,8 +594,8 @@ Scenario Outline: Get paging of list Advanced Search
|
||||
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 "array"
|
||||
And the response has <records> records
|
||||
And the type is "object"
|
||||
And the response has <records> records in property "data"
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -611,7 +611,7 @@ Scenario Outline: Get paging of list Advanced Search
|
||||
| high number for start | 1000 | 0 | 0 | 200 |
|
||||
| empty result | 1 | 0 | 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 |
|
||||
| start equals zero | 0 | 20 | 20 | 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 limit | 1 | 1.4599 | 1 | 200 |
|
||||
| only start | 1 | | 30 | 200 |
|
||||
| only limit | | 25 | 30 | 200 |
|
||||
| only limit | | 25 | 25 | 200 |
|
||||
| without start and limit | | | 30 | 200 |
|
||||
|
||||
|
||||
@@ -652,7 +652,7 @@ Scenario Outline: Get order type of Process Category
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -668,7 +668,7 @@ Scenario Outline: Get order type of Process
|
||||
Examples:
|
||||
|
||||
| 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 |
|
||||
|
||||
|
||||
@@ -684,8 +684,8 @@ Scenario Outline: Get order type of Search
|
||||
Examples:
|
||||
|
||||
| test_description | search | records |
|
||||
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 92535130653271a60de2e73021469732 | 2 |
|
||||
| Filter all cases | | 2 |
|
||||
| Filter for cases "Derivation rules - Parallel -> Case number 6" | 17 | 10 |
|
||||
| Filter all cases | | 30 |
|
||||
|
||||
|
||||
Scenario Outline: Get order for Status
|
||||
@@ -699,10 +699,10 @@ Scenario Outline: Get order for Status
|
||||
Examples:
|
||||
|
||||
| test_description | app_status | records |
|
||||
| Filter Status = All Status | | 25 |
|
||||
| Filter Status = All Status | | 30 |
|
||||
| Filter Status = Completed | COMPLETED | 2 |
|
||||
| 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
|
||||
@@ -716,10 +716,10 @@ Scenario Outline: Get order for User
|
||||
Examples:
|
||||
|
||||
| test_description | usr_uid | records |
|
||||
| Filter Status = All User | | 25 |
|
||||
| Filter Status = aaron | 51049032352d56710347233042615067 | 2 |
|
||||
| Filter Status = admin | 00000000000000000000000000000001 | 2 |
|
||||
| Filter Status = chris | 24166330352d56730cdd525035621101 | 2 |
|
||||
| Filter Status = All User | | 30 |
|
||||
| Filter Status = aaron | 51049032352d56710347233042615067 | 4 |
|
||||
| Filter Status = admin | 00000000000000000000000000000001 | 30 |
|
||||
| Filter Status = chris | 24166330352d56730cdd525035621101 | 6 |
|
||||
|
||||
|
||||
Scenario Outline: Get order for date
|
||||
@@ -734,4 +734,4 @@ Scenario Outline: Get order for date
|
||||
|
||||
| test_description | date_from | date_to | records |
|
||||
| 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 |
|
||||
@@ -4,43 +4,38 @@ Feature: Cases Actions - the features in this script are (inbox, draftCaseList,
|
||||
Background:
|
||||
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: Returns a list of the cases for the logged in user (Draft)
|
||||
Given I request "cases/draft"
|
||||
Scenario: Get paging of list inbox (Negative Test)
|
||||
Given I request "cases/pawdd?start=4&limit=10"
|
||||
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"
|
||||
And the response status message should have the following text "app_uid"
|
||||
|
||||
|
||||
Scenario: Returns a list of the cases for the logged in user (Participated)
|
||||
Given I request "cases/participated"
|
||||
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)
|
||||
Given I request "cases/draft/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"
|
||||
|
||||
|
||||
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 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)
|
||||
Given I request "cases/participated/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"
|
||||
|
||||
|
||||
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 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)
|
||||
Given I request "cases/unassigned/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"
|
||||
|
||||
Scenario: Returns a list of the cases for the logged in user (Advanced Search)
|
||||
Given I request "cases/advanced-search"
|
||||
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)
|
||||
Given I request "cases/paused/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"
|
||||
|
||||
|
||||
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"
|
||||
@@ -9,7 +9,7 @@ Background:
|
||||
|
||||
|
||||
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
|
||||
And the response charset is "UTF-8"
|
||||
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
|
||||
Given I request "cases/64654381053382b8bb4c415067063003/input-document/6075490825331a1c5eebff9015468244"
|
||||
Given I request "cases/170220159534214f642abb8058832933/input-document/6075490825331a1c5eebff9015468244"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
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 content type is "application/json"
|
||||
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.
|
||||
Given that I want to delete a resource with the key "" stored in session array
|
||||
And I request "cases/64654381053382b8bb4c415067063003/input-document/{app_doc_uid}"
|
||||
Given that I want to delete a resource with the key "app_doc_uid" stored in session array
|
||||
And I request "cases/170220159534214f642abb8058832933/input-document"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
@@ -9,7 +9,7 @@ Background:
|
||||
|
||||
|
||||
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
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
@@ -34,10 +34,10 @@ Scenario Outline: Post metadata and then upload documents for a given case
|
||||
|
||||
Examples:
|
||||
| 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 |
|
||||
| 2 | /home/wendy/uploadfiles/random.jpg | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| 3 | /home/wendy/uploadfiles/test.pm | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| 4 | /home/wendy/uploadfiles/test.txt | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| 1 | /home/wendy/uploadfiles/test1.html | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| 2 | /home/wendy/uploadfiles/random.jpg | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| 3 | /home/wendy/uploadfiles/test.pm | 170220159534214f642abb8058832933 | 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
|
||||
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:
|
||||
| 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 "Screenshot Case Archive.docx" | 2 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| Get Input "alert_message.html" | 3 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| Get Input "actionsByEmail-2.5.0.28.tar" | 4 | 64654381053382b8bb4c415067063003 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| Get Input "Desert.jpg" | 1 | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| Get Input "Screenshot Case Archive.docx" | 2 | 170220159534214f642abb8058832933 | 68671480353319e5e1dee74089764900 | 19582733053319e304cfa76025663570 | comment 1 |
|
||||
| Get Input "alert_message.html" | 3 | 170220159534214f642abb8058832933 | 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.
|
||||
Given that I want to delete a resource with the key "app_doc_uid_<app_doc_uid_number>" stored in session array
|
||||
And I request "cases/64654381053382b8bb4c415067063003/input-document/"
|
||||
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/170220159534214f642abb8058832933/input-document"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -41,7 +41,7 @@ Feature: Output Documents Negative Tests
|
||||
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 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 |
|
||||
|
||||
@@ -384,6 +384,7 @@ class RestContext extends BehatContext
|
||||
$putFields = is_object($this->_restObject)
|
||||
? (array)$this->_restObject
|
||||
: $this->_restObject;
|
||||
$this->printDebug("URL F: $url\n");
|
||||
$this->_request = $this->_client
|
||||
->put($url, $this->_headers,
|
||||
(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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user