Adicion de nuevos scenarios en los features departments, pm group, pm user y roles

This commit is contained in:
Wendy Nestor
2014-06-10 17:00:17 -04:00
parent 962ef70969
commit b5e6b532f5
6 changed files with 449 additions and 226 deletions

View File

@@ -39,6 +39,10 @@ Background:
And the response charset is "UTF-8"
And the type is "array"
And the response has 4 record
And that "usr_username" is set to "joseph"
And that "usr_username" is set to "jacob"
And that "usr_username" is set to "dylan"
And that "usr_username" is set to "joshua"
Scenario Outline: Create a new departments in the workspace
@@ -85,7 +89,7 @@ Background:
And the response status message should have the following text "exist"
Scenario: List all Departaments in the workspace when exactly are 20 departaments created
Scenario: List all Departaments in the workspace when exactly are 18 departaments created
Given I request "department"
Then the response status code should be 200
And the response charset is "UTF-8"
@@ -117,6 +121,28 @@ Background:
| Update of field title and status of department | 2 | Department B UPDATE | ACTIVE |
Scenario Outline: Update a department putting the same name of a department created in this script
Given PUT this data:
"""
{
"dep_title" : "<dep_title>",
"dep_status" : "<dep_status>"
}
"""
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"
Then the response status code should be 400
And the response status message should have the following text "exist"
Examples:
| dep_uid_number | dep_title | dep_status |
| 5 | Department C | INACTIVE |
Scenario Outline: 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 as variable "dep_uid_<dep_uid_number>"
And I request "department"
@@ -172,7 +198,6 @@ Background:
And the content type is "application/json"
And the type is "object"
Examples:
| Description | dep_uid_number | usr_uid |
@@ -214,7 +239,6 @@ Background:
And the content type is "application/json"
And the type is "object"
Examples:
| Description | dep_uid_number | usr_uid |

View File

@@ -54,4 +54,3 @@ Scenario: Delete a department when have asigned user (negative tests)
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"

View File

@@ -6,6 +6,15 @@ Feature: PM Group Main Tests
Background:
Given that I have a valid access_token
Scenario: Get the Groups list when there are 20 records
And I request "groups?filter=&start=0&limit=50"
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 20 records
Scenario Outline: Get list Groups of workspace using different filters
And I request "groups?filter=<filter>&start=<start>&limit=<limit>"
And the content type is "application/json"
@@ -56,6 +65,19 @@ Feature: PM Group Main Tests
| 2 | Demo Group3 for main behat | INACTIVE |
Scenario: Create new group with same name
Given POST this data:
"""
{
"grp_title": "Accounting",
"grp_status": "ACTIVE"
}
"""
And I request "group"
Then the response status code should be 400
And the response status message should have the following text "already exists"
Scenario: Get the Groups list when there are 23 records
And I request "groups?filter=&start=0&limit=50"
And the content type is "application/json"
@@ -107,6 +129,37 @@ Feature: PM Group Main Tests
| 2 | Update Demo Group3 for main behat | ACTIVE |
Scenario Outline: Update Group putting the same name of a group created in this script
Given PUT this data:
"""
{
"grp_title": "<grp_title>",
"grp_status": "<grp_status>"
}
"""
And that I want to update a resource with the key "grp_uid" stored in session array as variable "grp_uid_<grp_uid_number>"
And I request "group"
Then the response status code should be 400
And the response status message should have the following text "exists"
Examples:
| grp_uid_number | grp_title | grp_status |
| 2 | Demo Group2 for main behat | INACTIVE |
#ASSIGN USER TO GROUP
Scenario Outline: Get list Users of workspace using different filters for a group

View File

@@ -54,3 +54,15 @@ Feature: PM Group Negative Tests
And the content type is "application/json"
Then the response status code should be 400
And the response status message should have the following text "usr_uid"
Scenario: Assign the same user to the group
Given POST this data:
"""
{
"usr_uid": "00000000000000000000000000000001"
}
"""
And I request "group/70084316152d56749e0f393054862525/user"
Then the response status code should be 400
And the response status message should have the following text "already assigned"

View File

@@ -106,7 +106,7 @@ Feature: User Main Tests
| Create with all fields | 3 | /home/wendy/photo/pic3.jpg |
Scenario: Get the users List when there are exactly 63 users
Scenario: Get the users List when there are exactly 68 users
And I request "users"
And the content type is "application/json"
Then the response status code should be 200
@@ -115,14 +115,38 @@ Feature: User Main Tests
And the response has 68 records
Scenario Outline: Create new User with same name
Given POST this data:
"""
{
"usr_firstname": "<usr_firstname>",
"usr_lastname": "<usr_lastname>",
"usr_username": "<usr_username>",
"usr_email": "<usr_email>",
"usr_address": "<usr_address>",
"usr_zip_code": "<usr_zip_code>",
"usr_country": "<usr_country>",
"usr_city": "<usr_city>",
"usr_location": "<usr_location>",
"usr_phone": "<usr_phone>",
"usr_position": "<usr_position>",
"usr_replaced_by": "<usr_replaced_by>",
"usr_due_date": "<usr_due_date>",
"usr_calendar": "<usr_calendar>",
"usr_status": "<usr_status>",
"usr_role": "<usr_role>",
"usr_new_pass": "<usr_new_pass>",
"usr_cnf_pass": "<usr_cnf_pass>"
}
"""
And I request "user"
Then the response status code should be 400
And the response status message should have the following text "already exists"
Scenario: Get the users List when there are exactly 63 users
And I request "users"
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has 68 records
Examples:
| usr_firstname | usr_lastname | usr_username | usr_email | usr_address | usr_zip_code | usr_country | usr_city | usr_location | usr_phone | usr_position | usr_replaced_by | usr_due_date | usr_calendar | usr_status | usr_role | usr_new_pass | usr_cnf_pass |
| Amy | Connelly | amy | colosaqatest@gmail.com | | | | | | | | | 2015-01-14 | | ACTIVE | PROCESSMAKER_OPERATOR | sample | sample |
Scenario Outline: Update User and then check if the values had changed
@@ -198,7 +222,42 @@ Feature: User Main Tests
| Update usr_status | 3 | sarita | sandler | sarita | saraah@gmail.com | laberh #985 | 555-9999 | AR | B | BUE | 2353643644 | Desarrollo | 61364466452d56711adb378002702791 | 2014-12-12 | 99159704252f501c63f8c58025859967 | INACTIVE | PROCESSMAKER_ADMIN | admin | admin |
Scenario: Get the users List when there are exactly 63 users
Scenario Outline: Update User with the same data from an existing user
Given PUT this data:
"""
{
"usr_firstname": "<usr_firstname>",
"usr_lastname": "<usr_lastname>",
"usr_username": "<usr_username>",
"usr_email": "<usr_email>",
"usr_address": "<usr_address>",
"usr_zip_code": "<usr_zip_code>",
"usr_country": "<usr_country>",
"usr_city": "<usr_city>",
"usr_location": "<usr_location>",
"usr_phone": "<usr_phone>",
"usr_position": "<usr_position>",
"usr_replaced_by": "<usr_replaced_by>",
"usr_due_date": "<usr_due_date>",
"usr_calendar": "<usr_calendar>",
"usr_status": "<usr_status>",
"usr_role": "<usr_role>",
"usr_new_pass": "<usr_new_pass>",
"usr_cnf_pass": "<usr_cnf_pass>"
}
"""
And that I want to update a resource with the key "usr_uid" stored in session array as variable "usr_uid_<usr_number>"
And I request "user"
Then the response status code should be 400
And the response status message should have the following text "already exists"
Examples:
| usr_number | usr_firstname | usr_lastname | usr_username | usr_email | usr_address | usr_zip_code | usr_country | usr_city | usr_location | usr_phone | usr_position | usr_replaced_by | usr_due_date | usr_calendar | usr_status | usr_role | usr_new_pass | usr_cnf_pass |
| 4 | micaela | sanchez | micaela | micaela@gmail.com | sancjh #544 | 555-6652 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | | VACATION | PROCESSMAKER_OPERATOR | sample | sample |
Scenario: Get the users List when there are exactly 68 users
And I request "users"
And the content type is "application/json"
Then the response status code should be 200
@@ -206,6 +265,7 @@ Feature: User Main Tests
And the type is "array"
And the response has 68 records
Scenario Outline: Delete all users created previously in this script
Given that I want to delete a resource with the key "usr_uid" stored in session array as variable "usr_uid_<usr_number>"
And I request "user"
@@ -231,4 +291,3 @@ Feature: User Main Tests
And the response charset is "UTF-8"
And the type is "array"
And the response has 63 records

View File

@@ -105,6 +105,27 @@ Scenario: Get list of Roles
And the response has 11 records
Scenario Outline: Create new Role with same name
Given POST this data:
"""
{
"rol_code": "<rol_code>",
"rol_name": "<rol_name>",
"rol_status": "<rol_status>"
}
"""
And I request "role"
Then the response status code should be 400
And the response status message should have the following text "already exists"
Examples:
| rol_code | rol_name | rol_status |
| PROCESSMAKER_OPERATOR | Operator | ACTIVE |
#Assign users to role
Scenario Outline: List assigned Users to Role & List available Users to assign to Role
@@ -216,6 +237,23 @@ Scenario Outline: Assign User to Role
| Assign user "olivia" | 8 | 73005191052d56727901138030694610 |
Scenario Outline: Assign same User to Role "1"
Given POST this data:
"""
{
"usr_uid": "<usr_uid>"
}
"""
And I request "role/rol_uid/user" with the key "rol_uid" stored in session array as variable "rol_uid_<rol_uid_number>"
Then the response status code should be 400
And the response status message should have the following text "already assigned"
Examples:
| Description | rol_uid_number | usr_uid |
| Assign user "aaron" | 1 | 51049032352d56710347233042615067 |
Scenario Outline: List assigned Users to Role & List available Users to assign to Role
Given I request "role/rol_uid/users" with the key "rol_uid" stored in session array as variable "rol_uid_<rol_uid_number>"
Then the response status code should be 200
@@ -423,6 +461,23 @@ Scenario Outline: Assign Permission "PM_DASHBOARD" to Role
| Assign Permissions "PM_FOLDER_DEL" to rol 8 | 8 | 00000000000000000000000000000019 |
Scenario Outline: Assign same Permission "PM_DASHBOARD" to Role 1
Given POST this data:
"""
{
"per_uid": "<per_uid>"
}
"""
And I request "role/rol_uid/permission" with the key "rol_uid" stored in session array as variable "rol_uid_<rol_uid_number>"
Then the response status code should be 400
And the response status message should have the following text "already assigned to the role"
Examples:
| Description | rol_uid_number | per_uid |
| Assign Permissions "PM_LOGIN" to rol 1 | 1 | 00000000000000000000000000000001 |
Scenario Outline: List assigned Permissions to Role & List available Permissions to assign to Role
Given I request "role/rol_uid/permissions" with the key "rol_uid" stored in session array as variable "rol_uid_<rol_uid_number>"
Then the response status code should be 200
@@ -583,6 +638,27 @@ Scenario Outline: Get a single Role created in this script
| Update name of role created in this script | 8 | PROCESSMAKER_OCHO | update*'123 | INACTIVE |
Scenario Outline: Update Role with the same data from an existing role
Given PUT this data:
"""
{
"rol_code": "<rol_code>",
"rol_name": "<rol_name>",
"rol_status": "<rol_status>"
}
"""
And that I want to update a resource with the key "rol_uid" stored in session array as variable "rol_uid_<rol_uid_number>"
And I request "role"
Then the response status code should be 400
And the response status message should have the following text "already exists"
Examples:
| rol_uid_number | rol_code | rol_name | rol_status |
| 2 | PROCESSMAKER_TRES | Rol con code administrator | INACTIVE |
Scenario: Get list of Roles
Given I request "roles"
Then the response status code should be 200