Adicion de nuevos escenarios a los features calendar y process category
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:
|
||||||
@@ -52,12 +62,12 @@ Scenario Outline: Create a new Calendars
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| 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 |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Create a new Calendar with parameter cal_work_days diferent
|
Scenario Outline: Create a new Calendar with parameter cal_work_days diferent
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
@@ -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"
|
||||||
|
|||||||
@@ -140,4 +140,26 @@ 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"
|
||||||
@@ -44,12 +44,13 @@ Scenario Outline: Create a new Categories
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| test_description | cat_uid_number | cat_name |
|
| test_description | cat_uid_number | cat_name |
|
||||||
| Create new Category with character special | 1 | sample!@#$%^^& |
|
| Create new Category with character special | 1 | sample!@#$%^^& |
|
||||||
| 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
|
||||||
@@ -88,11 +89,30 @@ Scenario Outline: Update the Category created in this script
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| test_description | cat_uid_number | cat_name |
|
| test_description | cat_uid_number | cat_name |
|
||||||
| Update Category | 1 | UPDATE sample!@#$%^^& |
|
| Update Category | 1 | UPDATE sample!@#$%^^& |
|
||||||
| 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
|
||||||
|
|||||||
Reference in New Issue
Block a user