Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
@@ -15,7 +15,7 @@ Scenario: List of calendar
|
|||||||
And the response has 2 records
|
And the response has 2 records
|
||||||
|
|
||||||
|
|
||||||
Scenario: Get a single calendar
|
Scenario: Get a single calendar "Test Process"
|
||||||
Given I request "calendar/14606161052f50839307899033145440"
|
Given I request "calendar/14606161052f50839307899033145440"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
@@ -25,6 +25,16 @@ Scenario: Get a single calendar
|
|||||||
And the "cal_name" property equals "Test Process"
|
And the "cal_name" property equals "Test Process"
|
||||||
And the "cal_description" property equals "Calendar para el feature Process"
|
And the "cal_description" property equals "Calendar para el feature Process"
|
||||||
|
|
||||||
|
Scenario: Get a single calendar "Default Calendar"
|
||||||
|
Given I request "calendar/00000000000000000000000000000001"
|
||||||
|
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 the "cal_uid" property equals "00000000000000000000000000000001"
|
||||||
|
And the "cal_name" property equals "Default Calendar"
|
||||||
|
And the "cal_description" property equals "Default Calendar"
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Create a new Calendars
|
Scenario Outline: Create a new Calendars
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
@@ -54,8 +64,8 @@ Scenario Outline: Create a new Calendars
|
|||||||
|
|
||||||
| test_description | cal_uid_number | cal_name | cal_description |
|
| test_description | cal_uid_number | cal_name | cal_description |
|
||||||
| Create calendar 1 | 1 | Calendar 1 | Prueba de Creacion de Calendario 1 |
|
| Create calendar 1 | 1 | Calendar 1 | Prueba de Creacion de Calendario 1 |
|
||||||
| Create calendar 2 | 2 | Calendar 2 | Prueba de Creacion de Calendario 2 |
|
| Create calendar with short name | 2 | C | Prueba de Creacion de Calendario 2 |
|
||||||
| Create calendar with name long | 3 | Calendar 3 | Prueba de Creacion de Calendario 3 |
|
| Create calendar with name long | 3 | Creacion de nuevo Calendar con nombre largo para las pruebas behat | Prueba de Creacion de Calendario 3 |
|
||||||
| Create calendar with special character | 4 | Calendar 4 !@#$%^& | Prueba de Creacion de Calendario 4 |
|
| Create calendar with special character | 4 | Calendar 4 !@#$%^& | Prueba de Creacion de Calendario 4 |
|
||||||
|
|
||||||
|
|
||||||
@@ -204,6 +214,35 @@ Scenario Outline: Update the calendars and then check if the values had changed
|
|||||||
| Update calendar 2 | 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE |
|
| Update calendar 2 | 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario Outline: Update the calendars with same name
|
||||||
|
Given PUT this data:
|
||||||
|
"""
|
||||||
|
{
|
||||||
|
"cal_name": "<cal_name>",
|
||||||
|
"cal_description": "<cal_description>",
|
||||||
|
"cal_work_days": [1,2,3,4,5],
|
||||||
|
"cal_status": "<cal_status>",
|
||||||
|
"cal_work_hour": [
|
||||||
|
{"day": 4, "hour_start": "02:00", "hour_end": "21:00"},
|
||||||
|
{"day": 0, "hour_start": "09:00", "hour_end": "17:00"}
|
||||||
|
],
|
||||||
|
"cal_holiday": [
|
||||||
|
{"name": "Dia del trabajo", "date_start": "2014-05-01", "date_end": "2014-05-01"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
"""
|
||||||
|
And that I want to update a resource with the key "cal_uid" stored in session array as variable "cal_uid_<cal_uid_number>"
|
||||||
|
And I request "calendar"
|
||||||
|
Then the response status code should be 400
|
||||||
|
And the response status message should have the following text "already exists"
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
| test_description | cal_uid_number | cal_name | cal_description | cal_status |
|
||||||
|
| Update calendar 1 | 1 | Test Process | Calendar para el feature Process | ACTIVE |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Get a single calendar
|
Scenario Outline: Get a single calendar
|
||||||
Given that I want to get a resource with the key "cal_uid" stored in session array as variable "cal_uid_<cal_uid_number>"
|
Given that I want to get a resource with the key "cal_uid" stored in session array as variable "cal_uid_<cal_uid_number>"
|
||||||
And I request "calendar"
|
And I request "calendar"
|
||||||
|
|||||||
@@ -141,3 +141,25 @@ Scenario: Create a new Calendars (wrong date_end)
|
|||||||
And I request "calendar"
|
And I request "calendar"
|
||||||
Then the response status code should be 400
|
Then the response status code should be 400
|
||||||
And the response status message should have the following text "date_end"
|
And the response status message should have the following text "date_end"
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Create a new Calendars (with work days less than 3)
|
||||||
|
Given POST this data:
|
||||||
|
"""
|
||||||
|
{
|
||||||
|
"cal_name": "Sample Calendar",
|
||||||
|
"cal_description": "Creacion de Calendar 400",
|
||||||
|
"cal_work_days": [1,2],
|
||||||
|
"cal_work_hour": [
|
||||||
|
{"day": 0, "hour_start": "00:00", "hour_end": "00:00"},
|
||||||
|
{"day": 7, "hour_start": "09:00", "hour_end": "17:00"}
|
||||||
|
],
|
||||||
|
"cal_holiday": [
|
||||||
|
{"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"},
|
||||||
|
{"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
And I request "calendar"
|
||||||
|
Then the response status code should be 400
|
||||||
|
And the response status message should have the following text "least 3 Working Days"
|
||||||
@@ -49,7 +49,8 @@ Scenario Outline: Create a new Categories
|
|||||||
| Create new Category with only character numeric | 2 | 32425325 |
|
| Create new Category with only character numeric | 2 | 32425325 |
|
||||||
| Create new Category with only character special | 3 | @$@$#@% |
|
| Create new Category with only character special | 3 | @$@$#@% |
|
||||||
| Create new Category with normal character | 4 | sample |
|
| Create new Category with normal character | 4 | sample |
|
||||||
|
| Create new Category with short name | 5 | s |
|
||||||
|
| Create new Category with long name | 6 | Prueba de Creacion de nuevo categoria con nombre largo |
|
||||||
|
|
||||||
|
|
||||||
Scenario: Get list of Categories
|
Scenario: Get list of Categories
|
||||||
@@ -58,7 +59,7 @@ Scenario: Get list of Categories
|
|||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
And the type is "array"
|
And the type is "array"
|
||||||
And the response has 5 records
|
And the response has 7 records
|
||||||
|
|
||||||
|
|
||||||
Scenario: Create Category with same name
|
Scenario: Create Category with same name
|
||||||
@@ -93,6 +94,25 @@ Scenario Outline: Update the Category created in this script
|
|||||||
| Update Category | 2 | UPDATE 32425325 |
|
| Update Category | 2 | UPDATE 32425325 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario Outline: Update the Category putting the same name
|
||||||
|
Given PUT this data:
|
||||||
|
"""
|
||||||
|
{
|
||||||
|
"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>"
|
||||||
|
Then the response status code should be 400
|
||||||
|
And the response status message should have the following text "Duplicate Process Category"
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
| test_description | cat_uid_number | cat_name |
|
||||||
|
| Update Category | 5 | sample |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Get a Category specific
|
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
|
Then the response status code should be 200
|
||||||
@@ -124,8 +144,18 @@ Scenario Outline: Delete the Category created previously in this script
|
|||||||
| 2 |
|
| 2 |
|
||||||
| 3 |
|
| 3 |
|
||||||
| 4 |
|
| 4 |
|
||||||
|
| 5 |
|
||||||
|
| 6 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Get list of Categories
|
||||||
|
Given I request "project/categories"
|
||||||
|
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 1 records
|
||||||
|
|
||||||
Scenario: Get a Category specific
|
Scenario: Get a Category specific
|
||||||
Given I request "project/category/4177095085330818c324501061677193"
|
Given I request "project/category/4177095085330818c324501061677193"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Background:
|
|||||||
Given that I have a valid access_token
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
|
||||||
Scenario: List all Departaments in the workspace when exactly are 15 departaments created
|
Scenario: List all Departaments in the workspace when exactly are 15 departaments created
|
||||||
Given I request "department"
|
Given I request "department"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
@@ -15,7 +15,7 @@ Background:
|
|||||||
And the response has 15 record
|
And the response has 15 record
|
||||||
|
|
||||||
|
|
||||||
Scenario: Get a single department of de Sales Division department
|
Scenario: Get a single department of de Sales Division department
|
||||||
Given I request "department/12921473252d567506e6e63079240767"
|
Given I request "department/12921473252d567506e6e63079240767"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
@@ -33,15 +33,19 @@ Background:
|
|||||||
And the "has_children" property equals "0"
|
And the "has_children" property equals "0"
|
||||||
|
|
||||||
|
|
||||||
Scenario: Get a List of Assigned User (Department: Sales Division)
|
Scenario: Get a List of Assigned User (Department: Sales Division)
|
||||||
Given I request "department/12921473252d567506e6e63079240767/assigned-user"
|
Given I request "department/12921473252d567506e6e63079240767/assigned-user"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
And the type is "array"
|
And the type is "array"
|
||||||
And the response has 4 record
|
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
|
Scenario Outline: Create a new departments in the workspace
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -69,7 +73,7 @@ Background:
|
|||||||
| Created a department with character special | 5 | Department E!@#$%^& | | ACTIVE |
|
| Created a department with character special | 5 | Department E!@#$%^& | | ACTIVE |
|
||||||
|
|
||||||
|
|
||||||
Scenario: Create a department with same name
|
Scenario: Create a department with same name
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -85,7 +89,7 @@ Background:
|
|||||||
And the response status message should have the following text "exist"
|
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"
|
Given I request "department"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
@@ -93,7 +97,7 @@ Background:
|
|||||||
And the response has 18 record
|
And the response has 18 record
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Update a department created in this script
|
Scenario Outline: Update a department created in this script
|
||||||
Given PUT this data:
|
Given PUT this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -117,7 +121,29 @@ Background:
|
|||||||
| Update of field title and status of department | 2 | Department B UPDATE | ACTIVE |
|
| Update of field title and status of department | 2 | Department B UPDATE | ACTIVE |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Get a single department after update of the department created of this script
|
|
||||||
|
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>"
|
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"
|
And I request "department"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
@@ -134,7 +160,7 @@ Background:
|
|||||||
| 3 | Department B UPDATE | ACTIVE |
|
| 3 | Department B UPDATE | ACTIVE |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Assign user to department created in this script
|
Scenario Outline: Assign user to department created in this script
|
||||||
Given PUT this data:
|
Given PUT this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -158,7 +184,7 @@ Background:
|
|||||||
| Assign user francis in department 5 created in this script | 5 | 62511352152d5673bba9cd4062743508 |
|
| Assign user francis in department 5 created in this script | 5 | 62511352152d5673bba9cd4062743508 |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Set manager user to department
|
Scenario Outline: Set manager user to department
|
||||||
Given PUT this data:
|
Given PUT this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -172,7 +198,6 @@ Background:
|
|||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| Description | dep_uid_number | usr_uid |
|
| Description | dep_uid_number | usr_uid |
|
||||||
@@ -180,7 +205,7 @@ Background:
|
|||||||
| Set manager user "sandra" in group 2 | 2 | 25286582752d56713231082039265791 |
|
| Set manager user "sandra" in group 2 | 2 | 25286582752d56713231082039265791 |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Get a single department of created in this script
|
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"
|
And I request "department"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
@@ -200,7 +225,7 @@ Background:
|
|||||||
| 2 | Department B | ACTIVE | 25286582752d56713231082039265791 | sandra | Sandra | Casey |
|
| 2 | Department B | ACTIVE | 25286582752d56713231082039265791 | sandra | Sandra | Casey |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Unassign a User to department
|
Scenario Outline: Unassign a User to department
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -214,7 +239,6 @@ Background:
|
|||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| Description | dep_uid_number | usr_uid |
|
| Description | dep_uid_number | usr_uid |
|
||||||
@@ -225,7 +249,7 @@ Background:
|
|||||||
| Unassign user francis in department 5 created in this script | 5 | 62511352152d5673bba9cd4062743508 |
|
| 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
|
Scenario: List all Departaments in the workspace when exactly are 15 departaments created
|
||||||
Given I request "department"
|
Given I request "department"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
@@ -233,7 +257,7 @@ Background:
|
|||||||
And the response has 18 record
|
And the response has 18 record
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Delete a department created in this script
|
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>"
|
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"
|
And I request "department"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
@@ -251,7 +275,7 @@ Background:
|
|||||||
| 5 |
|
| 5 |
|
||||||
|
|
||||||
|
|
||||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||||
Given I request "department"
|
Given I request "department"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
|
|||||||
@@ -54,4 +54,3 @@ Scenario: Delete a department when have asigned user (negative tests)
|
|||||||
And I request "department/15978182252d5674d210310076985235"
|
And I request "department/15978182252d5674d210310076985235"
|
||||||
Then the response status code should be 400
|
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"
|
||||||
|
|
||||||
@@ -6,6 +6,15 @@ Feature: PM Group Main Tests
|
|||||||
Background:
|
Background:
|
||||||
Given that I have a valid access_token
|
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
|
Scenario Outline: Get list Groups of workspace using different filters
|
||||||
And I request "groups?filter=<filter>&start=<start>&limit=<limit>"
|
And I request "groups?filter=<filter>&start=<start>&limit=<limit>"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
@@ -56,6 +65,19 @@ Feature: PM Group Main Tests
|
|||||||
| 2 | Demo Group3 for main behat | INACTIVE |
|
| 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
|
Scenario: Get the Groups list when there are 23 records
|
||||||
And I request "groups?filter=&start=0&limit=50"
|
And I request "groups?filter=&start=0&limit=50"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
@@ -107,6 +129,37 @@ Feature: PM Group Main Tests
|
|||||||
| 2 | Update Demo Group3 for main behat | ACTIVE |
|
| 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
|
#ASSIGN USER TO GROUP
|
||||||
|
|
||||||
Scenario Outline: Get list Users of workspace using different filters for a group
|
Scenario Outline: Get list Users of workspace using different filters for a group
|
||||||
|
|||||||
@@ -54,3 +54,15 @@ Feature: PM Group Negative Tests
|
|||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
Then the response status code should be 400
|
Then the response status code should be 400
|
||||||
And the response status message should have the following text "usr_uid"
|
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"
|
||||||
@@ -106,7 +106,7 @@ Feature: User Main Tests
|
|||||||
| Create with all fields | 3 | /home/wendy/photo/pic3.jpg |
|
| 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 I request "users"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
@@ -115,14 +115,38 @@ Feature: User Main Tests
|
|||||||
And the response has 68 records
|
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
|
Examples:
|
||||||
And I request "users"
|
|
||||||
And the content type is "application/json"
|
| 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 |
|
||||||
Then the response status code should be 200
|
| Amy | Connelly | amy | colosaqatest@gmail.com | | | | | | | | | 2015-01-14 | | ACTIVE | PROCESSMAKER_OPERATOR | sample | sample |
|
||||||
And the response charset is "UTF-8"
|
|
||||||
And the type is "array"
|
|
||||||
And the response has 68 records
|
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Update User and then check if the values had changed
|
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 |
|
| 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 I request "users"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
@@ -206,6 +265,7 @@ Feature: User Main Tests
|
|||||||
And the type is "array"
|
And the type is "array"
|
||||||
And the response has 68 records
|
And the response has 68 records
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Delete all users created previously in this script
|
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>"
|
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"
|
And I request "user"
|
||||||
@@ -231,4 +291,3 @@ Feature: User Main Tests
|
|||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
And the type is "array"
|
And the type is "array"
|
||||||
And the response has 63 records
|
And the response has 63 records
|
||||||
|
|
||||||
@@ -105,6 +105,27 @@ Scenario: Get list of Roles
|
|||||||
And the response has 11 records
|
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
|
#Assign users to role
|
||||||
|
|
||||||
Scenario Outline: List assigned Users to Role & List available Users to assign 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 |
|
| 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
|
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>"
|
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
|
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 |
|
| 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
|
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>"
|
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
|
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 |
|
| 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
|
Scenario: Get list of Roles
|
||||||
Given I request "roles"
|
Given I request "roles"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class Server implements iAuthenticate
|
|||||||
$request = \OAuth2\Request::createFromGlobals();
|
$request = \OAuth2\Request::createFromGlobals();
|
||||||
$response = $this->server->handleTokenRequest($request);
|
$response = $this->server->handleTokenRequest($request);
|
||||||
|
|
||||||
/* DEPREACATED
|
|
||||||
$token = $response->getParameters();
|
$token = $response->getParameters();
|
||||||
if (array_key_exists('access_token', $token)) {
|
if (array_key_exists('access_token', $token)) {
|
||||||
$data = $this->storage->getAccessToken($token['access_token']);
|
$data = $this->storage->getAccessToken($token['access_token']);
|
||||||
@@ -168,7 +168,7 @@ class Server implements iAuthenticate
|
|||||||
// verify if the client is our local PM Designer client
|
// verify if the client is our local PM Designer client
|
||||||
if ($data['client_id'] == self::getPmClientId()) {
|
if ($data['client_id'] == self::getPmClientId()) {
|
||||||
error_log('do stuff - is a request from local pm client');
|
error_log('do stuff - is a request from local pm client');
|
||||||
require_once "classes/model/PmoauthUserAccessTokens.php";
|
//require_once "classes/model/PmoauthUserAccessTokens.php";
|
||||||
|
|
||||||
$userToken = new \PmoauthUserAccessTokens();
|
$userToken = new \PmoauthUserAccessTokens();
|
||||||
$userToken->setAccessToken($token['access_token']);
|
$userToken->setAccessToken($token['access_token']);
|
||||||
@@ -178,7 +178,7 @@ class Server implements iAuthenticate
|
|||||||
|
|
||||||
$userToken->save();
|
$userToken->save();
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
$response->send();
|
$response->send();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ if ((preg_match("/msie/i", $_SERVER ['HTTP_USER_AGENT']) != 1 ||
|
|||||||
$config['safari_cookie_lifetime'] == 1)) {
|
$config['safari_cookie_lifetime'] == 1)) {
|
||||||
ini_set('session.cookie_lifetime', $timelife);
|
ini_set('session.cookie_lifetime', $timelife);
|
||||||
}
|
}
|
||||||
//session_start();
|
session_start();
|
||||||
|
|
||||||
//$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
//$e_all = defined( 'E_DEPRECATED' ) ? E_ALL & ~ E_DEPRECATED : E_ALL;
|
||||||
//$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
//$e_all = defined( 'E_STRICT' ) ? $e_all & ~ E_STRICT : $e_all;
|
||||||
@@ -630,12 +630,6 @@ if (file_exists( $sSerializedFile )) {
|
|||||||
//require_once ("propel/Propel.php");
|
//require_once ("propel/Propel.php");
|
||||||
//require_once ("creole/Creole.php");
|
//require_once ("creole/Creole.php");
|
||||||
|
|
||||||
list($host, $port) = strpos(DB_HOST, ':') !== false ? explode(':', DB_HOST) : array(DB_HOST, '');
|
|
||||||
$port = empty($port) ? '' : ";port=$port";
|
|
||||||
$handler = new PmSessionHandler(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port);
|
|
||||||
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
if (defined( 'DEBUG_SQL_LOG' ) && DEBUG_SQL_LOG) {
|
if (defined( 'DEBUG_SQL_LOG' ) && DEBUG_SQL_LOG) {
|
||||||
define( 'PM_PID', mt_rand( 1, 999999 ) );
|
define( 'PM_PID', mt_rand( 1, 999999 ) );
|
||||||
require_once 'Log.php';
|
require_once 'Log.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user