ävaces en categories, departments, case variables y case tracker

This commit is contained in:
Wendy Nestor
2014-04-09 16:52:10 -04:00
parent 9f5759779d
commit 9ecf38eac5
7 changed files with 221 additions and 154 deletions

View File

@@ -1,4 +1,4 @@
@ProcessMakerMichelangelo @RestAPI
ou @ProcessMakerMichelangelo @RestAPI
Feature: Process Category
Requirements:
a workspace with the workspace with one process category

View File

@@ -12,7 +12,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 16 record
And the response has 15 record
Scenario: Get a single department of de Sales Division department
@@ -31,6 +31,15 @@ Background:
And the "dep_manager_firstname" property equals "Dylan"
And the "dep_manager_lastname" property equals "Burns"
And the "has_children" property equals "0"
Scenario: Get a List of Available User (Department: Sales Division)
Given I request "department/12921473252d567506e6e63079240767/available-user"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 7 record
Scenario: Create a new department in the workspace
Given POST this data:
@@ -56,7 +65,7 @@ Background:
"""
{
"dep_title" : "TestDepartment Update",
"dep_status" : "INACTIVE"
"dep_status" : "ACTIVE"
}
"""
And that I want to update a resource with the key "dep_uid" stored in session array
@@ -67,33 +76,78 @@ Background:
And the type is "object"
Scenario: Get a single department after update of the department created of this script
Given that I want to get a resource with the key "dep_uid" stored in session array
Given I request "department"
Then the response status code should be 200
And the response charset is "UTF-8"
And the "dep_title" property equals "TestDepartment Update"
And the "dep_status" property equals "INACTIVE"
And the "dep_status" property equals "ACTIVE"
#Scenario: Assign user to department created in this script
# Given POST this data:
# """
# {
Scenario: Assign user to department created in this script (Assign user: arlene)
Given POST this data:
"""
{
# "dep_title" : "TestDepartment",
# "dep_parent" : "",git
# "dep_status" : "ACTIVE"
}
"""
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"
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 "dep_uid" in session array
#}
#"""
#And I request "department/<dep_uid>/assign-user/62511352152d5673bba9cd4062743508 "
#Then the response status code should be 201
#And the response charset is "UTF-8"
#And the content type is "application/json"
#And the type is "object"
#And store "dep_uid" in session array
Scenario: Set manager user to department (new supervisor of department: jacob)
Given POST 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"
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 "dep_uid" in session array
Scenario: Unassign a User to department (Unassign user: arlene)
Given POST 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"
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 "dep_uid" in session array
Scenario: Set manager user to department (new supervisor of department: dylan)
Given POST 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"
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 "dep_uid" in session array
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
@@ -101,7 +155,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 17 record
And the response has 16 record
Scenario: Delete a department created in this script
@@ -118,4 +172,4 @@ 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 16 record
And the response has 15 record

View File

@@ -12,7 +12,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 16 record
And the response has 15 record
Scenario: Get a single department of de Sales Division department
@@ -31,8 +31,21 @@ Background:
And the "dep_manager_firstname" property equals "Dylan"
And the "dep_manager_lastname" property equals "Burns"
And the "has_children" property equals "0"
Scenario: Get a List of Assigned User (Department: Sales Division)
Given I request "department/12921473252d567506e6e63079240767/assigned-user"
Then the response status code should be 200
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:
"""
@@ -77,12 +90,12 @@ Background:
And the response status message should have the following text "exist"
Scenario: List all Departaments in the workspace when exactly are 21 departaments created
Scenario: List all Departaments in the workspace when exactly are 20 departaments created
Given I request "department"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 19 record
And the response has 20 record
Scenario Outline: Update a department created in this script
@@ -126,25 +139,108 @@ Background:
| 3 | Department 3 UPDATE | ACTIVE |
#Scenario: Assign user to department created in this script
# Given POST this data:
# """
# {
Scenario Outline: Assign user to department created in this script
Given PUT this data:
"""
{
# "dep_title" : "TestDepartment",
# "dep_parent" : "",git
# "dep_status" : "ACTIVE"
}
"""
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"
And the content type is "application/json"
And the type is "object"
And store "dep_uid" in session array
#}
#"""
#And I request "department/<dep_uid>/assign-user/62511352152d5673bba9cd4062743508 "
#Then the response status code should be 201
#And the response charset is "UTF-8"
#And the content type is "application/json"
#And the type is "object"
#And store "dep_uid" in session array
Examples:
| Description | dep_uid_number | usr_uid |
| Assign user arlene in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 |
| Assign user andrew in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 |
| Assign user amy in department 2 created in this script | 2 | 25286582752d56713231082039265791 |
| Assign user sandra in department 2 created in this script | 2 | 25286582752d56713231082039265791 |
| Assign user francis in department 5 created in this script | 5 | 62511352152d5673bba9cd4062743508 |
Scenario Outline: Set manager user to department
Given PUT this data:
"""
{
}
"""
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"
And the content type is "application/json"
And the type is "object"
And store "dep_uid" in session array
Examples:
| Description | dep_uid_number | usr_uid |
| Set manager user "arlene" in group 1 | 1 | 23085901752d5671483a4c2059274810 |
| Set manager user "sandra" in group 2 | 2 | 25286582752d56713231082039265791 |
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>"
And I request "department/<dep_uid>"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And that "dep_title" is set to "<dep_title>"
And that "dep_status" is set to "<dep_status>"
And that "dep_manager" is set to "<dep_manager>"
And that "dep_manager_username" is set to "<dep_manager_username>"
And that "dep_manager_firstname" is set to "<dep_manager_firstname>"
And that "dep_manager_lastname" is set to "<dep_manager_lastname>"
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 |
Scenario Outline: Unassign a User to department
Given POST 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"
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 "dep_uid" in session array
Examples:
| Description | dep_uid_number | usr_uid |
| Unassign user arlene in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 |
| Unassign user andrew in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 |
| Unassign user amy in department 2 created in this script | 2 | 25286582752d56713231082039265791 |
| Unassign user sandra in department 2 created in this script | 2 | 25286582752d56713231082039265791 |
| Unassign user francis in department 5 created in this script | 5 | 62511352152d5673bba9cd4062743508 |
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"
And the type is "array"
And the response has 20 record
Scenario Outline: Delete a department created in this script
Given that I want to delete a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
And I request "department"
@@ -168,4 +264,4 @@ 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 16 record
And the response has 15 record

View File

@@ -25,13 +25,33 @@ Scenario Outline: Create a new departments in the workspace with bad parameters
| test_description | dep_title | dep_parent | dep_status | error_code | error_message |
| without dep_title | | | ACTIVE | 400 | dep_title |
| Invalid dep_parent | Department 2 | 28036030000000000000005009591640 | ACTIVE | 400 | dep_parent |
| Invalid dep_status | Department 3 | | TRIGGER | 400 | dep_status |
| Invalid dep_status | Department 1 | | SAMPLE | 400 | dep_status |
Scenario Outline: Assign user to department (NEGATIVE TEST)
Given PUT this data:
"""
{
}
"""
And I request "department/<dep_uid>/assign-user/<usr_uid>"
Then the response status code should be <error_code>
And the response status message should have the following text "<error_message>"
Examples:
| Description | dep_uid | usr_uid | error_code | error_message |
| Invalid usr_uid | 56255940652d5674c75bc70062927441 | 23085900000000000000002059274810 | 400 | usr_uid |
| Invalid dep_uid | 56255900000000000000000062927441 | 23085901752d5671483a4c2059274810 | 400 | dep_uid |
| Field Requered usr_uid | 56255940652d5674c75bc70062927441 | | 404 | Not Found |
| Field Requered dep_uid | | 25286582752d56713231082039265791 | 404 | Not Found |
Scenario: Delete a department when have asigned user (negative tests)
Given that I want to delete a resource with the key "15978182252d5674d210310076985235"
And I request "department/15978182252d5674d210310076985235"
Then the response status code should be 400
And the response status message should have the following text "<cannot be deleted>"
And the response status message should have the following text "<cannot be deleted>"

View File

@@ -50,30 +50,7 @@ Scenario: Returns the variables can be system variables and/or case variables.
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
Given PUT this data:
@@ -111,7 +88,7 @@ Scenario: Returns the variables can be system variables and/or case variables.
And the response charset is "UTF-8"
And the type is "object"
And the "nameany" property equals "sample-put"
And the "namealphabetic" property equals "juan-put"
And the "namealphabetic" property equals "juanput"
And the "namealphanumeric" property equals "sample123567"
And the "nameinteger" property equals "1313200000"
And the "namerealnumber" property equals "4324325000567.12"
@@ -143,35 +120,7 @@ Scenario: Returns the variables can be system variables and/or case variables.
And the "date2" property equals "2013-11-08"
And the "date3" property equals "2014-03-03"
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 "unoput"
And the "currency1" property equals "133,000.00"
And the "percentage1" property equals "424.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"
Scenario: Return variables to a case
Given PUT this data:
@@ -246,26 +195,4 @@ Scenario: Returns the variables can be system variables and/or case variables.
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"

View File

@@ -7,35 +7,5 @@ Background:
Scenario: Returns the variables can be system variables and/or case variables (negative tests).
Given I request "cases/95124734553388becc0e332080057699/variable"
Then the response status code should be 400
Then the response status code should be 404
And the response status message should have the following text "Not Found"
Scenario: Sends variables to a case (negative tests)
Given PUT this data:
"""
{
"nameany": "sample-put",
"namealphabetic": "juanput",
"namealphanumeric": "sample123put",
"nameinteger": "1313200000",
"namerealnumber": "4324325000put",
"nameemail": "qa@colosaput.com",
"namelogin": "sampleput",
"valorreal": "32,142,424.00",
"valorinteger": "4,242,424",
"porcentagereal": "424.00 %",
"porcentageinteger": "424 %",
"observaciones": "ningunaput",
"grid": {
"1": {
"sample": "unoput",
"currency1": "133,000.00",
"percentage1": "424.00 %",
}
"""
And I request "cases/95124734553388becc0e332080057699/variable"
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"

View File

@@ -1,8 +1,8 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Step update position
Feature: Step update position Main Tests
Scenario: List all the Sub Processs (result 0 Sub Processs)
Given that I have a valid access_token
And I request "project/6838258995339cb1474fc94058315158/case-tracker/object/6262239315339cb46efc6e4031561540
And I request "project/6838258995339cb1474fc94058315158/case-tracker/object/6262239315339cb46efc6e4031561540"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"