Merge branch 'master' of bitbucket.org:colosa/processmaker into PM-940
This commit is contained in:
3
Rakefile
3
Rakefile
@@ -230,8 +230,7 @@ def buildMafe(homeDir, targetDir, mode)
|
|||||||
"#{homeDir}/build/js/designer.js" => "#{mafeDir}/designer.min.js",
|
"#{homeDir}/build/js/designer.js" => "#{mafeDir}/designer.min.js",
|
||||||
"#{homeDir}/build/js/mafe.js" => "#{mafeDir}/mafe.min.js",
|
"#{homeDir}/build/js/mafe.js" => "#{mafeDir}/mafe.min.js",
|
||||||
"#{homeDir}/build/css/mafe.css" => "#{mafeDir}/mafe.min.css",
|
"#{homeDir}/build/css/mafe.css" => "#{mafeDir}/mafe.min.css",
|
||||||
"#{homeDir}/img/*.*" => "#{imgTargetDir}",
|
"#{homeDir}/img/*.*" => "#{imgTargetDir}"
|
||||||
"#{homeDir}/srcForm/img/*.*" => "#{imgTargetDir}"
|
|
||||||
})
|
})
|
||||||
|
|
||||||
puts "\nCopying lib files into: #{jsTargetDir}".bold
|
puts "\nCopying lib files into: #{jsTargetDir}".bold
|
||||||
|
|||||||
@@ -1,32 +1,25 @@
|
|||||||
@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
|
||||||
|
|
||||||
|
|
||||||
Scenario: List of calendar
|
# GET /api/1.0/{workspace}/calendars
|
||||||
|
# Get Calendar list
|
||||||
|
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
|
# POST /api/1.0/{workspace}/calendar
|
||||||
Given I request "calendar/14606161052f50839307899033145440"
|
# Create a new Calendar
|
||||||
Then the response status code should be 200
|
Scenario Outline: Create a new Calendars
|
||||||
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
|
|
||||||
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"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
@@ -50,14 +43,15 @@ Scenario Outline: Create a new Calendars
|
|||||||
And the type is "object"
|
And the type is "object"
|
||||||
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 |
|
|
||||||
|
|
||||||
|
|
||||||
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:
|
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"
|
||||||
@@ -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
|
Then the response status code should be 200
|
||||||
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 |
|
|
||||||
|
|
||||||
|
|
||||||
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>"
|
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"
|
||||||
Then the response status code should be 200
|
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 content type is "application/json"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
And the "cal_name" property equals "<cal_name>"
|
And the "cal_name" property equals "<cal_name>"
|
||||||
And the "cal_description" property equals "<cal_description>"
|
And the "cal_description" property equals "<cal_description>"
|
||||||
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,31 +1,25 @@
|
|||||||
@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
|
||||||
|
|
||||||
|
|
||||||
Scenario: List of calendar
|
# GET /api/1.0/{workspace}/calendars
|
||||||
|
# Get Calendar list
|
||||||
|
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
|
Scenario: Get a single calendar "Default Calendar"
|
||||||
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"
|
|
||||||
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
|
||||||
And the response charset is "UTF-8"
|
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"
|
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:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -60,16 +56,17 @@ Scenario Outline: Create a new Calendars
|
|||||||
And the type is "object"
|
And the type is "object"
|
||||||
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 |
|
||||||
| 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 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
|
|
||||||
|
# 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:
|
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 the type is "object"
|
||||||
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 |
|
||||||
|
|
||||||
|
|
||||||
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:
|
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 the type is "object"
|
||||||
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 |
|
||||||
|
|
||||||
|
|
||||||
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:
|
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 the type is "object"
|
||||||
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 |
|
||||||
|
|
||||||
|
|
||||||
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:
|
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"
|
And the response status message should have the following text "already exists"
|
||||||
|
|
||||||
|
|
||||||
|
# PUT /api/1.0/{workspace}/calendar
|
||||||
Scenario Outline: Update the calendars and then check if the values had changed
|
# Update a Calendar
|
||||||
|
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"
|
||||||
@@ -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
|
Then the response status code should be 200
|
||||||
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
|
||||||
"""
|
Scenario Outline: Get a single 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
|
|
||||||
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"
|
||||||
Then the response status code should be 200
|
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 content type is "application/json"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
And the "cal_name" property equals "<cal_name>"
|
And the "cal_name" property equals "<cal_name>"
|
||||||
And the "cal_description" property equals "<cal_description>"
|
And the "cal_description" property equals "<cal_description>"
|
||||||
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
|
# 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>"
|
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 |
|
||||||
@@ -277,4 +258,14 @@ Scenario Outline: Delete all Calendars created previously in this script
|
|||||||
| 4 |
|
| 4 |
|
||||||
| 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
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
@ProcessMakerMichelangelo @RestAPI
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
Feature: Calendar Negative Tests
|
Feature: Calendar Negative Tests
|
||||||
|
|
||||||
|
Background:
|
||||||
Background:
|
|
||||||
Given that I have a valid access_token
|
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:
|
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>
|
Then the response status code should be <error_code>
|
||||||
And the response status message should have the following text "<error_message>"
|
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:
|
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"
|
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:
|
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"
|
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:
|
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"
|
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:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -120,8 +128,9 @@ Scenario: Create a new Calendars (wrong date_start )
|
|||||||
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_start"
|
And the response status message should have the following text "date_start"
|
||||||
|
|
||||||
|
# POST /api/1.0/{workspace}/calendar
|
||||||
Scenario: Create a new Calendars (wrong date_end)
|
# Create a new Calendar
|
||||||
|
Scenario: Create new Calendars (wrong date_end)
|
||||||
Given POST this data:
|
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"
|
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:
|
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"
|
And the response status message should have the following text "least 3 Working Days"
|
||||||
|
|
||||||
|
|
||||||
|
# DELETE /api/1.0/{workspace}/calendar
|
||||||
Scenario: Delete Calendar when it is assigned to a project "Test Process"
|
# Delete an specific calendar
|
||||||
|
Scenario: Delete a Calendar that does not exists
|
||||||
Given that I want to delete a "Calendar"
|
Given that I want to delete a "Calendar"
|
||||||
And I request "calendar/14606161052f50839307899033145440"
|
And I request "calendar/14606161052f50839307899033145440"
|
||||||
Then the response status code should be 400
|
Then the response status code should be 400
|
||||||
And the response status message should have the following text "cannot be deleted"
|
And the response status message should have the following text "does not exist"
|
||||||
@@ -1,31 +1,27 @@
|
|||||||
@ProcessMakerMichelangelo @RestAPI
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
Feature: Process Category
|
Feature: Process Category
|
||||||
Requirements:
|
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
|
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"
|
Given I request "project/categories"
|
||||||
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 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 1 records
|
And the response has 0 records
|
||||||
|
|
||||||
|
|
||||||
Scenario: Get a Category specific
|
# POST /api/1.0/{workspace}/project/category
|
||||||
Given I request "project/category/4177095085330818c324501061677193"
|
# Create a new Category
|
||||||
Then the response status code should be 200
|
Scenario: Create a new Category
|
||||||
And the response charset is "UTF-8"
|
|
||||||
And the content type is "application/json"
|
|
||||||
And the type is "array"
|
|
||||||
|
|
||||||
|
|
||||||
Scenario: Create a new Categories
|
|
||||||
Given POST this data:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -40,33 +36,61 @@ Scenario: Create a new Categories
|
|||||||
And store "cat_uid" in session array as variable "cat_uid"
|
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"
|
Given I request "project/categories"
|
||||||
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 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 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:
|
Given PUT this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"cat_name": "Name Updated"
|
"cat_name": "Name Updated"
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
And that I want to update a resource with the key "cat_uid" stored in session array
|
And that I want to update a resource with the key "cat_uid" stored in session array
|
||||||
And I request "project/category"
|
And I request "project/category"
|
||||||
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
|
||||||
And the response charset is "UTF-8"
|
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
|
Given that I want to delete a resource with the key "cat_uid" stored in session array
|
||||||
And I request "project/category"
|
And I request "project/category"
|
||||||
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
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
And the type is "object"
|
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
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
Feature: Process Category Main Test
|
Feature: Process Category Main Test
|
||||||
Requirements:
|
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
|
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"
|
Given I request "project/categories"
|
||||||
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 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 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:
|
Given POST this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -42,18 +35,20 @@ Scenario Outline: Create a new Categories
|
|||||||
And the type is "object"
|
And the type is "object"
|
||||||
And store "cat_uid" in session array as variable "cat_uid_<cat_uid_number>"
|
And store "cat_uid" in session array as variable "cat_uid_<cat_uid_number>"
|
||||||
|
|
||||||
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 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 | 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"
|
Given I request "project/categories"
|
||||||
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"
|
||||||
@@ -62,39 +57,43 @@ Scenario: Get list of Categories
|
|||||||
And the response has 7 records
|
And the response has 7 records
|
||||||
|
|
||||||
|
|
||||||
Scenario: Create Category with same name
|
# POST /api/1.0/{workspace}/project/category
|
||||||
Given POST this data:
|
# Create a new Category
|
||||||
"""
|
Scenario: Create Category with same name twice
|
||||||
|
Given POST this data:
|
||||||
|
"""
|
||||||
{
|
{
|
||||||
"cat_name": "sample"
|
"cat_name": "sample"
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
And I request "project/category"
|
And I request "project/category"
|
||||||
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 "exist"
|
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:
|
Given PUT this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"cat_name": "<cat_name>"
|
"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 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"
|
And the content type is "application/json"
|
||||||
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"
|
||||||
|
|
||||||
|
|
||||||
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
|
# PUT /api/1.0/{workspace}/project/categories
|
||||||
|
# Update an specific Category
|
||||||
|
Scenario Outline: Update the Category putting the same name
|
||||||
Given PUT this data:
|
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>"
|
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
|
Then the response status code should be 400
|
||||||
And the response status message should have the following text "exist"
|
And the response status message should have the following text "exist"
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
| test_description | cat_uid_number | cat_name |
|
| test_description | cat_uid_number | cat_name |
|
||||||
| Update Category | 5 | sample |
|
| Update Category | 5 | sample |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# GET /api/1.0/{workspace}/project/categories
|
||||||
Scenario Outline: Get a Category specific
|
# 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>"
|
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
|
||||||
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 "cat_name" property equals "<cat_name>"
|
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 |
|
| cat_uid_number | cat_name | cat_total_processes |
|
||||||
| 1 | UPDATE sample!@#$%^^& | 0 |
|
| 1 | UPDATE sample!@#$%^^& | 0 |
|
||||||
| 2 | UPDATE 32425325 | 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>"
|
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 I request "project/category"
|
||||||
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
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
| cat_uid_number |
|
||||||
| cat_uid_number |
|
| 1 |
|
||||||
| 1 |
|
| 2 |
|
||||||
| 2 |
|
| 3 |
|
||||||
| 3 |
|
| 4 |
|
||||||
| 4 |
|
| 5 |
|
||||||
| 5 |
|
| 6 |
|
||||||
| 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"
|
Given I request "project/categories"
|
||||||
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 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 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
|
|
||||||
@@ -2,11 +2,13 @@
|
|||||||
Feature: Process Category Negative Tests
|
Feature: Process Category Negative Tests
|
||||||
|
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given that I have a valid access_token
|
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:
|
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>
|
Then the response status code should be <error_code>
|
||||||
And the response status message should have the following text "<error_message>"
|
And the response status message should have the following text "<error_message>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| test_description | cat_name | error_code | error_message |
|
| test_description | cat_name | error_code | error_message |
|
||||||
| without name | | 400 | cat_name |
|
| without name | | 400 | cat_name |
|
||||||
|
|
||||||
|
|
||||||
|
# DELETE /api/1.0/{workspace}/project/category
|
||||||
Scenario: Delete the Category when it is assigned to a project "Category Cases Lists"
|
# 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"
|
Given that I want to delete a "Category"
|
||||||
And I request "project/category/4177095085330818c324501061677193"
|
And I request "project/category/4177095085330818c324501061677193"
|
||||||
Then the response status code should be 400
|
Then the response status code should be 400
|
||||||
And the response status message should have the following text "cannot be deleted"
|
And the response status message should have the following text "does not exist"
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
@ProcessMakerMichelangelo @RestAPI
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
Feature: Generate token Grant type - Authorization Code
|
Feature: Generate token Grant type - Authorization Code
|
||||||
Requirements:
|
Requirements:
|
||||||
a workspace with open session and installed application
|
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
|
Given OAUTH register an application
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -15,15 +17,16 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
|||||||
"applicationNumber":"<application_number>"
|
"applicationNumber":"<application_number>"
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| Description | application_number | application_name | application_description | application_website | application_redirectUri |
|
| 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 | 1 | Behat1 | Behat1 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 | 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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 200
|
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 type is "array"
|
||||||
And the response has <records> records
|
And the response has <records> records
|
||||||
And the "out_doc_title" property in row 0 equals "<out_doc_title>"
|
And the "out_doc_title" property in row 0 equals "<out_doc_title>"
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
| test_description | project | records | out_doc_title | application_number |
|
| 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 "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 |
|
| 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"
|
Given I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
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 "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 |
|
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 |
|
||||||
|
|
||||||
|
|
||||||
#Endpoint para hacer que expire los token creados en este script
|
# POST /en/neoclassic/oauth2/access_token/expire
|
||||||
Scenario Outline: Expire token created in this script
|
# Endpoint para hacer que expire los token creados en este script
|
||||||
|
Scenario Outline: Expire token created in this script
|
||||||
Given POST this data:
|
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>"
|
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
|
Then the response status code should be 200
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
| Description | application_number |
|
| Description | application_number |
|
||||||
| Expire token 1 | 1 |
|
| Expire token 1 | 1 |
|
||||||
| Expire token 2 | 2 |
|
| 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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| 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 "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 |
|
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||||
|
|
||||||
|
|
||||||
#Grant type Refresh Token
|
# POST /en/neoclassic/oauth2/refresh_token_<grant_number>
|
||||||
Scenario Outline: Refresh token
|
# Grant type Refresh Token
|
||||||
|
Scenario Outline: Refresh token
|
||||||
Given POST this data:
|
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 "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 "token_type" in session array as variable "token_type_<refresh_token_number>"
|
||||||
And store "scope" in session array as variable "scope_<refresh_token_number>"
|
And store "scope" in session array as variable "scope_<refresh_token_number>"
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
| Description | grant_number | refresh_token_number |
|
| Description | grant_number | refresh_token_number |
|
||||||
| Create token normal | 1 | 3 |
|
| Create token normal | 1 | 3 |
|
||||||
| Create token normal | 2 | 4 |
|
| 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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 200
|
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 type is "array"
|
||||||
And the response has <records> records
|
And the response has <records> records
|
||||||
And the "out_doc_title" property in row 0 equals "<out_doc_title>"
|
And the "out_doc_title" property in row 0 equals "<out_doc_title>"
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
|
Examples:
|
||||||
| test_description | project | records | out_doc_title | application_number |
|
| 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 "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 |
|
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 4 |
|
||||||
|
|
||||||
|
|
||||||
#Endpoint para borrar el token creado en este script
|
# DELETE /en/neoclassic/oauth2
|
||||||
|
# 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
|
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||||
And I request "oauth2"
|
And I request "oauth2"
|
||||||
And the content type is "application/json"
|
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 response charset is "UTF-8"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| application_number |
|
| application_number |
|
||||||
| 1 |
|
| 1 |
|
||||||
| 2 |
|
| 2 |
|
||||||
| 3 |
|
| 3 |
|
||||||
| 4 |
|
| 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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| 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 "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 |
|
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
@ProcessMakerMichelangelo @RestAPI
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
Feature: Generate token Grant type - Client Credentials Grant
|
Feature: Generate token Grant type - Client Credentials Grant
|
||||||
Requirements:
|
Requirements:
|
||||||
a workspace with installed application
|
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:
|
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 "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 "expires_in" in session array as variable "expires_in_<grant_number>"
|
||||||
And store "token_type" in session array as variable "token_type_<grant_number>"
|
And store "token_type" in session array as variable "token_type_<grant_number>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | grant_number | grant_type |
|
| Description | grant_number | grant_type |
|
||||||
| Create token normal | 1 | client_credentials |
|
| Create token normal | 1 | client_credentials |
|
||||||
| Create token normal | 2 | 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
|
#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>"
|
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||||
And I request "cases"
|
And I request "cases"
|
||||||
Then the response status code should be 400
|
Then the response status code should be 400
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | grant_number |
|
| Description | grant_number |
|
||||||
| Create token normal | 1 |
|
| Create token normal | 1 |
|
||||||
| Create token normal | 2 |
|
| Create token normal | 2 |
|
||||||
|
|
||||||
#Endpoint para hacer que expire los token creados en este script
|
#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:
|
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>"
|
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
|
Then the response status code should be 200
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | application_number |
|
| Description | application_number |
|
||||||
| Expire token 1 | 1 |
|
| Expire token 1 | 1 |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Expire token created in this script
|
|
||||||
|
Scenario Outline: Expire token created in this script
|
||||||
Given POST this data:
|
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>"
|
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
|
Then the response status code should be 200
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | application_number |
|
| Description | application_number |
|
||||||
| Expire token 2 | 2 |
|
| Expire token 2 | 2 |
|
||||||
|
|
||||||
|
|
||||||
#Endpoint para verificar que el token haya expirado
|
#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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| 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 "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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||||
|
|
||||||
|
|
||||||
#Endpoint para borrar el token creado en este script
|
#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
|
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||||
And I request "oauth2"
|
And I request "oauth2"
|
||||||
And the content type is "application/json"
|
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 response charset is "UTF-8"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| application_number |
|
| application_number |
|
||||||
| 1 |
|
| 1 |
|
||||||
| 2 |
|
| 2 |
|
||||||
|
|
||||||
#Endpoint para verificar que el token ya no existe
|
#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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| 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 "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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
@ProcessMakerMichelangelo @RestAPI
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
Feature: Generate token Grant type - Implicit Grant
|
Feature: Generate token Grant type - Implicit Grant
|
||||||
Requirements:
|
Requirements:
|
||||||
a workspace with installed application
|
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
|
Given OAUTH request implicit grant
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
@@ -14,14 +14,14 @@ Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
|||||||
"implicit_grant_number":"<implicit_grant_number>"
|
"implicit_grant_number":"<implicit_grant_number>"
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
Examples:
|
Examples:
|
||||||
| Description | implicit_grant_number | response_type | client_id | scope |
|
| Description | implicit_grant_number | response_type | client_id | scope |
|
||||||
| Create token normal | 1 | token | x-pm-local-client | * |
|
| Create token normal | 1 | token | x-pm-local-client | * |
|
||||||
| Create token normal | 2 | 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
|
#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>"
|
Given that I assign an access token from session variable "access_token_<implicit_grant_number>"
|
||||||
And I request "cases"
|
And I request "cases"
|
||||||
Then the response status code should be 200
|
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 type is "array"
|
||||||
And the response has 14 records
|
And the response has 14 records
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | implicit_grant_number |
|
| Description | implicit_grant_number |
|
||||||
| Create token normal | 1 |
|
| Create token normal | 1 |
|
||||||
| Create token normal | 2 |
|
| Create token normal | 2 |
|
||||||
|
|
||||||
#Endpoint para hacer que expire los token creados en este script
|
#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:
|
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>"
|
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
|
Then the response status code should be 200
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | application_number |
|
| Description | application_number |
|
||||||
| Expire token 1 | 1 |
|
| Expire token 1 | 1 |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Expire token created in this script
|
|
||||||
|
Scenario Outline: Expire token created in this script
|
||||||
Given POST this data:
|
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>"
|
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
|
Then the response status code should be 200
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | application_number |
|
| Description | application_number |
|
||||||
| Expire token 2 | 2 |
|
| Expire token 2 | 2 |
|
||||||
|
|
||||||
|
|
||||||
#Endpoint para verificar que el token haya expirado
|
#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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| 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 "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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||||
|
|
||||||
|
|
||||||
#Endpoint para borrar el token creado en este script
|
#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
|
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||||
And I request "oauth2"
|
And I request "oauth2"
|
||||||
And the content type is "application/json"
|
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 response charset is "UTF-8"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| application_number |
|
| application_number |
|
||||||
| 1 |
|
| 1 |
|
||||||
| 2 |
|
| 2 |
|
||||||
|
|
||||||
#Endpoint para verificar que el token ya no existe
|
#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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| 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 "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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
@ProcessMakerMichelangelo @RestAPI
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
Feature: Generate token Grant type - Resources Owner Password Credential Grant
|
Feature: Generate token Grant type - Resources Owner Password Credential Grant
|
||||||
Requirements:
|
Requirements:
|
||||||
a workspace with installed application
|
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:
|
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>"
|
And store "refresh_token" in session array as variable "refresh_token_<grant_number>"
|
||||||
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | grant_number | grant_type | username | password | scope |
|
| Description | grant_number | grant_type | username | password | scope |
|
||||||
| Create token normal | 1 | password | amy | sample | * |
|
| Create token normal | 1 | password | amy | sample | * |
|
||||||
| Create token normal | 2 | password | admin | sample123* | * |
|
| 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
|
#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>"
|
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||||
And I request "cases"
|
And I request "cases"
|
||||||
Then the response status code should be 200
|
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 type is "array"
|
||||||
And the response has <records> records
|
And the response has <records> records
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | grant_number | records |
|
| Description | grant_number | records |
|
||||||
| Create token normal | 1 | 4 |
|
| Create token normal | 1 | 4 |
|
||||||
| Create token normal | 2 | 14 |
|
| Create token normal | 2 | 14 |
|
||||||
|
|
||||||
|
|
||||||
#Endpoint para hacer que expire los token creados en este script
|
#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:
|
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>"
|
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
|
Then the response status code should be 200
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | application_number |
|
| Description | application_number |
|
||||||
| Expire token 1 | 1 |
|
| Expire token 1 | 1 |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Expire token created in this script
|
|
||||||
|
Scenario Outline: Expire token created in this script
|
||||||
Given POST this data:
|
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>"
|
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
|
Then the response status code should be 200
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| Description | application_number |
|
| Description | application_number |
|
||||||
| Expire token 2 | 2 |
|
| Expire token 2 | 2 |
|
||||||
|
|
||||||
|
|
||||||
#Endpoint para verificar que el token haya expirado
|
#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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| 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 "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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||||
|
|
||||||
|
|
||||||
#Endpoint para borrar el token creado en este script
|
#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
|
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||||
And I request "oauth2"
|
And I request "oauth2"
|
||||||
And the content type is "application/json"
|
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 response charset is "UTF-8"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| application_number |
|
| application_number |
|
||||||
| 1 |
|
| 1 |
|
||||||
| 2 |
|
| 2 |
|
||||||
|
|
||||||
#Endpoint para verificar que el token ya no existe
|
#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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| 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 "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>"
|
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||||
And I request "project/<project>/output-documents"
|
And I request "project/<project>/output-documents"
|
||||||
Then the response status code should be 401
|
Then the response status code should be 401
|
||||||
And the response status message should have the following text "<error_message>"
|
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 |
|
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
| 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 /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
|
Scenario Outline: Get the DataBase Connections List when there are exactly zero DataBase Connections
|
||||||
Given I request "project/<project>/database-connections"
|
Given I request "project/<project>/database-connections"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
|
|||||||
@@ -2162,13 +2162,11 @@ class RestContext extends BehatContext
|
|||||||
throw new Exception('Bad credentials');
|
throw new Exception('Bad credentials');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//print "<textarea>$answer</textarea>";
|
//print "<textarea>$answer</textarea>";
|
||||||
if (curl_error($ch)) {
|
if (curl_error($ch)) {
|
||||||
throw new Exception(curl_error($ch));
|
throw new Exception(curl_error($ch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Read the session saved in the cookie file
|
// Read the session saved in the cookie file
|
||||||
|
|
||||||
if(!file_exists($cookie_file)){
|
if(!file_exists($cookie_file)){
|
||||||
@@ -2202,20 +2200,21 @@ class RestContext extends BehatContext
|
|||||||
}
|
}
|
||||||
$parts = parse_url($newurl);
|
$parts = parse_url($newurl);
|
||||||
|
|
||||||
parse_str($parts['fragment'], $fragment);
|
|
||||||
//print_r($fragment);
|
|
||||||
// json_decode(json)
|
|
||||||
$response=json_decode($answer);
|
|
||||||
|
|
||||||
if (file_exists("session.data")) {
|
if (file_exists("session.data")) {
|
||||||
$sessionData = json_decode(file_get_contents("session.data"));
|
$sessionData = json_decode(file_get_contents("session.data"));
|
||||||
} else {
|
} else {
|
||||||
$sessionData = new StdClass();
|
$sessionData = new StdClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//print_r($fragment);
|
||||||
|
// json_decode(json)
|
||||||
|
//$response=json_decode($answer);
|
||||||
|
parse_str($parts['fragment'], $fragment);
|
||||||
foreach($fragment as $key => $varValue){
|
foreach($fragment as $key => $varValue){
|
||||||
$sessionVarName=$key."_".$implicit_grant_number;
|
$sessionVarName=$key."_".$implicit_grant_number;
|
||||||
$sessionData->$sessionVarName = $varValue;
|
$sessionData->$sessionVarName = $varValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//print_r($sessionData);
|
//print_r($sessionData);
|
||||||
file_put_contents("session.data", json_encode($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");
|
//print_r("\nRegister application:\n".$answer."\n$oauth_authorization_url?response_type=$response_type&client_id=$client_id&scope=$scope\n");
|
||||||
|
|||||||
@@ -69,8 +69,10 @@ pake_task('workspace-backup', 'project_exists');
|
|||||||
pake_desc("restore a previously backed-up workspace\n args: [-o|--overwrite] <filename> <workspace>");
|
pake_desc("restore a previously backed-up workspace\n args: [-o|--overwrite] <filename> <workspace>");
|
||||||
pake_task('workspace-restore', 'project_exists');
|
pake_task('workspace-restore', 'project_exists');
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
pake_desc("check standard code\n args: <directory>");
|
pake_desc("check standard code\n args: <directory>");
|
||||||
pake_task('check-standard-code', 'project_exists' );
|
pake_task('check-standard-code', 'project_exists' );
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function run_version
|
* Function run_version
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ EOT
|
|||||||
CLI::taskArg("workspace-name", true, true);
|
CLI::taskArg("workspace-name", true, true);
|
||||||
CLI::taskRun("run_database_generate_self_service_by_value");
|
CLI::taskRun("run_database_generate_self_service_by_value");
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
CLI::taskName("check-workspace-disabled-code");
|
CLI::taskName("check-workspace-disabled-code");
|
||||||
CLI::taskDescription(<<<EOT
|
CLI::taskDescription(<<<EOT
|
||||||
Check disabled code for the specified workspace(s).
|
Check disabled code for the specified workspace(s).
|
||||||
@@ -198,6 +199,7 @@ EOT
|
|||||||
);
|
);
|
||||||
CLI::taskArg("workspace-name", true, true);
|
CLI::taskArg("workspace-name", true, true);
|
||||||
CLI::taskRun("run_check_workspace_disabled_code");
|
CLI::taskRun("run_check_workspace_disabled_code");
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function run_info
|
* Function run_info
|
||||||
@@ -579,7 +581,7 @@ function run_database_generate_self_service_by_value($args, $opts)
|
|||||||
echo CLI::error($e->getMessage()) . "\n";
|
echo CLI::error($e->getMessage()) . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
function run_check_workspace_disabled_code($args, $opts)
|
function run_check_workspace_disabled_code($args, $opts)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -630,4 +632,4 @@ function run_check_workspace_disabled_code($args, $opts)
|
|||||||
echo CLI::error($e->getMessage()) . "\n";
|
echo CLI::error($e->getMessage()) . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|||||||
@@ -923,6 +923,7 @@ class Applications
|
|||||||
|
|
||||||
$stepItem['title'] = $oDocument->getDynTitle();
|
$stepItem['title'] = $oDocument->getDynTitle();
|
||||||
$stepItem['url'] = "cases/cases_Step?UID=$stepUid&TYPE=$stepType&POSITION=$stepPosition&ACTION=EDIT";
|
$stepItem['url'] = "cases/cases_Step?UID=$stepUid&TYPE=$stepType&POSITION=$stepPosition&ACTION=EDIT";
|
||||||
|
$stepItem['version'] = $oDocument->getDynVersion();
|
||||||
break;
|
break;
|
||||||
case 'OUTPUT_DOCUMENT':
|
case 'OUTPUT_DOCUMENT':
|
||||||
$oDocument = OutputDocumentPeer::retrieveByPK( $caseStep->getStepUidObj() );
|
$oDocument = OutputDocumentPeer::retrieveByPK( $caseStep->getStepUidObj() );
|
||||||
|
|||||||
@@ -46,21 +46,6 @@ $(window).load(function () {
|
|||||||
|
|
||||||
var form = document.getElementsByTagName("form")[0];
|
var form = document.getElementsByTagName("form")[0];
|
||||||
|
|
||||||
var el = form.elements;
|
|
||||||
var dt = data.items[0].items;
|
|
||||||
for (var i = 0; i < dt.length; i++) {
|
|
||||||
var dr = dt[i];
|
|
||||||
for (var j = 0; j < dr.length; j++) {
|
|
||||||
if (dr[j].name) {
|
|
||||||
for (var k = 0; k < el.length; k++) {
|
|
||||||
if (el[k].name === dr[j].name) {
|
|
||||||
el[k].name = "form[" + dr[j].name + "]";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var type = document.createElement("input");
|
var type = document.createElement("input");
|
||||||
type.type = "hidden";
|
type.type = "hidden";
|
||||||
type.name = "TYPE";
|
type.name = "TYPE";
|
||||||
|
|||||||
@@ -1424,11 +1424,12 @@ class Cases
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $app_uid, Uid for case
|
* @param string $app_uid, Uid for case
|
||||||
* @param array $app_data, Data for case variables
|
* @param array $app_data, Data for case variables
|
||||||
|
* @param string $dyn_uid, Uid for dynaform
|
||||||
*
|
*
|
||||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||||
* @copyright Colosa - Bolivia
|
* @copyright Colosa - Bolivia
|
||||||
*/
|
*/
|
||||||
public function setCaseVariables($app_uid, $app_data)
|
public function setCaseVariables($app_uid, $app_data, $dyn_uid = null)
|
||||||
{
|
{
|
||||||
Validator::isString($app_uid, '$app_uid');
|
Validator::isString($app_uid, '$app_uid');
|
||||||
Validator::appUid($app_uid, '$app_uid');
|
Validator::appUid($app_uid, '$app_uid');
|
||||||
@@ -1436,7 +1437,18 @@ class Cases
|
|||||||
|
|
||||||
$case = new \Cases();
|
$case = new \Cases();
|
||||||
$fields = $case->loadCase($app_uid);
|
$fields = $case->loadCase($app_uid);
|
||||||
$data['APP_DATA'] = array_merge($fields['APP_DATA'], $app_data);
|
$_POST['form'] = $app_data;
|
||||||
|
|
||||||
|
if (!is_null($dyn_uid)) {
|
||||||
|
$oDynaform = \DynaformPeer::retrieveByPK($dyn_uid);
|
||||||
|
|
||||||
|
if ($oDynaform->getDynVersion() < 2) {
|
||||||
|
$oForm = new \Form ( $fields['PRO_UID'] . "/" . $dyn_uid, PATH_DYNAFORM );
|
||||||
|
$oForm->validatePost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['APP_DATA'] = array_merge($fields['APP_DATA'], $_POST['form']);
|
||||||
$case->updateCase($app_uid, $data);
|
$case->updateCase($app_uid, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1905,5 +1917,57 @@ class Cases
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Put execute triggers
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @param string $app_uid , Uid for case
|
||||||
|
* @param int $del_index , Index for case
|
||||||
|
* @param string $obj_type , Index for case
|
||||||
|
* @param string $obj_uid , Index for case
|
||||||
|
*
|
||||||
|
* @copyright Colosa - Bolivia
|
||||||
|
*/
|
||||||
|
public function putExecuteTriggers($app_uid, $del_index, $obj_type, $obj_uid)
|
||||||
|
{
|
||||||
|
Validator::isString($app_uid, '$app_uid');
|
||||||
|
Validator::appUid($app_uid, '$app_uid');
|
||||||
|
Validator::isInteger($del_index, '$del_index');
|
||||||
|
|
||||||
|
$oCase = new \Cases();
|
||||||
|
$aField = $oCase->loadCase($app_uid, $del_index);
|
||||||
|
$tas_uid = $aField["TAS_UID"];
|
||||||
|
|
||||||
|
$task = new \Tasks();
|
||||||
|
$aField["APP_DATA"] = $oCase->executeTriggers($tas_uid, $obj_type, $obj_uid, "AFTER", $aField["APP_DATA"]);
|
||||||
|
$aField = $oCase->updateCase($app_uid, $aField);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Steps evaluate
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @param string $app_uid, Uid for case
|
||||||
|
* @param int $del_index , Index for case
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @copyright Colosa - Bolivia
|
||||||
|
*/
|
||||||
|
public function getSteps($app_uid, $del_index)
|
||||||
|
{
|
||||||
|
Validator::isString($app_uid, '$app_uid');
|
||||||
|
Validator::appUid($app_uid, '$app_uid');
|
||||||
|
Validator::isInteger($del_index, '$del_index');
|
||||||
|
|
||||||
|
$oCase = new \Cases();
|
||||||
|
$aCaseField = $oCase->loadCase($app_uid, $del_index);
|
||||||
|
$tas_uid = $aCaseField["TAS_UID"];
|
||||||
|
$pro_uid = $aCaseField["PRO_UID"];
|
||||||
|
|
||||||
|
$oApplication = new \Applications();
|
||||||
|
$aField = $oApplication->getSteps($app_uid, $del_index, $tas_uid, $pro_uid);
|
||||||
|
|
||||||
|
return $aField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -610,6 +610,7 @@ class Variable
|
|||||||
$variableSql = "";
|
$variableSql = "";
|
||||||
$sqlLimit = "";
|
$sqlLimit = "";
|
||||||
$variableSqlLimit = "";
|
$variableSqlLimit = "";
|
||||||
|
$sqlConditionLike = "";
|
||||||
|
|
||||||
$criteria = new \Criteria("workflow");
|
$criteria = new \Criteria("workflow");
|
||||||
|
|
||||||
|
|||||||
@@ -838,17 +838,18 @@ class Cases extends Api
|
|||||||
*
|
*
|
||||||
* @param string $app_uid {@min 1}{@max 32}
|
* @param string $app_uid {@min 1}{@max 32}
|
||||||
* @param array $request_data
|
* @param array $request_data
|
||||||
|
* @param string $dyn_uid {@from path}
|
||||||
*
|
*
|
||||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||||
* @copyright Colosa - Bolivia
|
* @copyright Colosa - Bolivia
|
||||||
*
|
*
|
||||||
* @url PUT /:app_uid/variable
|
* @url PUT /:app_uid/variable
|
||||||
*/
|
*/
|
||||||
public function doPutCaseVariables($app_uid, $request_data)
|
public function doPutCaseVariables($app_uid, $request_data, $dyn_uid = '')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$cases = new \ProcessMaker\BusinessModel\Cases();
|
$cases = new \ProcessMaker\BusinessModel\Cases();
|
||||||
$cases->setCaseVariables($app_uid, $request_data);
|
$cases->setCaseVariables($app_uid, $request_data, $dyn_uid);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
}
|
}
|
||||||
@@ -994,5 +995,48 @@ class Cases extends Api
|
|||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute triggers
|
||||||
|
*
|
||||||
|
* @param string $app_uid {@min 1}{@max 32}
|
||||||
|
* @param int $del_index {@from body}
|
||||||
|
* @param string $obj_type {@from body}
|
||||||
|
* @param string $obj_uid {@from body}
|
||||||
|
*
|
||||||
|
* @copyright Colosa - Bolivia
|
||||||
|
*
|
||||||
|
* @url PUT /:app_uid/execute-triggers
|
||||||
|
*/
|
||||||
|
public function doPutExecuteTriggers($app_uid, $del_index, $obj_type, $obj_uid)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$cases = new \ProcessMaker\BusinessModel\Cases();
|
||||||
|
$cases->putExecuteTriggers($app_uid, $del_index, $obj_type, $obj_uid);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @url GET /:app_uid/:del_index/steps
|
||||||
|
*
|
||||||
|
* @param string $app_uid {@min 32}{@max 32}
|
||||||
|
* @param int $del_index
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function doGetSteps($app_uid, $del_index)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||||
|
$case->setFormatFieldNameInUppercase(false);
|
||||||
|
|
||||||
|
$response = $case->getSteps($app_uid, $del_index);
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,10 +132,10 @@
|
|||||||
<a href="#" class="mafe-menu-variable"></a>
|
<a href="#" class="mafe-menu-variable"></a>
|
||||||
<a href="#" class="btn_create mafe-menu-variable-create"><span></span></a>
|
<a href="#" class="btn_create mafe-menu-variable-create"><span></span></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<!--<li>
|
||||||
<a href="#" class="mafe-menu-eventmessages"></a>
|
<a href="#" class="mafe-menu-eventmessages"></a>
|
||||||
<a href="#" class="btn_create mafe-menu-eventmessages-create"><span></span></a>
|
<a href="#" class="btn_create mafe-menu-eventmessages-create"><span></span></a>
|
||||||
</li>
|
</li>-->
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="mafe-menu-dynaform"></a>
|
<a href="#" class="mafe-menu-dynaform"></a>
|
||||||
<a href="#" class="btn_create mafe-menu-dynaform-create"><span></span></a>
|
<a href="#" class="btn_create mafe-menu-dynaform-create"><span></span></a>
|
||||||
|
|||||||
@@ -967,7 +967,7 @@ function validateFieldSizeAutoincrement(valueType, defaultValue) {
|
|||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
id: 'REP_TAB_NAME',
|
id: 'REP_TAB_NAME',
|
||||||
fieldLabel: _("ID_TABLE_NAME") + ' <span style="font-size:9">('+_("ID_AUTO_PREFIX") + ' "PMT")</span>',
|
fieldLabel: _("ID_TABLE_NAME") + ' <span style="font-size:9">('+_("ID_AUTO_PREFIX") + ' "PMT_")</span>',
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
emptyText: _("ID_SET_A_TABLE_NAME"),
|
emptyText: _("ID_SET_A_TABLE_NAME"),
|
||||||
width: 250,
|
width: 250,
|
||||||
|
|||||||
Reference in New Issue
Block a user