Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
@@ -44,8 +44,8 @@ Feature: DynaForms Resources
|
||||
"dyn_type": "xmlform",
|
||||
"copy_import":
|
||||
{
|
||||
"prj_uid": "48207364252cc27894ca354020290166",
|
||||
"dyn_uid": "68268455252cc27cb463d76013645722"
|
||||
"prj_uid": "42445320652cd534acb3824056962285",
|
||||
"dyn_uid": "70070685552cd53605650f7062918506"
|
||||
}
|
||||
}
|
||||
"""
|
||||
@@ -59,13 +59,13 @@ Feature: DynaForms Resources
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/dynaform
|
||||
# Create a new DynaForm for a Project
|
||||
# Creation of a DynaForm based in a PMTable
|
||||
Scenario: Create "My DynaForm3" for a Project (Creation of a DynaForm based in a PMTable)
|
||||
Scenario: Create "PMT_DYNAFORM" for a Project (Creation of a DynaForm based in a PMTable)
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"dyn_title": "My DynaForm3",
|
||||
"dyn_description": "My DynaForm3 DESCRIPTION",
|
||||
"dyn_title": "PMT_DYNAFORM",
|
||||
"dyn_description": "PMT_DYNAFORM DESCRIPTION",
|
||||
"dyn_type": "xmlform",
|
||||
"pmtable":
|
||||
{
|
||||
@@ -129,8 +129,8 @@ Feature: DynaForms Resources
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "dyn_title" is set to "My DynaForm3"
|
||||
And that "dyn_description" is set to "My DynaForm3 DESCRIPTION"
|
||||
And that "dyn_title" is set to "PMT_DYNAFORM"
|
||||
And that "dyn_description" is set to "PMT_DYNAFORM DESCRIPTION"
|
||||
And that "dyn_type" is set to "xmlform"
|
||||
|
||||
#DELETE /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid}
|
||||
|
||||
@@ -17,7 +17,7 @@ Feature: Testing events
|
||||
"evn_time_unit": "DAYS",
|
||||
"evn_when": 1,
|
||||
"evn_when_occurs": "AFTER_TIME",
|
||||
"tri_uid": "95325847552af0c07792c15098680510"
|
||||
"tri_uid": "75916963152cc6ab085a704081670580"
|
||||
}
|
||||
"""
|
||||
And I request "project/251815090529619a99a2bf4013294414/event"
|
||||
@@ -41,7 +41,7 @@ Feature: Testing events
|
||||
"evn_time_unit": "DAYS",
|
||||
"evn_when": 1,
|
||||
"evn_when_occurs": "AFTER_TIME",
|
||||
"tri_uid": "95325847552af0c07792c15098680510"
|
||||
"tri_uid": "75916963152cc6ab085a704081670580"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "evn_uid" stored in session array
|
||||
|
||||
@@ -1,21 +1,139 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Input Documents Resources
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
|
||||
# Get a List Input Documents of a Project
|
||||
Scenario: Get a List Input Documents of a Project
|
||||
Given that I have a valid access_token
|
||||
And I request "project/14414793652a5d718b65590036026581/input-documents"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document
|
||||
# Create a new Input Document for a Project
|
||||
Scenario: Create "My InputDocument1" for a Project
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"inp_doc_title": "My InputDocument1",
|
||||
"inp_doc_description": "My InputDocument1 DESCRIPTION",
|
||||
"inp_doc_form_needed": "VIRTUAL",
|
||||
"inp_doc_original": "ORIGINAL",
|
||||
"inp_doc_published": "PRIVATE",
|
||||
"inp_doc_versioning": 1,
|
||||
"inp_doc_destination_path": "",
|
||||
"inp_doc_tags": "INPUT"
|
||||
}
|
||||
"""
|
||||
And I request "project/14414793652a5d718b65590036026581/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "inp_doc_uid" in session array as variable "indoc1"
|
||||
|
||||
Scenario: Get a List input documents of a project
|
||||
Given this scenario is not implemented yet
|
||||
|
||||
Scenario: Get a single input document of a project
|
||||
Given this scenario is not implemented yet
|
||||
|
||||
Scenario: Create a new input document for a project
|
||||
Given this scenario is not implemented yet
|
||||
|
||||
Scenario: Update an input document for a project
|
||||
Given this scenario is not implemented yet
|
||||
|
||||
Scenario: Delete an input document of a project
|
||||
Given this scenario is not implemented yet
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document
|
||||
# Create a new Input Document for a Project
|
||||
Scenario: Create "My InputDocument2" for a Project
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"inp_doc_title": "My InputDocument2",
|
||||
"inp_doc_description": "My InputDocument2 DESCRIPTION",
|
||||
"inp_doc_form_needed": "VIRTUAL",
|
||||
"inp_doc_original": "ORIGINAL",
|
||||
"inp_doc_published": "PRIVATE",
|
||||
"inp_doc_versioning": 1,
|
||||
"inp_doc_destination_path": "",
|
||||
"inp_doc_tags": "INPUT"
|
||||
}
|
||||
"""
|
||||
And I request "project/14414793652a5d718b65590036026581/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "inp_doc_uid" in session array as variable "indoc2"
|
||||
|
||||
#PUT /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
|
||||
# Update an Input Document for a Project
|
||||
Scenario: Update an Input Document for a Project
|
||||
Given that I have a valid access_token
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"inp_doc_title": "My InputDocument1 Modified",
|
||||
"inp_doc_description": "My InputDocument1 DESCRIPTION Modified",
|
||||
"inp_doc_form_needed": "VIRTUAL",
|
||||
"inp_doc_original": "ORIGINAL",
|
||||
"inp_doc_published": "PRIVATE"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "indoc1" stored in session array
|
||||
And I request "project/14414793652a5d718b65590036026581/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "inp_doc_title" is set to "My InputDocument1 Modified"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
|
||||
# Get a List Input Documents of a Project
|
||||
Scenario: Get a List Input Documents of a Project
|
||||
Given that I have a valid access_token
|
||||
And I request "project/14414793652a5d718b65590036026581/input-documents"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the "inp_doc_title" property in row 0 equals "My InputDocument1 Modified"
|
||||
And the "inp_doc_description" property in row 0 equals "My InputDocument1 DESCRIPTION Modified"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
|
||||
# Get a single Input Document of a Project
|
||||
Scenario: Get a single Input Document of a Project
|
||||
Given that I have a valid access_token
|
||||
And that I want to get a resource with the key "indoc1" stored in session array
|
||||
And I request "project/14414793652a5d718b65590036026581/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "inp_doc_title" is set to "My InputDocument1 Modified"
|
||||
And that "inp_doc_description" is set to "My InputDocument1 DESCRIPTION Modified"
|
||||
|
||||
#DELETE /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
|
||||
# Delete an Input Document of a Project
|
||||
Scenario: Delete a previously created Input Document
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "indoc1" stored in session array
|
||||
And I request "project/14414793652a5d718b65590036026581/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
#DELETE /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
|
||||
# Delete an Input Document of a Project
|
||||
Scenario: Delete a previously created Input Document
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "indoc2" stored in session array
|
||||
And I request "project/14414793652a5d718b65590036026581/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
|
||||
# Get a List Input Documents of a Project
|
||||
Scenario: Get a List Input Documents of a Project
|
||||
Given that I have a valid access_token
|
||||
And I request "project/14414793652a5d718b65590036026581/input-documents"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
|
||||
@@ -1,52 +1,120 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Project Activity Resources
|
||||
Feature: Testing activity
|
||||
@1: TEST FOR GET ACTIVITY /-----------------------------------------------------------------------
|
||||
Scenario: Get a activity
|
||||
Given that I have a valid access_token
|
||||
And I request "project/251815090529619a99a2bf4013294414/activity/97192372152a5c78f04a794095806311"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the "definition" property type is "array"
|
||||
And the "properties" property type is "array"
|
||||
And that "tas_title" is set to "Task 1"
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario: Get properties & definition of a activity.
|
||||
Given I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
Scenario: Get BPMN definition of an activity.
|
||||
Given I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485?filter=definition"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
|
||||
Scenario: Get properties data of the ProcessMaker engine of an activity.
|
||||
Given I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485?filter=properties"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
|
||||
Scenario: Update definition & properties of an activity
|
||||
Given PUT data from file "activity_update_properties.json"
|
||||
And I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485"
|
||||
Then the response status code should be 200
|
||||
|
||||
Scenario: Get properties & definition of an updated activity.
|
||||
Given I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And the response is equivalent to this json file "activity_update_properties.json"
|
||||
|
||||
Scenario: Delete a project activity
|
||||
Given that I want to delete "activity"
|
||||
And I request "project/4224292655297723eb98691001100052/activity/95897010052ccb746c770b6003171032"
|
||||
Then the response status code should be 200
|
||||
|
||||
Scenario: Get properties & definition of a activity (subprocess)
|
||||
Given I request "project/4224292655297723eb98691001100052/activity/68065066252ccb7913b9be6048174072"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
@2: TEST FOR GET PROPERTIES ACTIVITY /---------------------------------------------------------
|
||||
Scenario: Get properties of activity
|
||||
Given that I have a valid access_token
|
||||
And I request "project/251815090529619a99a2bf4013294414/activity/97192372152a5c78f04a794095806311?filter=properties"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the response has not a "definition" property
|
||||
|
||||
|
||||
@3: TEST FOR GET DEFINITION ACTIVITY /---------------------------------------------------------
|
||||
Scenario: Get definition of activity
|
||||
Given that I have a valid access_token
|
||||
And I request "project/251815090529619a99a2bf4013294414/activity/97192372152a5c78f04a794095806311?filter=definition"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the response has not a "properties" property
|
||||
|
||||
|
||||
@4: TEST FOR PUT DEFINITION ACTIVITY /---------------------------------------------------------
|
||||
Scenario: Put propertie of activity
|
||||
Given that I have a valid access_token
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"definition": [],
|
||||
"properties": {
|
||||
"tas_type": "NORMAL",
|
||||
"tas_duration": 1,
|
||||
"tas_type_day": "",
|
||||
"tas_timeunit": "DAYS",
|
||||
"tas_priority_variable": "",
|
||||
"tas_assign_type": "BALANCED",
|
||||
"tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED",
|
||||
"tas_group_variable": null,
|
||||
"tas_transfer_fly": "FALSE",
|
||||
"tas_send_last_email": "FALSE",
|
||||
"tas_derivation_screen_tpl": "",
|
||||
"tas_selfservice_timeout": 0,
|
||||
"tas_selfservice_time": "",
|
||||
"tas_selfservice_time_unit": "",
|
||||
"tas_selfservice_trigger_uid": "",
|
||||
"tas_title": "Task Edit",
|
||||
"tas_description": "",
|
||||
"tas_def_title": "",
|
||||
"tas_def_description": "",
|
||||
"tas_def_message": "",
|
||||
"tas_def_subject_message": "",
|
||||
"tas_calendar": ""
|
||||
}
|
||||
}
|
||||
"""
|
||||
And I request "project/251815090529619a99a2bf4013294414/activity/97192372152a5c78f04a794095806311"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
@5: TEST FOR GET ACTIVITY /-----------------------------------------------------------------------
|
||||
Scenario: Get a activity
|
||||
Given that I have a valid access_token
|
||||
And I request "project/251815090529619a99a2bf4013294414/activity/97192372152a5c78f04a794095806311"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "tas_title" is set to "Task Edit"
|
||||
|
||||
|
||||
@6: TEST FOR PUT DEFINITION ACTIVITY /---------------------------------------------------------
|
||||
Scenario: Put propertie of activity
|
||||
Given that I have a valid access_token
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"definition": [],
|
||||
"properties": {
|
||||
"tas_type": "NORMAL",
|
||||
"tas_duration": 1,
|
||||
"tas_type_day": "",
|
||||
"tas_timeunit": "DAYS",
|
||||
"tas_priority_variable": "",
|
||||
"tas_assign_type": "BALANCED",
|
||||
"tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED",
|
||||
"tas_group_variable": null,
|
||||
"tas_transfer_fly": "FALSE",
|
||||
"tas_send_last_email": "FALSE",
|
||||
"tas_derivation_screen_tpl": "",
|
||||
"tas_selfservice_timeout": 0,
|
||||
"tas_selfservice_time": "",
|
||||
"tas_selfservice_time_unit": "",
|
||||
"tas_selfservice_trigger_uid": "",
|
||||
"tas_title": "Task 1",
|
||||
"tas_description": "",
|
||||
"tas_def_title": "",
|
||||
"tas_def_description": "",
|
||||
"tas_def_message": "",
|
||||
"tas_def_subject_message": "",
|
||||
"tas_calendar": ""
|
||||
}
|
||||
}
|
||||
"""
|
||||
And I request "project/251815090529619a99a2bf4013294414/activity/97192372152a5c78f04a794095806311"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
@@ -698,6 +698,23 @@ class RestContext extends BehatContext
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^the response has not a "([^"]*)" property$/
|
||||
* @Given /^the response has not an "([^"]*)" property$/
|
||||
* @Given /^the response has not a property called "([^"]*)"$/
|
||||
* @Given /^the response has not an property called "([^"]*)"$/
|
||||
*/
|
||||
public function theResponseHasNotAProperty($propertyName)
|
||||
{
|
||||
$data = $this->_data;
|
||||
|
||||
if (!empty($data)) {
|
||||
if (isset($data->$propertyName)) {
|
||||
throw new Exception("Property '$propertyName' is set!\n\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the "([^"]*)" property equals "([^"]*)"$/
|
||||
*/
|
||||
@@ -1092,4 +1109,4 @@ class RestContext extends BehatContext
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class Test3 extends Api
|
||||
/**
|
||||
* @status 201
|
||||
*/
|
||||
function post()
|
||||
function post2()
|
||||
{
|
||||
return array('success' => true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user