Merged in veronicaaruquipa/processmaker/fixing-broken-features (pull request #1317)
The oauth2 tests troubles were solved putting the right token generated and put the correct input data.
This commit is contained in:
@@ -1,32 +1,25 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Calendar
|
||||
Requirements:
|
||||
a workspace with two calendar in this workspace "Default Calendar and Test Process"
|
||||
Requirements:
|
||||
a workspace with one calendar in this workspace "Default Calendar"
|
||||
|
||||
Background:
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: List of calendar
|
||||
# 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 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"
|
||||
|
||||
|
||||
Scenario Outline: Create a new Calendars
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario Outline: Create a new Calendars
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -38,8 +31,8 @@ Scenario Outline: Create a new Calendars
|
||||
{"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"}
|
||||
{"name": "holiday1", "date_start": "2015-01-01", "date_end": "2015-01-10"},
|
||||
{"name": "holiday2", "date_start": "2015-04-01", "date_end": "2015-04-04"}
|
||||
]
|
||||
}
|
||||
"""
|
||||
@@ -50,14 +43,15 @@ Scenario Outline: Create a new Calendars
|
||||
And the type is "object"
|
||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | cal_uid_number | cal_name | cal_description |
|
||||
| Create calendar 1 | 1 | Calendar 1 | Prueba de Creacion de Calendario 1 |
|
||||
| Create calendar 2 | 2 | Calendar 2 | Prueba de Creacion de Calendario 2 |
|
||||
Examples:
|
||||
| cal_uid_number | cal_name | cal_description |
|
||||
| 1 | Calendar 1 | Prueba de Creacion de Calendario 1 |
|
||||
| 2 | Calendar 2 | Prueba de Creacion de Calendario 2 |
|
||||
|
||||
|
||||
Scenario Outline: Update the calendars and then check if the values had changed
|
||||
# PUT /api/1.0/{workspace}/calendar
|
||||
# Update a Calendar
|
||||
Scenario Outline: Update the calendars and then check if the values had changed
|
||||
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"}
|
||||
]
|
||||
}
|
||||
|
||||
"""
|
||||
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"
|
||||
@@ -82,14 +75,15 @@ Scenario Outline: Update the calendars and then check if the values had changed
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
|
||||
| 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 2 | 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE |
|
||||
Examples:
|
||||
| cal_uid_number | cal_name | cal_description | cal_status |
|
||||
| 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE |
|
||||
| 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE |
|
||||
|
||||
|
||||
Scenario Outline: Get a single calendar
|
||||
# GET /api/1.0/{workspace}/calendar
|
||||
# Get an specific 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>"
|
||||
And I request "calendar"
|
||||
Then the response status code should be 200
|
||||
@@ -97,25 +91,34 @@ Scenario Outline: Get a single calendar
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And the "cal_name" property equals "<cal_name>"
|
||||
And the "cal_description" property equals "<cal_description>"
|
||||
And the "cal_status" property equals "<cal_status>"
|
||||
And the "cal_description" property equals "<cal_description>"
|
||||
And the "cal_status" property equals "<cal_status>"
|
||||
|
||||
Examples:
|
||||
|
||||
| cal_uid_number | cal_name | cal_description | cal_status |
|
||||
Examples:
|
||||
| cal_uid_number | cal_name | cal_description | cal_status |
|
||||
| 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>"
|
||||
And I request "calendar"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| cal_uid_number |
|
||||
| 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,31 +1,25 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Calendar Main Tests
|
||||
Requirements:
|
||||
a workspace with two calendar in this workspace "Default Calendar and Test Process"
|
||||
Requirements:
|
||||
a workspace with one calendar in this workspace "Default Calendar"
|
||||
|
||||
Background:
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: List of calendar
|
||||
# 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 2 records
|
||||
And the response has 1 records
|
||||
|
||||
|
||||
Scenario: Get a single calendar "Test Process"
|
||||
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"
|
||||
|
||||
Scenario: Get a single calendar "Default Calendar"
|
||||
# GET /api/1.0/{workspace}/calendar/<cal_uid>
|
||||
# Get an specific Calendar
|
||||
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"
|
||||
@@ -36,7 +30,9 @@ Scenario: Get a single calendar "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:
|
||||
"""
|
||||
{
|
||||
@@ -60,16 +56,17 @@ Scenario Outline: Create a new Calendars
|
||||
And the type is "object"
|
||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | cal_uid_number | cal_name | cal_description |
|
||||
| Create calendar 1 | 1 | Calendar 1 | Prueba de Creacion de Calendario 1 |
|
||||
Examples:
|
||||
| test_description | cal_uid_number | cal_name | cal_description |
|
||||
| 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 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 |
|
||||
|
||||
|
||||
Scenario Outline: Create a new Calendar with parameter cal_work_days diferent
|
||||
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario Outline: Create a new Calendar with parameter cal_work_days diferent
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -93,13 +90,14 @@ Scenario Outline: Create a new Calendar with parameter cal_work_days diferent
|
||||
And the type is "object"
|
||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| cal_uid_number |
|
||||
Examples:
|
||||
| cal_uid_number |
|
||||
| 5 |
|
||||
|
||||
|
||||
Scenario Outline: Create a new Calendar with parameter cal_work_hour diferent
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario Outline: Create a new Calendar with parameter cal_work_hour diferent
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -123,13 +121,14 @@ Scenario Outline: Create a new Calendar with parameter cal_work_hour diferent
|
||||
And the type is "object"
|
||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| cal_uid_number |
|
||||
Examples:
|
||||
| cal_uid_number |
|
||||
| 6 |
|
||||
|
||||
|
||||
Scenario Outline: Create a new Calendar with parameter cal_holiday diferent
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario Outline: Create a new Calendar with parameter cal_holiday diferent
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -153,13 +152,14 @@ Scenario Outline: Create a new Calendar with parameter cal_holiday diferent
|
||||
And the type is "object"
|
||||
And store "cal_uid" in session array as variable "cal_uid_<cal_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| cal_uid_number |
|
||||
Examples:
|
||||
| cal_uid_number |
|
||||
| 7 |
|
||||
|
||||
|
||||
Scenario: Create a new Calendar with same name
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario: Create a new Calendar with same name
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -181,8 +181,9 @@ Scenario: Create a new Calendar with same name
|
||||
And the response status message should have the following text "already exists"
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Update the calendars and then check if the values had changed
|
||||
# PUT /api/1.0/{workspace}/calendar
|
||||
# Update a Calendar
|
||||
Scenario Outline: Update the calendars and then check if the values had changed
|
||||
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"}
|
||||
]
|
||||
}
|
||||
|
||||
"""
|
||||
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"
|
||||
@@ -207,43 +207,15 @@ Scenario Outline: Update the calendars and then check if the values had changed
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | cal_uid_number | cal_name | cal_description | cal_status |
|
||||
Examples:
|
||||
| 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 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
|
||||
# GET /api/1.0/{workspace}/calendar
|
||||
# Get an specific 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>"
|
||||
And I request "calendar"
|
||||
Then the response status code should be 200
|
||||
@@ -251,25 +223,34 @@ Scenario Outline: Get a single calendar
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And the "cal_name" property equals "<cal_name>"
|
||||
And the "cal_description" property equals "<cal_description>"
|
||||
And the "cal_status" property equals "<cal_status>"
|
||||
And the "cal_description" property equals "<cal_description>"
|
||||
And the "cal_status" property equals "<cal_status>"
|
||||
|
||||
Examples:
|
||||
|
||||
| cal_uid_number | cal_name | cal_description | cal_status |
|
||||
Examples:
|
||||
| cal_uid_number | cal_name | cal_description | cal_status |
|
||||
| 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
|
||||
# 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
|
||||
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 the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| cal_uid_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
@@ -277,4 +258,14 @@ Scenario Outline: Delete all Calendars created previously in this script
|
||||
| 4 |
|
||||
| 5 |
|
||||
| 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
|
||||
@@ -1,12 +1,13 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Calendar Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario Outline: Create a new Calendars (Negative Tests)
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario Outline: Create new Calendars (Without cal_name)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -27,13 +28,14 @@ Scenario Outline: Create a new Calendars (Negative Tests)
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
| cal_name | cal_description | error_code | error_message |
|
||||
| | Prueba de Creacion de Calendario 1 | 400 | cal_name |
|
||||
|
||||
| test_description | cal_name | cal_description | error_code | error_message |
|
||||
| Create whitout cal_name | | Prueba de Creacion de Calendario 1 | 400 | cal_name |
|
||||
|
||||
|
||||
Scenario: Create a new Calendars (Wrong cal_work_days)
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario: Create a new Calendars (Wrong cal_work_days)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -55,7 +57,9 @@ Scenario: Create a new Calendars (Wrong cal_work_days)
|
||||
And the response status message should have the following text "cal_work_days"
|
||||
|
||||
|
||||
Scenario: Create a new Calendars (cal_work_hour . day)
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario: Create new Calendars (cal_work_hour . day)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -77,7 +81,9 @@ Scenario: Create a new Calendars (cal_work_hour . day)
|
||||
And the response status message should have the following text "day"
|
||||
|
||||
|
||||
Scenario: Create a new Calendars (without cal_work_days)
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario: Create a new Calendars (Without cal_work_days)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -99,7 +105,9 @@ Scenario: Create a new Calendars (without cal_work_days)
|
||||
And the response status message should have the following text "cal_work_days"
|
||||
|
||||
|
||||
Scenario: Create a new Calendars (wrong date_start )
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario: Create a new Calendars (Wrong date_start )
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -120,8 +128,9 @@ Scenario: Create a new Calendars (wrong date_start )
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "date_start"
|
||||
|
||||
|
||||
Scenario: Create a new Calendars (wrong date_end)
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario: Create new Calendars (wrong date_end)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -143,7 +152,9 @@ Scenario: Create a new Calendars (wrong 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)
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
# Create a new Calendar
|
||||
Scenario: Create new Calendars (With work days less than 3)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -165,9 +176,10 @@ Scenario: Create a new Calendars (with work days less than 3)
|
||||
And the response status message should have the following text "least 3 Working Days"
|
||||
|
||||
|
||||
|
||||
Scenario: Delete Calendar when it is assigned to a project "Test Process"
|
||||
# DELETE /api/1.0/{workspace}/calendar
|
||||
# Delete an specific calendar
|
||||
Scenario: Delete a Calendar that does not exists
|
||||
Given that I want to delete a "Calendar"
|
||||
And I request "calendar/14606161052f50839307899033145440"
|
||||
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 "does not exist"
|
||||
@@ -1,31 +1,27 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Process Category
|
||||
Requirements:
|
||||
a workspace with the workspace with one process category
|
||||
a workspace with the workspace with one process category
|
||||
|
||||
|
||||
Background:
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: Get list of Categories
|
||||
# GET /api/1.0/{workspace}/project/categories
|
||||
# Get Category list
|
||||
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
|
||||
And the response has 0 records
|
||||
|
||||
|
||||
Scenario: Get a Category specific
|
||||
Given I request "project/category/4177095085330818c324501061677193"
|
||||
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"
|
||||
|
||||
|
||||
Scenario: Create a new Categories
|
||||
# POST /api/1.0/{workspace}/project/category
|
||||
# Create a new Category
|
||||
Scenario: Create a new Category
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -40,33 +36,61 @@ Scenario: Create a new Categories
|
||||
And store "cat_uid" in session array as variable "cat_uid"
|
||||
|
||||
|
||||
Scenario: Get list of Categories
|
||||
# GET /api/1.0/{workspace}/project/categories
|
||||
# Get Category list
|
||||
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 2 records
|
||||
And the response has 1 records
|
||||
|
||||
|
||||
Scenario: Update the Category created in this script
|
||||
# PUT /api/1.0/{workspace}/project/categories
|
||||
# Update an specific Category
|
||||
Scenario: Update the Category created in this script
|
||||
Given PUT this data:
|
||||
"""
|
||||
"""
|
||||
{
|
||||
"cat_name": "Name Updated"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "cat_uid" stored in session array
|
||||
And I request "project/category"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And that I want to update a resource with the key "cat_uid" stored in session array
|
||||
And I request "project/category"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Scenario: Delete the Category created previously in this script
|
||||
# GET /api/1.0/{workspace}/project/category/<category-id>
|
||||
# Get an specific Category
|
||||
Scenario: Get an specific Category
|
||||
Given that I want to get a resource with the key "cat_uid" stored in session array
|
||||
And I request "project/category"
|
||||
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"
|
||||
|
||||
|
||||
# DELETE /api/1.0/{workspace}/project/category
|
||||
# Delete an specific Category
|
||||
Scenario: Delete the Category created previously in this script
|
||||
Given that I want to delete a resource with the key "cat_uid" stored in session array
|
||||
And I request "project/category"
|
||||
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 "object"
|
||||
And I request "project/category"
|
||||
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 "object"
|
||||
|
||||
|
||||
# GET /api/1.0/{workspace}/project/categories
|
||||
# Get Category list
|
||||
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 0 records
|
||||
@@ -1,34 +1,27 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Process Category Main Test
|
||||
Requirements:
|
||||
a workspace with the workspace with one process category
|
||||
a workspace with the workspace with one process category
|
||||
|
||||
|
||||
Background:
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: Get list of Categories
|
||||
# GET /api/1.0/{workspace}/project/categories
|
||||
# Get Category list
|
||||
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
|
||||
|
||||
And the response has 0 records
|
||||
|
||||
Scenario: Get a Category specific
|
||||
Given I request "project/category/4177095085330818c324501061677193"
|
||||
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 "cat_uid" property equals "4177095085330818c324501061677193"
|
||||
And the "cat_name" property equals "Category Cases Lists"
|
||||
And the "cat_total_processes" property equals 6
|
||||
|
||||
|
||||
Scenario Outline: Create a new Categories
|
||||
# POST /api/1.0/{workspace}/project/category
|
||||
# Create a new Category
|
||||
Scenario Outline: Create new Categories
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -42,18 +35,20 @@ Scenario Outline: Create a new Categories
|
||||
And the type is "object"
|
||||
And store "cat_uid" in session array as variable "cat_uid_<cat_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| 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 special | 3 | @$@$#@% |
|
||||
| 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 |
|
||||
| Create new Category with long name | 7 | Right Category |
|
||||
|
||||
|
||||
Scenario: Get list of Categories
|
||||
# GET /api/1.0/{workspace}/project/categories
|
||||
# Get Category list
|
||||
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"
|
||||
@@ -62,39 +57,43 @@ Scenario: Get list of Categories
|
||||
And the response has 7 records
|
||||
|
||||
|
||||
Scenario: Create Category with same name
|
||||
Given POST this data:
|
||||
"""
|
||||
# POST /api/1.0/{workspace}/project/category
|
||||
# Create a new Category
|
||||
Scenario: Create Category with same name twice
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"cat_name": "sample"
|
||||
}
|
||||
"""
|
||||
And I request "project/category"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "exist"
|
||||
And I request "project/category"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "exist"
|
||||
|
||||
|
||||
Scenario Outline: Update the Category created in this script
|
||||
# PUT /api/1.0/{workspace}/project/categories
|
||||
# Update an specific Category
|
||||
Scenario Outline: Update the Categories created in this script
|
||||
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>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
And I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_<cat_uid_number>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
| test_description | cat_uid_number | cat_name |
|
||||
| Update Category | 1 | UPDATE sample!@#$%^^& |
|
||||
| Update Category | 1 | UPDATE sample!@#$%^^& |
|
||||
| Update Category | 2 | UPDATE 32425325 |
|
||||
|
||||
|
||||
Scenario Outline: Update the Category putting the same name
|
||||
# PUT /api/1.0/{workspace}/project/categories
|
||||
# Update an specific Category
|
||||
Scenario Outline: Update the Category putting the same name
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
@@ -104,64 +103,57 @@ Scenario Outline: Update the Category putting the same 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 "exist"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | cat_uid_number | cat_name |
|
||||
| Update Category | 5 | sample |
|
||||
|
||||
| Update Category | 5 | sample |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Get a Category specific
|
||||
# GET /api/1.0/{workspace}/project/categories
|
||||
# Get an specific Category
|
||||
Scenario Outline: Get an specific Category
|
||||
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
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the "cat_name" property equals "<cat_name>"
|
||||
And the "cat_total_processes" property equals <cat_total_processes>
|
||||
And the "cat_total_processes" property equals "<cat_total_processes>"
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
|
||||
| cat_uid_number | cat_name | cat_total_processes |
|
||||
| 1 | UPDATE sample!@#$%^^& | 0 |
|
||||
| 1 | UPDATE sample!@#$%^^& | 0 |
|
||||
| 2 | UPDATE 32425325 | 0 |
|
||||
|
||||
|
||||
Scenario Outline: Delete the Category created previously in this script
|
||||
# DELETE /api/1.0/{workspace}/project/category
|
||||
# Delete an specific Category
|
||||
Scenario Outline: Delete the Category created previously in this script
|
||||
Given that I want to delete a resource with the key "cat_uid" stored in session array as variable "cat_uid_<cat_uid_number>"
|
||||
And I request "project/category"
|
||||
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 "object"
|
||||
And I request "project/category"
|
||||
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 "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| cat_uid_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
| 3 |
|
||||
| 4 |
|
||||
| 5 |
|
||||
| 6 |
|
||||
Examples:
|
||||
| cat_uid_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
| 3 |
|
||||
| 4 |
|
||||
| 5 |
|
||||
| 6 |
|
||||
| 7 |
|
||||
|
||||
|
||||
Scenario: Get list of Categories
|
||||
# GET /api/1.0/{workspace}/project/categories
|
||||
# Get Category list
|
||||
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
|
||||
Given I request "project/category/4177095085330818c324501061677193"
|
||||
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 "cat_uid" property equals "4177095085330818c324501061677193"
|
||||
And the "cat_name" property equals "Category Cases Lists"
|
||||
And the "cat_total_processes" property equals 6
|
||||
And the response has 0 records
|
||||
@@ -2,11 +2,13 @@
|
||||
Feature: Process Category Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario Outline: Create a new Categories (Negative Test)
|
||||
# POST /api/1.0/{workspace}/project/category
|
||||
# Create a new Category
|
||||
Scenario Outline: Create a new Category (Negative Test)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -17,15 +19,15 @@ Scenario Outline: Create a new Categories (Negative Test)
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | cat_name | error_code | error_message |
|
||||
| without name | | 400 | cat_name |
|
||||
| without name | | 400 | cat_name |
|
||||
|
||||
|
||||
|
||||
Scenario: Delete the Category when it is assigned to a project "Category Cases Lists"
|
||||
# DELETE /api/1.0/{workspace}/project/category
|
||||
# Delete an specific Category
|
||||
Scenario: Delete the Category when it is assigned to a project "Category Cases Lists"
|
||||
Given that I want to delete a "Category"
|
||||
And I request "project/category/4177095085330818c324501061677193"
|
||||
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 "does not exist"
|
||||
@@ -1,10 +1,12 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Authorization Code
|
||||
Requirements:
|
||||
a workspace with open session and installed application
|
||||
Requirements:
|
||||
a workspace with open session and installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
# OAUTH /en/neoclassic/oauth2
|
||||
# In order to generate a new token create a new CLIENT_ID and CLIENT_SECRET
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET in order to generate a new token
|
||||
Given OAUTH register an application
|
||||
"""
|
||||
{
|
||||
@@ -15,15 +17,16 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
"applicationNumber":"<application_number>"
|
||||
}
|
||||
"""
|
||||
Examples:
|
||||
Examples:
|
||||
|
||||
| Description | application_number | application_name | application_description | application_website | application_redirectUri |
|
||||
| Create token normal | 1 | Demo3 | Demo3 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant |
|
||||
| Create token normal | 2 | Demo4 | Demo4 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant |
|
||||
|
||||
| Create token normal | 1 | Behat1 | Behat1 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant |
|
||||
| Create token normal | 2 | Behat2 | Behat2 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant |
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar el correcto funcionamiento del token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 200
|
||||
@@ -32,27 +35,28 @@ Scenario Outline: Get the Output Documents List both process
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
And the "out_doc_title" property in row 0 equals "<out_doc_title>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process (without valid token)
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar el correcto funcionamiento del token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process (without valid token)
|
||||
Given I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | records | out_doc_title | application_number |
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 |
|
||||
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
# POST /en/neoclassic/oauth2/access_token/expire
|
||||
# Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -60,30 +64,30 @@ Scenario Outline: Expire token created in this script
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Grant type Refresh Token
|
||||
Scenario Outline: Refresh token
|
||||
# POST /en/neoclassic/oauth2/refresh_token_<grant_number>
|
||||
# Grant type Refresh Token
|
||||
Scenario Outline: Refresh token
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -99,16 +103,16 @@ Scenario Outline: Refresh token
|
||||
And store "expires_in" in session array as variable "expires_in_<refresh_token_number>"
|
||||
And store "token_type" in session array as variable "token_type_<refresh_token_number>"
|
||||
And store "scope" in session array as variable "scope_<refresh_token_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| Description | grant_number | refresh_token_number |
|
||||
| Create token normal | 1 | 3 |
|
||||
| Create token normal | 2 | 4 |
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del Refresh Token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar el correcto funcionamiento del Refresh Token generado en este script
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 200
|
||||
@@ -117,17 +121,16 @@ Scenario Outline: Get the Output Documents List both process
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
And the "out_doc_title" property in row 0 equals "<out_doc_title>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 3 |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 4 |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
# DELETE /en/neoclassic/oauth2
|
||||
# Endpoint para borrar el token creado en este script
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
@@ -135,24 +138,23 @@ Scenario Outline: Delete all tokens created previously in this script
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
| 3 |
|
||||
| 4 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
# GET /api/1.0/{workspace}/project/<project>/output-documents
|
||||
# Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
@@ -1,10 +1,10 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Client Credentials Grant
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -19,28 +19,27 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
And store "access_token" in session array as variable "access_token_<grant_number>"
|
||||
And store "expires_in" in session array as variable "expires_in_<grant_number>"
|
||||
And store "token_type" in session array as variable "token_type_<grant_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| Description | grant_number | grant_type |
|
||||
| Create token normal | 1 | client_credentials |
|
||||
| Create token normal | 2 | client_credentials |
|
||||
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 400
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
| Description | grant_number |
|
||||
| Create token normal | 1 |
|
||||
| Create token normal | 2 |
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -48,13 +47,13 @@ Scenario Outline: Expire token created in this script
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -62,38 +61,38 @@ Scenario Outline: Expire token created in this script
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
@@ -101,31 +100,31 @@ Scenario Outline: Delete all tokens created previously in this script
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Implicit Grant
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Scenario Outline: Create a new implicit token through CLIENT_ID and CLIENT_SECRET
|
||||
Given OAUTH request implicit grant
|
||||
"""
|
||||
{
|
||||
@@ -14,14 +14,14 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
"implicit_grant_number":"<implicit_grant_number>"
|
||||
}
|
||||
"""
|
||||
Examples:
|
||||
Examples:
|
||||
| Description | implicit_grant_number | response_type | client_id | scope |
|
||||
| Create token normal | 1 | token | x-pm-local-client | * |
|
||||
| Create token normal | 2 | token | x-pm-local-client | * |
|
||||
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<implicit_grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 200
|
||||
@@ -29,13 +29,13 @@ Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
And the type is "array"
|
||||
And the response has 14 records
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
| Description | implicit_grant_number |
|
||||
| Create token normal | 1 |
|
||||
| Create token normal | 2 |
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -43,13 +43,13 @@ Scenario Outline: Expire token created in this script
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -57,38 +57,38 @@ Scenario Outline: Expire token created in this script
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
@@ -96,31 +96,31 @@ Scenario Outline: Delete all tokens created previously in this script
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Resources Owner Password Credential Grant
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -26,14 +26,14 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
And store "refresh_token" in session array as variable "refresh_token_<grant_number>"
|
||||
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
| Description | grant_number | grant_type | username | password | scope |
|
||||
| Create token normal | 1 | password | amy | sample | * |
|
||||
| Create token normal | 2 | password | admin | sample123* | * |
|
||||
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 200
|
||||
@@ -41,14 +41,14 @@ Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
| Description | grant_number | records |
|
||||
| Create token normal | 1 | 4 |
|
||||
| Create token normal | 2 | 14 |
|
||||
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -56,13 +56,13 @@ Scenario Outline: Expire token created in this script
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -70,38 +70,38 @@ Scenario Outline: Expire token created in this script
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
@@ -109,31 +109,31 @@ Scenario Outline: Delete all tokens created previously in this script
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Feature: DataBase Connections Main Tests Mysql
|
||||
|
||||
|
||||
# GET /api/1.0/{workspace}/project/<project-id>/database-connections
|
||||
# Get list DataBase| dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description | Connections
|
||||
# Get list DataBase
|
||||
Scenario Outline: Get the DataBase Connections List when there are exactly zero DataBase Connections
|
||||
Given I request "project/<project>/database-connections"
|
||||
Then the response status code should be 200
|
||||
|
||||
@@ -2162,13 +2162,11 @@ class RestContext extends BehatContext
|
||||
throw new Exception('Bad credentials');
|
||||
}
|
||||
|
||||
|
||||
//print "<textarea>$answer</textarea>";
|
||||
if (curl_error($ch)) {
|
||||
throw new Exception(curl_error($ch));
|
||||
}
|
||||
|
||||
|
||||
// Read the session saved in the cookie file
|
||||
|
||||
if(!file_exists($cookie_file)){
|
||||
@@ -2202,20 +2200,21 @@ class RestContext extends BehatContext
|
||||
}
|
||||
$parts = parse_url($newurl);
|
||||
|
||||
parse_str($parts['fragment'], $fragment);
|
||||
//print_r($fragment);
|
||||
// json_decode(json)
|
||||
$response=json_decode($answer);
|
||||
|
||||
if (file_exists("session.data")) {
|
||||
$sessionData = json_decode(file_get_contents("session.data"));
|
||||
} else {
|
||||
$sessionData = new StdClass();
|
||||
}
|
||||
|
||||
//print_r($fragment);
|
||||
// json_decode(json)
|
||||
//$response=json_decode($answer);
|
||||
parse_str($parts['fragment'], $fragment);
|
||||
foreach($fragment as $key => $varValue){
|
||||
$sessionVarName=$key."_".$implicit_grant_number;
|
||||
$sessionData->$sessionVarName = $varValue;
|
||||
}
|
||||
|
||||
//print_r($sessionData);
|
||||
file_put_contents("session.data", json_encode($sessionData));
|
||||
//print_r("\nRegister application:\n".$answer."\n$oauth_authorization_url?response_type=$response_type&client_id=$client_id&scope=$scope\n");
|
||||
|
||||
Reference in New Issue
Block a user