Merged in victorsl/processmaker (pull request #58)

ProcessMaker-MA "Dynaforms Resources, small fix (behat)"
This commit is contained in:
erik ao
2014-01-08 10:29:32 -04:00
2 changed files with 141 additions and 23 deletions

View File

@@ -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}

View File

@@ -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