Avance del feature export/import projects, y modificacion de la funcion para realizar upload
This commit is contained in:
@@ -130,52 +130,85 @@ Scenario Outline: Import a process
|
|||||||
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 "object"
|
And the type is "object"
|
||||||
|
And store "prj_uid" in session array as variable "prj_uid_<prj_uid_number>"
|
||||||
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| project_file | import_option |
|
| project_file | import_option | prj_uid_number |
|
||||||
| /home/wendy/uploadfiles/Process_NewCreate_BPMN.pmx | create |
|
| /home/wendy/uploadfiles/Process_NewCreate_BPMN.pmx | create | 1 |
|
||||||
| /home/wendy/uploadfiles/Process_Complete_BPMN.pmx | overwrite |
|
| /home/wendy/uploadfiles/Process_Complete_BPMN.pmx | overwrite | 2 |
|
||||||
| /home/wendy/uploadfiles/Process_Complete_BPMN.pmx | disable |
|
| /home/wendy/uploadfiles/Process_Complete_BPMN.pmx | disable | 3 |
|
||||||
| /home/wendy/uploadfiles/Process_Complete_BPMN.pmx | keep |
|
| /home/wendy/uploadfiles/Process_Complete_BPMN.pmx | keep | 4 |
|
||||||
|
|
||||||
|
|
||||||
#Verificar cantidad de dynaform, output, inputs, triggers, asignacion de usuarios, etc.
|
#Verificar cantidad de dynaform, output, inputs, triggers, asignacion de usuarios, etc.
|
||||||
|
|
||||||
Scenario: Get a List DynaForms of a Project Process Complete BPMN
|
Scenario Outline: Get a List DynaForms of a Project Process Complete BPMN
|
||||||
Given I request "project/1455892245368ebeb11c1a5001393784/dynaforms"
|
Given I request "project/prj_uid/dynaforms" with the key "prj_uid" stored in session array as variable "prj_uid_<prj_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"
|
||||||
And the type is "array"
|
And the type is "array"
|
||||||
And the response has 26 records
|
And the response has <records> records
|
||||||
|
|
||||||
Scenario: Get the Input Documents List when there are exactly zero input documents
|
Examples:
|
||||||
Given I request "project/1455892245368ebeb11c1a5001393784/input-documents"
|
| import_option | prj_uid_number | prj_uid | records |
|
||||||
And the content type is "application/json"
|
| create | 1 | 601816709536cfeae7d7cd9079578104 | 2 |
|
||||||
Then the response status code should be 200
|
| overwrite | 2 | 1455892245368ebeb11c1a5001393784 | 26 |
|
||||||
And the response charset is "UTF-8"
|
| disable | 3 | 1455892245368ebeb11c1a5001393784 | 26 |
|
||||||
And the type is "array"
|
| keep | 4 | 1455892245368ebeb11c1a5001393784 | 26 |
|
||||||
And the response has 1 records
|
|
||||||
|
|
||||||
Scenario: Get the Output Documents List when there are exactly two output documents
|
|
||||||
Given I request "project/1455892245368ebeb11c1a5001393784/output-documents"
|
|
||||||
Then the response status code should be 200
|
|
||||||
And the response charset is "UTF-8"
|
|
||||||
And the content type is "application/json"
|
|
||||||
And the type is "array"
|
|
||||||
And the response has 1 records
|
|
||||||
|
|
||||||
Scenario: Get the Triggers List when there are exactly two triggers
|
Scenario Outline: Get the Input Documents List when there are exactly zero input documents
|
||||||
Given I request "project/1455892245368ebeb11c1a5001393784/triggers"
|
Given I request "project/prj_uid/input-documents" with the key "prj_uid" stored in session array as variable "prj_uid_<prj_uid_number>"
|
||||||
|
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 response has <records> records
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| import_option | prj_uid_number | prj_uid | records |
|
||||||
|
| create | 1 | 601816709536cfeae7d7cd9079578104 | 0 |
|
||||||
|
| overwrite | 2 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| disable | 3 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| keep | 4 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario Outline: Get the Output Documents List when there are exactly two output documents
|
||||||
|
Given I request "project/prj_uid/output-documents" with the key "prj_uid" stored in session array as variable "prj_uid_<prj_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 response has 3 records
|
And the response has <records> records
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| import_option | prj_uid_number | prj_uid | records |
|
||||||
|
| create | 1 | 601816709536cfeae7d7cd9079578104 | 0 |
|
||||||
|
| overwrite | 2 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| disable | 3 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| keep | 4 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario Outline: Get the Triggers List when there are exactly two triggers
|
||||||
|
Given I request "project/prj_uid/triggers" with the key "prj_uid" stored in session array as variable "prj_uid_<prj_uid_number>"
|
||||||
|
Then the response status code should be 200
|
||||||
|
And the response charset is "UTF-8"
|
||||||
|
And the content type is "application/json"
|
||||||
|
And the type is "array"
|
||||||
|
And the response has <records> records
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| import_option | prj_uid_number | prj_uid | records |
|
||||||
|
| create | 1 | 601816709536cfeae7d7cd9079578104 | 0 |
|
||||||
|
| overwrite | 2 | 1455892245368ebeb11c1a5001393784 | 3 |
|
||||||
|
| disable | 3 | 1455892245368ebeb11c1a5001393784 | 3 |
|
||||||
|
| keep | 4 | 1455892245368ebeb11c1a5001393784 | 3 |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: List assignees of each activity
|
Scenario Outline: List assignees of each activity
|
||||||
Given I request "project/1455892245368ebeb11c1a5001393784/activity/<activity>/assignee"
|
Given I request "project/prj_uid/activity/<activity>/assignee" with the key "prj_uid" stored in session array as variable "prj_uid_<prj_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"
|
||||||
@@ -185,33 +218,60 @@ Scenario Outline: List assignees of each activity
|
|||||||
And the "aas_type" property in row 0 equals "<aas_type>"
|
And the "aas_type" property in row 0 equals "<aas_type>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| test_description | project | activity | records | aas_uid | aas_type |
|
| import_option | prj_uid_number | prj_uid | records | project | activity | records | aas_uid | aas_type |
|
||||||
| Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group |
|
| create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | 601816709536cfeae7d7cd9079578104 | 771350954536cfec446fab9019867857 | 1 | 70084316152d56749e0f393054862525 | group |
|
||||||
| Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | 1 | 70084316152d56749e0f393054862525 | group |
|
| overwrite | 2 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group |
|
||||||
|
| disable | 3 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | 1 | 70084316152d56749e0f393054862525 | group |
|
||||||
|
| keep | 4 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 2072984565368efc137a394001073529 | 1 | 70084316152d56749e0f393054862525 | group |
|
||||||
|
|
||||||
Scenario: Get a List of current process supervisors of a project
|
|
||||||
Given I request "project/1455892245368ebeb11c1a5001393784/process-supervisors"
|
Scenario Outline: Get a List of current process supervisors of a project
|
||||||
|
Given I request "project/prj_uid/process-supervisors" stored in session array as variable "prj_uid_<prj_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 response has 1 records
|
And the response has <records> records
|
||||||
|
|
||||||
Scenario: Get a List of current Process Permissions of a project
|
Examples:
|
||||||
Given I request "project/1455892245368ebeb11c1a5001393784/process-permissions"
|
| import_option | prj_uid_number | prj_uid | records |
|
||||||
|
| create | 1 | 601816709536cfeae7d7cd9079578104 | 0 |
|
||||||
|
| overwrite | 2 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| disable | 3 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| keep | 4 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario Outline: Get a List of current Process Permissions of a project
|
||||||
|
Given I request "project/prj_uid/process-permissions" stored in session array as variable "prj_uid_<prj_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 response has 1 record
|
And the response has <records> records
|
||||||
|
|
||||||
Scenario: Get a list templates folder of process files manager
|
Examples:
|
||||||
Given I request "project/1455892245368ebeb11c1a5001393784/file-manager?path=templates"
|
| import_option | prj_uid_number | prj_uid | records |
|
||||||
|
| create | 1 | 601816709536cfeae7d7cd9079578104 | 0 |
|
||||||
|
| overwrite | 2 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| disable | 3 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| keep | 4 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario Outline: Get a list templates folder of process files manager
|
||||||
|
Given I request "project/prj_uid/file-manager?path=templates" stored in session array as variable "prj_uid_<prj_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 response has 1 records
|
And the response has <records> records
|
||||||
|
|
||||||
Scenario: Get a single Process
|
Examples:
|
||||||
|
| import_option | prj_uid_number | prj_uid | records |
|
||||||
|
| create | 1 | 601816709536cfeae7d7cd9079578104 | 0 |
|
||||||
|
| overwrite | 2 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| disable | 3 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
| keep | 4 | 1455892245368ebeb11c1a5001393784 | 1 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Get a single Process process "Process Complete BPMN"
|
||||||
Given that I want to get a resource with the key "obj_uid" stored in session array
|
Given that I want to get a resource with the key "obj_uid" stored in session array
|
||||||
And I request "project/1455892245368ebeb11c1a5001393784/process"
|
And I request "project/1455892245368ebeb11c1a5001393784/process"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
@@ -246,3 +306,65 @@ Scenario: Get a single Process
|
|||||||
And that "pro_derivation_screen_tpl" is set to ""
|
And that "pro_derivation_screen_tpl" is set to ""
|
||||||
And that "pro_summary_dynaform" is set to "898822326536be3a12addb0034537553"
|
And that "pro_summary_dynaform" is set to "898822326536be3a12addb0034537553"
|
||||||
And that "pro_calendar" is set to "14606161052f50839307899033145440"
|
And that "pro_calendar" is set to "14606161052f50839307899033145440"
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Get a single Process process "Process NewCreate BPMN"
|
||||||
|
Given that I want to get a resource with the key "obj_uid" stored in session array
|
||||||
|
And I request "project/601816709536cfeae7d7cd9079578104/process"
|
||||||
|
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 "pro_title" is set to "Process NewCreate BPMN"
|
||||||
|
And that "pro_description" is set to ""
|
||||||
|
And that "pro_parent" is set to "601816709536cfeae7d7cd9079578104"
|
||||||
|
And that "pro_time" is set to 1
|
||||||
|
And that "pro_timeunit" is set to "DAYS"
|
||||||
|
And that "pro_status" is set to "ACTIVE"
|
||||||
|
And that "pro_type_day" is set to ""
|
||||||
|
And that "pro_type" is set to "NORMAL"
|
||||||
|
And that "pro_assignment" is set to 0
|
||||||
|
And that "pro_show_map" is set to 0
|
||||||
|
And that "pro_show_message" is set to 0
|
||||||
|
And that "pro_subprocess" is set to 0
|
||||||
|
And that "pro_tri_deleted" is set to ""
|
||||||
|
And that "pro_tri_canceled" is set to ""
|
||||||
|
And that "pro_tri_paused" is set to ""
|
||||||
|
And that "pro_tri_reassigned" is set to ""
|
||||||
|
And that "pro_show_delegate" is set to 0
|
||||||
|
And that "pro_show_dynaform" is set to 0
|
||||||
|
And that "pro_category" is set to ""
|
||||||
|
And that "pro_sub_category" is set to ""
|
||||||
|
And that "pro_industry" is set to 0
|
||||||
|
And that "pro_update_date" is set to "null"
|
||||||
|
And that "pro_create_date" is set to "2014-05-12 09:10:23"
|
||||||
|
And that "pro_create_user" is set to "00000000000000000000000000000001"
|
||||||
|
And that "pro_debug" is set to 0
|
||||||
|
And that "pro_derivation_screen_tpl" is set to ""
|
||||||
|
And that "pro_summary_dynaform" is set to ""
|
||||||
|
And that "pro_calendar" is set to ""
|
||||||
|
|
||||||
|
|
||||||
|
Scenario Outline: Delete a Project created previously in this script
|
||||||
|
Given that I want to delete a resource with the key "prj_uid" stored in session array as variable "prj_uid_<prj_uid_number>"
|
||||||
|
And I request "projects"
|
||||||
|
And the content type is "application/json"
|
||||||
|
Then the response status code should be 200
|
||||||
|
And the response charset is "UTF-8"
|
||||||
|
And the type is "object"
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
| prj_uid_number |
|
||||||
|
| 1 |
|
||||||
|
| 2 |
|
||||||
|
| 3 |
|
||||||
|
| 4 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Get a list of projects
|
||||||
|
Given I request "project"
|
||||||
|
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"
|
||||||
@@ -1531,9 +1531,9 @@ class RestContext extends BehatContext
|
|||||||
/**
|
/**
|
||||||
* @Given /^POST upload a project file "([^"]*)" to "([^"]*)"$/
|
* @Given /^POST upload a project file "([^"]*)" to "([^"]*)"$/
|
||||||
*/
|
*/
|
||||||
public function postUploadAProjectFile($file, $url, PyStringNode $string)
|
public function postUploadAProjectFile($file, $url)
|
||||||
{
|
{
|
||||||
$postFields = json_decode($string);
|
$postFields = new StdClass();
|
||||||
$postFields->project_file ='@'.$file;
|
$postFields->project_file ='@'.$file;
|
||||||
|
|
||||||
$this->_restObjectMethod = 'post';
|
$this->_restObjectMethod = 'post';
|
||||||
|
|||||||
Reference in New Issue
Block a user