Merged in wnestor/processmaker (pull request #399)

Modificaciones a los features case actions, input document, assignee, step, triggers, category y departments
This commit is contained in:
Erik Amaru Ortiz
2014-04-16 17:40:19 -04:00
10 changed files with 88 additions and 56 deletions

View File

@@ -80,7 +80,7 @@ Scenario Outline: Update the Category created in this script
"cat_name": "cat_name"
}
"""
And I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_<cat_uid_number>"
And I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_<cat_uid_number>"
And store "cat_uid" in session array as variable "cat_uid_<cat_uid_number>"
And the content type is "application/json"
@@ -96,7 +96,7 @@ Scenario Outline: Update the Category created in this script
Scenario Outline: Get a Category specific
Given I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_<cat_uid_number>"
Given I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_<cat_uid_number>"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"

View File

@@ -86,14 +86,13 @@ Background:
Scenario: Assign user to department created in this script (Assign user: arlene)
Given POST this data:
Given PUT this data:
"""
{
}
"""
And that I want to update a resource with the key "dep_uid" stored in session array
And I request "department/<dep_uid>/assign-user/23085901752d5671483a4c2059274810"
And I request "department/<dep_uid>/assign-user/23085901752d5671483a4c2059274810" with the key "dep_uid" stored in session array
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
@@ -101,14 +100,13 @@ Background:
Scenario: Set manager user to department (new supervisor of department: jacob)
Given POST this data:
Given PUT this data:
"""
{
}
"""
And that I want to update a resource with the key "dep_uid" stored in session array
And I request "department/<dep_uid>/set-manager/24768775452d5671dbc1e92021979323"
And I request "department/<dep_uid>/set-manager/24768775452d5671dbc1e92021979323" with the key "dep_uid" stored in session array
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
@@ -118,14 +116,13 @@ Background:
Scenario: Unassign a User to department (Unassign user: arlene)
Given POST this data:
Given PUT this data:
"""
{
}
"""
And that I want to update a resource with the key "dep_uid" stored in session array
And I request "department/<dep_uid>/unassign-user/23085901752d5671483a4c2059274810"
And I request "department/<dep_uid>/unassign-user/23085901752d5671483a4c2059274810" with the key "dep_uid" stored in session array
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
@@ -134,14 +131,13 @@ Background:
Scenario: Set manager user to department (new supervisor of department: dylan)
Given POST this data:
Given PUT this data:
"""
{
}
"""
And that I want to update a resource with the key "dep_uid" stored in session array
And I request "department/<dep_uid>/set-manager/38102442252d5671a629009013495090"
And I request "department/<dep_uid>/set-manager/38102442252d5671a629009013495090" with the key "dep_uid" stored in session array
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"

View File

@@ -7,7 +7,7 @@ Background:
Given that I have a valid access_token
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
Scenario: List all Departaments in the workspace when exactly are 15 departaments created
Given I request "department"
Then the response status code should be 200
And the response charset is "UTF-8"
@@ -39,12 +39,7 @@ Background:
And the response charset is "UTF-8"
And the type is "array"
And the response has 4 record
And the "usr_username" property equals "joseph"
And the "usr_firstname" property equals "Joseph"
And the "usr_lastname" property equals "Bittner"
And the "usr_status" property equals "ACTIVE"
And the "usr_supervisor" property equals false
Scenario Outline: Create a new departments in the workspace
Given POST this data:
@@ -67,11 +62,11 @@ Background:
Examples:
| test_description | dep_uid_number | dep_title | dep_parent | dep_status |
| Created a department padre with status active | 1 | Department 1 | | ACTIVE |
| Created a department hijo with status active | 2 | Department 2 | 28036037252d56752770585009591640 | ACTIVE |
| Created a department padre with status inactive | 3 | Department 3 | | INACTIVE |
| Created a department hijo with status inactive | 4 | Department 4 | 28036037252d56752770585009591640 | INACTIVE |
| Created a department with character special | 5 | Department 5!@#$%^& | | ACTIVE |
| Created a department padre with status active | 1 | Department A | | ACTIVE |
| Created a department hijo with status active | 2 | Department B | 28036037252d56752770585009591640 | ACTIVE |
| Created a department padre with status inactive | 3 | Department C | | INACTIVE |
| Created a department hijo with status inactive | 4 | Department D | 28036037252d56752770585009591640 | INACTIVE |
| Created a department with character special | 5 | Department E!@#$%^& | | ACTIVE |
Scenario: Create a department with same name
@@ -79,7 +74,7 @@ Background:
"""
{
"dep_title" : "Department 1",
"dep_title" : "Department A",
"dep_parent" : "",
"dep_status" : "ACTIVE"
@@ -95,7 +90,7 @@ Background:
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 20 record
And the response has 18 record
Scenario Outline: Update a department created in this script
@@ -118,8 +113,8 @@ Background:
Examples:
| test_description | dep_uid_number | dep_title | dep_status |
| Update of field title and status of department | 1 | Department 1 UPDATE | INACTIVE |
| Update of field title and status of department | 3 | Department 3 UPDATE | ACTIVE |
| Update of field title and status of department | A | Department A UPDATE | INACTIVE |
| Update of field title and status of department | C | Department B UPDATE | ACTIVE |
Scenario Outline: Get a single department after update of the department created of this script
@@ -135,8 +130,8 @@ Background:
Examples:
| dep_uid_number | dep_title | dep_status |
| 1 | Department 1 UPDATE | INACTIVE |
| 3 | Department 3 UPDATE | ACTIVE |
| 1 | Department A UPDATE | INACTIVE |
| 3 | Department B UPDATE | ACTIVE |
Scenario Outline: Assign user to department created in this script
@@ -146,7 +141,7 @@ Background:
}
"""
And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
And I request "department/<dep_uid>/assign-user/<usr_uid>"
Then the response status code should be 200
And the response charset is "UTF-8"
@@ -171,7 +166,7 @@ Background:
}
"""
And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
And I request "department/<dep_uid>/set-manager/<usr_uid>"
Then the response status code should be 200
And the response charset is "UTF-8"
@@ -188,7 +183,7 @@ Background:
Scenario Outline: Get a single department of created in this script
Given that I want to get a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
Given that I want to get a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
And I request "department/<dep_uid>"
Then the response status code should be 200
And the response charset is "UTF-8"
@@ -203,8 +198,8 @@ Background:
Examples:
| dep_uid_number | dep_title | dep_status | dep_manager | dep_manager_username | dep_manager_firstname | dep_manager_lastname |
| 1 | Department 1 UPDATE | ACTIVE | 23085901752d5671483a4c2059274810 | arlene | Arlene | Cleveland |
| 2 | Department 2 | ACTIVE | 25286582752d56713231082039265791 | sandra | Sandra | Casey |
| 1 | Department A UPDATE | ACTIVE | 23085901752d5671483a4c2059274810 | arlene | Arlene | Cleveland |
| 2 | Department B | ACTIVE | 25286582752d56713231082039265791 | sandra | Sandra | Casey |
Scenario Outline: Unassign a User to department
@@ -214,7 +209,7 @@ Background:
}
"""
And that I want to update a resource with the key "dep_uid" stored in session array
And that I want to update a resource with the key "dep_uid" stored in session array
And I request "department/<dep_uid>/unassign-user/23085901752d5671483a4c2059274810"
Then the response status code should be 200
And the response charset is "UTF-8"
@@ -238,7 +233,7 @@ Background:
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 20 record
And the response has 18 record
Scenario Outline: Delete a department created in this script

View File

@@ -191,7 +191,7 @@ Scenario: Returns a list of the cases for the logged in user (Draft)
Scenario Outline: Returns the variables can be system variables and/or case variables.
Scenario Outline: Returns case variables generated by triggers before assignment (ba), before routing (br) and after routing (ar).
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"
@@ -202,8 +202,8 @@ Scenario Outline: Returns the variables can be system variables and/or case vari
Examples:
| test_description | case_number |
| Derivate case of the process "Derivation rules - sequential" | 6 |
| test_description | case_number |
| Derivate case of the process "Derivation rules - sequential" with triggers | 6 |
Scenario Outline: Sends variables to a case
@@ -258,9 +258,7 @@ Scenario Outline: Route a case to the next task in the process
| 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>"
@@ -283,7 +281,7 @@ Scenario: Returns a list of the cases for the logged in user (Inbox)
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
And the response has 15 records
Scenario Outline: Cancel a case

View File

@@ -47,7 +47,7 @@ Scenario Outline: Create a new case Impersonate (Negative Test)
Examples:
| Description | pro_uid | usr_uid | tas_uid | error_code | error_message |
| Create new case with process "Derivation rules - sequential" invalid pro_uid | 99201111111111111138927000421575 | 51049032352d56710347233042615067 | 68707275350ec281ada1c95068712556 | 400 | pro_uid |
| Create new case with process "Derivation rules - evaluation" invalid tas_uid | 99209594750ec27ea338927000421575 | 44811996752d567110634a1013636964 | 68707211111111111111111111712556 | 400 | tas_uid |
| Create new case with process "Derivation rules - evaluation" invalid tas_uid | 99209594750ec27ea338927000421575 | 44811996752d567110634a1013636964 | 68707211111111111111111111712556 | 400 | tas_uid |
| Create new case with process "Derivation rules - Parallel" usr_uid | 99209594750ec27ea338927000421575 | 24166331111111111111115035621101 | 68707275350ec281ada1c95068712556 | 400 | usr_uid |
| Create new case with process "Derivation rules - without pro_uid | | 86677227852d5671f40ba25017213081 | 68707275350ec281ada1c95068712556 | 400 | pro_uid |
| Create new case with process "Derivation rules - selection" tas_uid | 99209594750ec27ea338927000421575 | 62625000752d5672d6661e6072881167 | | 400 | tas_uid |

View File

@@ -10,7 +10,7 @@ Background:
Scenario: Returns a list of the uploaded documents for a given case
Given I request "cases/170220159534214f642abb8058832900/input-documents"
Then the response status code should be 404
Then the response status code should be 400
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"

View File

@@ -91,7 +91,37 @@ Scenario Outline: List assignees of an activity using a filter
| Filtered list should return 1 record | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | 1 | 36775342552d5674146d9c2078497230 | group | emp |
Scenario Outline: Get a single user or group of an activity
Scenario Outline: List all assignees of an activity includ user of the groups
Given I request "project/4224292655297723eb98691001100052/activity/<activity>/assignee/all
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And that "aas_uid" is set to "<aas_uid>"
And that "aas_name" is set to "<aas_name>"
And that "aas_lastname" is set to "<aas_lastname>"
And that "aas_username" is set to "<aas_username>"
And that "aas_type" is set to "<aas_type>"
Examples:
| activity | aas_uid | aas_name | aas_lastname | aas_username | aas_type |
| 65496814252977243d57684076211485 | 00000000000000000000000000000001 | Administrator | | admin | user |
| 65496814252977243d57684076211485 | 24166330352d56730cdd525035621101 | Chris | Rogers | chris | user |
| 65496814252977243d57684076211485 | 62625000752d5672d6661e6072881167 | Zachary | Wegner | zachary | user |
| 65496814252977243d57684076211485 | 33140476452d5671b0abda5073786635 | Gavin | Brule | gavin | user |
| 65496814252977243d57684076211485 | 86021298852d56716b85f73067566944 | Brianna | Ciarleglio | brianna | user |
| 65496814252977243d57684076211485 | 25286582752d56713231082039265791 | Amy | Connelly | amy | user |
| 65496814252977243d57684076211485 | 23085901752d5671483a4c2059274810 | Arlene | Cleveland | arlene | user |
| 65496814252977243d57684076211485 | 32444503652d5671778fd20059078570 | Carter | Ching | carter | user |
| 65496814252977243d57684076211485 | 33140476452d5671b0abda5073786635 | Gavin | Brule | gavin | user |
| 65496814252977243d57684076211485 | 50562411252d5671e788c02016273245 | Jason | Boria | jason | user |
| 65496814252977243d57684076211485 | 70952985852d567244ff0c1060856085 | Kevin | Beam | kevin | user |
| 65496814252977243d57684076211485 | 66955548552d567318736d1041697217 | Erick | Blake | erick | user |
| 65496814252977243d57684076211485 | 82857688652d5673a585726072326208 | Sandra | Casey | sandra | user |
Scenario Outline: Get a single user or group of an activity
Given I request "project/<project>/activity/<activity>/assignee/<aas_uid>"
Then the response status code should be 200
And the response charset is "UTF-8"

View File

@@ -179,7 +179,7 @@ Feature: Project Properties - Step Resources Main Tests
Scenario Outline: Assign a 3 triggers to a Step
Scenario Outline: Assign triggers to a Step
Given POST this data:
"""
{

View File

@@ -152,8 +152,4 @@ Feature: Testing triggers Main Tests
And the type is "array"
And the response has 2 records
And the "tri_title" property in row 0 equals "For event: change description"
And the "tri_title" property in row 1 equals "para eventos"
And the "tri_title" property in row 1 equals "para eventos"

View File

@@ -24,4 +24,21 @@ Feature: Triggers Negative Tests
| test_description | project | tri_title | tri_description |tri_type | error_code | error_message |
| Field required tri title | 251815090529619a99a2bf4013294414 | | Trigger con nombre en blanco |SCRIPT | 400 | tri_title |
#Test delete trigger when it asignee on the step
Scenario: Get the Triggers List when there are exactly two triggers
Given I request "project/99209594750ec27ea338927000421575/triggers"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has 5 records
Scenario: Delete a Triggers created in the process - (Derivation rules - sequential)
Given that I want to delete a "Trigger"
And I request "project/99209594750ec27ea338927000421575/trigger/96762672253418c5fde42f1084230135"
Then the response status code should be 400
And the response status message should have the following text "Dependencies were found for this trigger"