Merged in wnestor/processmaker (pull request #478)

Avance de los features import/export process
This commit is contained in:
Erik Amaru Ortiz
2014-05-09 17:09:28 -04:00
5 changed files with 248 additions and 46 deletions

View File

@@ -1,17 +0,0 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Export Process Main Tests
Requirements:
a workspace with the project 1455892245368ebeb11c1a5001393784 ("Process Complete BPMN") already loaded
there are many activities, steps, triggers, pmtables, asignee, events, etc. in the process
Background:
Given that I have a valid access_token
Scenario: Get for Export Project
Given I request "project/1455892245368ebeb11c1a5001393784/export"
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"

View File

@@ -0,0 +1,248 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Import/Export Process Main Tests
Requirements:
a workspace without the project 1455892245368ebeb11c1a5001393784 ("Process Complete BPMN") already loaded
there are many activities, steps, triggers, pmtables, asignee, events, etc. in the process
Background:
Given that I have a valid access_token
Scenario: Get for Export Project
Given I request "project/1455892245368ebeb11c1a5001393784/export"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/xml"
And the type is "array"
#Verificar cantidad de dynaform, output, inputs, triggers, asignacion de usuarios, etc.
Scenario: Get a List DynaForms of a Project Process Complete BPMN
Given I request "project/1455892245368ebeb11c1a5001393784/dynaforms"
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 26 records
Scenario: Get the Input Documents List when there are exactly zero input documents
Given I request "project/1455892245368ebeb11c1a5001393784/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 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
Given I request "project/1455892245368ebeb11c1a5001393784/triggers"
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 3 records
Scenario Outline: List assignees of each activity
Given I request "project/1455892245368ebeb11c1a5001393784/activity/<activity>/assignee"
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
And the "aas_uid" property in row 0 equals "<aas_uid>"
And the "aas_type" property in row 0 equals "<aas_type>"
Examples:
| test_description | project | activity | records | aas_uid | aas_type |
| Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group |
| Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | 1 | 70084316152d56749e0f393054862525 | group |
Scenario: Get a List of current process supervisors of a project
Given I request "project/1455892245368ebeb11c1a5001393784/process-supervisors"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has 1 records
Scenario: Get a List of current Process Permissions of a project
Given I request "project/1455892245368ebeb11c1a5001393784/process-permissions"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has 1 record
Scenario: Get a list templates folder of process files manager
Given I request "project/1455892245368ebeb11c1a5001393784/file-manager?path=templates"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has 1 records
Scenario: Get a single Process
Given that I want to get a resource with the key "obj_uid" stored in session array
And I request "project/1455892245368ebeb11c1a5001393784/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 Complete BPMN"
And that "pro_description" is set to ""
And that "pro_parent" is set to "1455892245368ebeb11c1a5001393784"
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 1
And that "pro_subprocess" is set to 0
And that "pro_tri_deleted" is set to "712197294536bea56a8b4d0014148679"
And that "pro_tri_canceled" is set to "950769923536bea6a39c833033416052"
And that "pro_tri_paused" is set to "350949312536bea73c53791057971272"
And that "pro_tri_reassigned" is set to "712197294536bea56a8b4d0014148679"
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 "4177095085330818c324501061677193"
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-06 10:04:27"
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 "898822326536be3a12addb0034537553"
And that "pro_calendar" is set to "14606161052f50839307899033145440"
#Import Process
Scenario Outline: Import a process
Given POST upload a project file "<project_file>" to "project/import?option=<import_option>"
Then the response status code should be 201
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "object"
Examples:
| project_file | import_option |
| /home/wendy/uploadfiles/Process_NewCreate_BPMN.pmx | create |
| /home/wendy/uploadfiles/Process_Complete_BPMN.pmx | overwrite |
| /home/wendy/uploadfiles/Process_Complete_BPMN.pmx | disable |
| /home/wendy/uploadfiles/Process_Complete_BPMN.pmx | keep |
#Verificar cantidad de dynaform, output, inputs, triggers, asignacion de usuarios, etc.
Scenario: Get a List DynaForms of a Project Process Complete BPMN
Given I request "project/1455892245368ebeb11c1a5001393784/dynaforms"
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 26 records
Scenario: Get the Input Documents List when there are exactly zero input documents
Given I request "project/1455892245368ebeb11c1a5001393784/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 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
Given I request "project/1455892245368ebeb11c1a5001393784/triggers"
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 3 records
Scenario Outline: List assignees of each activity
Given I request "project/1455892245368ebeb11c1a5001393784/activity/<activity>/assignee"
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
And the "aas_uid" property in row 0 equals "<aas_uid>"
And the "aas_type" property in row 0 equals "<aas_type>"
Examples:
| test_description | project | activity | records | aas_uid | aas_type |
| Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group |
| Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | 1 | 70084316152d56749e0f393054862525 | group |
Scenario: Get a List of current process supervisors of a project
Given I request "project/1455892245368ebeb11c1a5001393784/process-supervisors"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has 1 records
Scenario: Get a List of current Process Permissions of a project
Given I request "project/1455892245368ebeb11c1a5001393784/process-permissions"
Then the response status code should be 200
And the response charset is "UTF-8"
And the response has 1 record
Scenario: Get a list templates folder of process files manager
Given I request "project/1455892245368ebeb11c1a5001393784/file-manager?path=templates"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has 1 records
Scenario: Get a single Process
Given that I want to get a resource with the key "obj_uid" stored in session array
And I request "project/1455892245368ebeb11c1a5001393784/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 Complete BPMN"
And that "pro_description" is set to ""
And that "pro_parent" is set to "1455892245368ebeb11c1a5001393784"
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 1
And that "pro_subprocess" is set to 0
And that "pro_tri_deleted" is set to "712197294536bea56a8b4d0014148679"
And that "pro_tri_canceled" is set to "950769923536bea6a39c833033416052"
And that "pro_tri_paused" is set to "350949312536bea73c53791057971272"
And that "pro_tri_reassigned" is set to "712197294536bea56a8b4d0014148679"
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 "4177095085330818c324501061677193"
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-06 10:04:27"
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 "898822326536be3a12addb0034537553"
And that "pro_calendar" is set to "14606161052f50839307899033145440"

View File

@@ -1,29 +0,0 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Import Process Main Tests
Requirements:
a workspace without the project 1455892245368ebeb11c1a5001393784 ("Process Complete BPMN") already loaded
there are many activities, steps, triggers, pmtables, asignee, events, etc. in the process
Background:
Given that I have a valid access_token
Scenario: Get for Export Project
Given I request "project/1455892245368ebeb11c1a5001393784/export"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
Scenario Outline: Import a process
Given POST upload a project file "<project_file>" to "project/import?option=<import_option>"
Then the response status code should be 201
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "object"
Examples:
| project_file | import_option |
| /home/wendy/processFiles/process1.pmx | create |