Were added some changes in order to do refactor related to input data.
This commit is contained in:
@@ -1,31 +1,24 @@
|
|||||||
@ProcessMakerMichelangelo @RestAPI
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
Feature: Calendar
|
Feature: Calendar
|
||||||
Requirements:
|
Requirements:
|
||||||
a workspace with two calendar in this workspace "Default Calendar and Test Process"
|
a workspace with one calendar in this workspace "Default Calendar"
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given that I have a valid access_token
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
|
||||||
|
# GET /api/1.0/{workspace}/calendars
|
||||||
|
# Get Calendar list
|
||||||
Scenario: List of calendar
|
Scenario: List of calendar
|
||||||
Given I request "calendars"
|
Given I request "calendars"
|
||||||
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 2 records
|
And the response has 1 records
|
||||||
|
|
||||||
|
|
||||||
Scenario: Get a single calendar
|
|
||||||
Given I request "calendar/14606161052f50839307899033145440"
|
|
||||||
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 "14606161052f50839307899033145440"
|
|
||||||
And the "cal_name" property equals "Test Process"
|
|
||||||
And the "cal_description" property equals "Calendar para el feature Process"
|
|
||||||
|
|
||||||
|
|
||||||
|
# POST /api/1.0/{workspace}/calendar
|
||||||
|
# Create a new Calendar
|
||||||
Scenario Outline: Create a new Calendars
|
Scenario Outline: Create a new Calendars
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
@@ -38,8 +31,8 @@ Scenario Outline: Create a new Calendars
|
|||||||
{"day": 7, "hour_start": "09:00", "hour_end": "17:00"}
|
{"day": 7, "hour_start": "09:00", "hour_end": "17:00"}
|
||||||
],
|
],
|
||||||
"cal_holiday": [
|
"cal_holiday": [
|
||||||
{"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"},
|
{"name": "holiday1", "date_start": "2015-01-01", "date_end": "2015-01-10"},
|
||||||
{"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"}
|
{"name": "holiday2", "date_start": "2015-04-01", "date_end": "2015-04-04"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
@@ -51,12 +44,13 @@ Scenario Outline: Create a new Calendars
|
|||||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
| cal_uid_number | cal_name | cal_description |
|
||||||
| test_description | cal_uid_number | cal_name | cal_description |
|
| 1 | Calendar 1 | Prueba de Creacion de Calendario 1 |
|
||||||
| Create calendar 1 | 1 | Calendar 1 | Prueba de Creacion de Calendario 1 |
|
| 2 | Calendar 2 | Prueba de Creacion de Calendario 2 |
|
||||||
| Create calendar 2 | 2 | Calendar 2 | Prueba de Creacion de Calendario 2 |
|
|
||||||
|
|
||||||
|
|
||||||
|
# PUT /api/1.0/{workspace}/calendar
|
||||||
|
# Update a Calendar
|
||||||
Scenario Outline: Update the calendars and then check if the values had changed
|
Scenario Outline: Update the calendars and then check if the values had changed
|
||||||
Given PUT this data:
|
Given PUT this data:
|
||||||
"""
|
"""
|
||||||
@@ -74,7 +68,6 @@ Scenario Outline: Update the calendars and then check if the values had changed
|
|||||||
{"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"}
|
{"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
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 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"
|
And I request "calendar"
|
||||||
@@ -83,12 +76,13 @@ Scenario Outline: Update the calendars and then check if the values had changed
|
|||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
| cal_uid_number | cal_name | cal_description | cal_status |
|
||||||
| test_description | cal_uid_number | cal_name | cal_description | cal_status |
|
| 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE |
|
||||||
| Update calendar 1 | 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE |
|
| 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 |
|
|
||||||
|
|
||||||
|
|
||||||
|
# GET /api/1.0/{workspace}/calendar
|
||||||
|
# Get an specific Calendar
|
||||||
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"
|
||||||
@@ -101,21 +95,30 @@ Scenario Outline: Get a single calendar
|
|||||||
And the "cal_status" property equals "<cal_status>"
|
And the "cal_status" property equals "<cal_status>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| cal_uid_number | cal_name | cal_description | cal_status |
|
| cal_uid_number | cal_name | cal_description | cal_status |
|
||||||
| 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE |
|
| 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE |
|
||||||
| 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE |
|
| 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Delete all Calendars created previously in this script
|
# DELETE /api/1.0/{workspace}/calendar
|
||||||
|
# Delete an specific calendar
|
||||||
|
Scenario Outline: Delete all Calendars created previously in this script (one by one )
|
||||||
Given that I want to delete a resource with the key "cal_uid" stored in session array as variable "cal_uid_<cal_uid_number>"
|
Given that I want to delete 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"
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| cal_uid_number |
|
| cal_uid_number |
|
||||||
| 1 |
|
| 1 |
|
||||||
| 2 |
|
| 2 |
|
||||||
|
|
||||||
|
|
||||||
|
# GET /api/1.0/{workspace}/calendars
|
||||||
|
# Get Calendar list
|
||||||
|
Scenario: List of calendar
|
||||||
|
Given I request "calendars"
|
||||||
|
Then the response status code should be 200
|
||||||
|
And the response charset is "UTF-8"
|
||||||
|
And the type is "array"
|
||||||
|
And the response has 1 records
|
||||||
@@ -1,30 +1,24 @@
|
|||||||
@ProcessMakerMichelangelo @RestAPI
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
Feature: Calendar Main Tests
|
Feature: Calendar Main Tests
|
||||||
Requirements:
|
Requirements:
|
||||||
a workspace with two calendar in this workspace "Default Calendar and Test Process"
|
a workspace with one calendar in this workspace "Default Calendar"
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given that I have a valid access_token
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
|
||||||
|
# GET /api/1.0/{workspace}/calendars
|
||||||
|
# Get Calendar list
|
||||||
Scenario: List of calendar
|
Scenario: List of calendar
|
||||||
Given I request "calendars"
|
Given I request "calendars"
|
||||||
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 2 records
|
And the response has 1 records
|
||||||
|
|
||||||
|
|
||||||
Scenario: Get a single calendar "Test Process"
|
# GET /api/1.0/{workspace}/calendar/<cal_uid>
|
||||||
Given I request "calendar/14606161052f50839307899033145440"
|
# Get an specific Calendar
|
||||||
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 "14606161052f50839307899033145440"
|
|
||||||
And the "cal_name" property equals "Test Process"
|
|
||||||
And the "cal_description" property equals "Calendar para el feature Process"
|
|
||||||
|
|
||||||
Scenario: Get a single calendar "Default Calendar"
|
Scenario: Get a single calendar "Default Calendar"
|
||||||
Given I request "calendar/00000000000000000000000000000001"
|
Given I request "calendar/00000000000000000000000000000001"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
@@ -36,7 +30,9 @@ Scenario: Get a single calendar "Default Calendar"
|
|||||||
And the "cal_description" property equals "Default Calendar"
|
And the "cal_description" property equals "Default Calendar"
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Create a new Calendars
|
# POST /api/1.0/{workspace}/calendar
|
||||||
|
# Create a new Calendar
|
||||||
|
Scenario Outline: Create new Calendars (one by one)
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -61,7 +57,6 @@ Scenario Outline: Create a new Calendars
|
|||||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||||
|
|
||||||
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 with short name | 2 | C | Prueba de Creacion de Calendario 2 |
|
| Create calendar with short name | 2 | C | Prueba de Creacion de Calendario 2 |
|
||||||
@@ -69,6 +64,8 @@ Scenario Outline: Create a new Calendars
|
|||||||
| 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 |
|
||||||
|
|
||||||
|
|
||||||
|
# POST /api/1.0/{workspace}/calendar
|
||||||
|
# Create a new Calendar
|
||||||
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:
|
||||||
"""
|
"""
|
||||||
@@ -94,11 +91,12 @@ Scenario Outline: Create a new Calendar with parameter cal_work_days diferent
|
|||||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| cal_uid_number |
|
| cal_uid_number |
|
||||||
| 5 |
|
| 5 |
|
||||||
|
|
||||||
|
|
||||||
|
# POST /api/1.0/{workspace}/calendar
|
||||||
|
# Create a new Calendar
|
||||||
Scenario Outline: Create a new Calendar with parameter cal_work_hour diferent
|
Scenario Outline: Create a new Calendar with parameter cal_work_hour diferent
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
@@ -124,11 +122,12 @@ Scenario Outline: Create a new Calendar with parameter cal_work_hour diferent
|
|||||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| cal_uid_number |
|
| cal_uid_number |
|
||||||
| 6 |
|
| 6 |
|
||||||
|
|
||||||
|
|
||||||
|
# POST /api/1.0/{workspace}/calendar
|
||||||
|
# Create a new Calendar
|
||||||
Scenario Outline: Create a new Calendar with parameter cal_holiday diferent
|
Scenario Outline: Create a new Calendar with parameter cal_holiday diferent
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
@@ -154,11 +153,12 @@ Scenario Outline: Create a new Calendar with parameter cal_holiday diferent
|
|||||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| cal_uid_number |
|
| cal_uid_number |
|
||||||
| 7 |
|
| 7 |
|
||||||
|
|
||||||
|
|
||||||
|
# POST /api/1.0/{workspace}/calendar
|
||||||
|
# Create a new Calendar
|
||||||
Scenario: Create a new Calendar with same name
|
Scenario: Create a new Calendar with same name
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
@@ -181,7 +181,8 @@ Scenario: Create a new Calendar with same name
|
|||||||
And the response status message should have the following text "already exists"
|
And the response status message should have the following text "already exists"
|
||||||
|
|
||||||
|
|
||||||
|
# PUT /api/1.0/{workspace}/calendar
|
||||||
|
# Update a Calendar
|
||||||
Scenario Outline: Update the calendars and then check if the values had changed
|
Scenario Outline: Update the calendars and then check if the values had changed
|
||||||
Given PUT this data:
|
Given PUT this data:
|
||||||
"""
|
"""
|
||||||
@@ -199,7 +200,6 @@ Scenario Outline: Update the calendars and then check if the values had changed
|
|||||||
{"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"}
|
{"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
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 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"
|
And I request "calendar"
|
||||||
@@ -208,41 +208,13 @@ Scenario Outline: Update the calendars and then check if the values had changed
|
|||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| test_description | cal_uid_number | cal_name | cal_description | cal_status |
|
| test_description | cal_uid_number | cal_name | cal_description | cal_status |
|
||||||
| Update calendar 1 | 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE |
|
| Update calendar 1 | 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE |
|
||||||
| 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
|
# GET /api/1.0/{workspace}/calendar
|
||||||
Given PUT this data:
|
# Get an specific Calendar
|
||||||
"""
|
|
||||||
{
|
|
||||||
"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"
|
||||||
@@ -255,21 +227,30 @@ Scenario Outline: Get a single calendar
|
|||||||
And the "cal_status" property equals "<cal_status>"
|
And the "cal_status" property equals "<cal_status>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| cal_uid_number | cal_name | cal_description | cal_status |
|
| cal_uid_number | cal_name | cal_description | cal_status |
|
||||||
| 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE |
|
| 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE |
|
||||||
| 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE |
|
| 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE |
|
||||||
|
|
||||||
|
|
||||||
|
# GET /api/1.0/{workspace}/calendars
|
||||||
|
# Get Calendar list
|
||||||
|
Scenario: List of calendar
|
||||||
|
Given I request "calendars"
|
||||||
|
Then the response status code should be 200
|
||||||
|
And the response charset is "UTF-8"
|
||||||
|
And the type is "array"
|
||||||
|
And the response has 8 records
|
||||||
|
|
||||||
|
|
||||||
|
# DELETE /api/1.0/{workspace}/calendar
|
||||||
|
# Delete an specific calendar
|
||||||
Scenario Outline: Delete all Calendars created previously in this script
|
Scenario Outline: Delete all Calendars created previously in this script
|
||||||
Given that I want to delete a resource with the key "cal_uid" stored in session array as variable "cal_uid_<cal_uid_number>"
|
Given that I want to delete 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"
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| cal_uid_number |
|
| cal_uid_number |
|
||||||
| 1 |
|
| 1 |
|
||||||
| 2 |
|
| 2 |
|
||||||
@@ -278,3 +259,13 @@ Scenario Outline: Delete all Calendars created previously in this script
|
|||||||
| 5 |
|
| 5 |
|
||||||
| 6 |
|
| 6 |
|
||||||
| 7 |
|
| 7 |
|
||||||
|
|
||||||
|
|
||||||
|
# GET /api/1.0/{workspace}/calendars
|
||||||
|
# Get Calendar list
|
||||||
|
Scenario: List of calendar
|
||||||
|
Given I request "calendars"
|
||||||
|
Then the response status code should be 200
|
||||||
|
And the response charset is "UTF-8"
|
||||||
|
And the type is "array"
|
||||||
|
And the response has 1 records
|
||||||
Reference in New Issue
Block a user