Modificacion en feature step, adhoc y adicion de nuevos escenarios en el feature project y project import export
This commit is contained in:
@@ -175,7 +175,7 @@ Scenario Outline: BUG 15041 Get the list of available users and groups to be ass
|
||||
|
||||
Examples:
|
||||
| test_description | project | activity | filter | start | limit | records |
|
||||
| "Accounting" group is available | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | Accounting | 0 | 50 | 0 |
|
||||
| "Accounting" group is available Task2 | 4224292655297723eb98691001100052 | 68911670852a22d93c22c06005808422 | Accounting | 0 | 50 | 0 |
|
||||
|
||||
|
||||
Scenario: BUG 15041 Update Group to enable group
|
||||
|
||||
@@ -26,7 +26,7 @@ Scenario: Get definition of a project activity for obtent definition
|
||||
Scenario Outline: Create new Projects
|
||||
Given POST data from file "<project_template>"
|
||||
And I request "projects"
|
||||
Then the response status code should be 201
|
||||
#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 "array"
|
||||
@@ -35,6 +35,11 @@ Scenario Outline: Create new Projects
|
||||
And store "new_uid" in session array as variable "activity_new_uid_<project_new_uid_number>" where an object has "object" equal to "activity"
|
||||
And store "new_uid" in session array as variable "event_new_uid_<project_new_uid_number>" where an object has "object" equal to "event"
|
||||
And store "new_uid" in session array as variable "flow_new_uid_<project_new_uid_number>" where an object has "object" equal to "flow"
|
||||
And store "new_uid" in session array as variable "artifacts_new_uid_<project_new_uid_number>" where an object has "object" equal to "artifacts"
|
||||
And store "new_uid" in session array as variable "data_new_uid_<project_new_uid_number>" where an object has "object" equal to "data"
|
||||
And store "new_uid" in session array as variable "participants_new_uid_<project_new_uid_number>" where an object has "object" equal to "participants"
|
||||
|
||||
|
||||
|
||||
|
||||
Examples:
|
||||
@@ -46,6 +51,7 @@ Scenario Outline: Create new Projects
|
||||
| Create a new process with selection derivation | 4 | process_template_selection.json |
|
||||
| Create a new process with sequencial derivation | 5 | process_template_sequencial.json |
|
||||
| Create a new process Complete | 6 | process_template_complete.json |
|
||||
| Create a new process with DataStore, DataObject and Participant | 7 | process_template_with_DATA_participant.json |
|
||||
|
||||
|
||||
Scenario Outline: Create new Projects with same name (negative test)
|
||||
@@ -698,11 +704,86 @@ Scenario Outline: Get definition of a project
|
||||
And that "prj_name" is set to "Update Evaluation"
|
||||
And that "prj_description" is set to "Update"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| project_new_uid_number |
|
||||
| 1 |
|
||||
|
||||
|
||||
Scenario Outline: Get definition of a project
|
||||
Given that I want to get a resource with the key "new_uid" stored in session array as variable "project_new_uid_<project_new_uid_number>" in position 0
|
||||
And 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 "object"
|
||||
And that "prj_name" is set to "Update Evaluation"
|
||||
And that "prj_description" is set to "Update"
|
||||
And that "par_name" property in object "participants" equals "abcd"
|
||||
|
||||
|
||||
Examples:
|
||||
|
||||
| project_new_uid_number |
|
||||
| 7 |
|
||||
|
||||
|
||||
#Test of successful export and import of objects "Data Object, Data Store, Black Box and Text"
|
||||
|
||||
Scenario: Get for Export Project - Test process NEW
|
||||
Given that I want to get a resource with the key "new_uid" stored in session array as variable "project_new_uid_<project_new_uid_number>" in position 0
|
||||
And I request "project/<project_uid>/export"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/xml"
|
||||
And save exported process to "/" as "Test process NEW.pmx"
|
||||
|
||||
|
||||
Scenario Outline: Delete a Project activity created previously in this script - Test process NEW
|
||||
Given that I want to delete a resource with the key "new_uid" stored in session array as variable "project_new_uid_<project_new_uid_number>" in position 0
|
||||
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:
|
||||
|
||||
| project_new_uid_number |
|
||||
| 7 |
|
||||
|
||||
|
||||
Scenario Outline: Import a process - Test process NEW
|
||||
Given POST upload a project file "<project_file>" to "project/import?option=<import_option>&option_group=merge"
|
||||
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"
|
||||
And store "prj_uid" in session array as variable "prj_uid_<prj_uid_number>"
|
||||
|
||||
|
||||
Examples:
|
||||
| project_file | import_option | prj_uid_number |
|
||||
| Process_NewCreate_BPMN.pmx | create | 7 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Culmination of test objects for Objects "Data, Data Store, Black Box and Text"
|
||||
|
||||
|
||||
Scenario Outline: Delete a Project activity created previously in this script
|
||||
Given that I want to delete a resource with the key "new_uid" stored in session array as variable "project_new_uid_<project_new_uid_number>" in position 0
|
||||
And I request "projects"
|
||||
@@ -720,6 +801,7 @@ Scenario Outline: Delete a Project activity created previously in this script
|
||||
| 4 |
|
||||
| 5 |
|
||||
| 6 |
|
||||
| 7 |
|
||||
|
||||
|
||||
Scenario: Get a list of projects
|
||||
|
||||
@@ -166,6 +166,34 @@ Scenario Outline: Import a process
|
||||
| Process_Complete_BPMN.pmx | overwrite | 3 |
|
||||
| Process_Complete_BPMN.pmx | disable | 4 |
|
||||
| Process_Complete_BPMN.pmx | keep | 5 |
|
||||
| Test_Event_without_name.pmx | create | 6 |
|
||||
|
||||
#Verificar que se hayan exportado los eventos de forma correcta
|
||||
|
||||
Scenario: Get a single Process process "Test_Event_without_name.pmx"
|
||||
Given that I want to get a resource with the key "prj_uid" stored in session array as variable "prj_uid_<prj_uid_number>"
|
||||
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 "prj_name" is set to "Test Event without name"
|
||||
And that "evn_uid" is set to "51368855353d127b52c8904071509317"
|
||||
And that "evn_name" is set to ""
|
||||
And that "evn_uid" is set to "89601044553d127b52634d4017150624"
|
||||
And that "evn_name" is set to ""
|
||||
And that "flo_element_origin" is set to "89601044553d127b52634d4017150624"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Verificar cantidad de dynaform, output, inputs, triggers, asignacion de usuarios, etc.
|
||||
|
||||
@@ -68,31 +68,19 @@ Feature: Project Properties - Step Resources Main Tests
|
||||
And the response status message should have the following text "exists"
|
||||
|
||||
|
||||
Scenario Outline: Try delete a Input Document when it is assigned to a step
|
||||
Given that I want to delete a resource with the key "step_uid" stored in session array as variable "step_uid_<step_number>"
|
||||
And I request "project/16062437052cd6141881e06088349078/input-document"
|
||||
And the content type is "application/json"
|
||||
Scenario: Try delete a Input Document when it is assigned to a step
|
||||
Given that I want to delete a "InputDocument"
|
||||
And I request "project/16062437052cd6141881e06088349078/input-document/83199959452cd62589576c1018679557"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "assigned"
|
||||
|
||||
Examples:
|
||||
|
||||
| step_number |
|
||||
| 2 |
|
||||
|
||||
|
||||
Scenario Outline: Try delete a Output document when it is assigned to a step
|
||||
Given that I want to delete a resource with the key "step_uid" stored in session array as variable "step_uid_<step_number>"
|
||||
And I request "project/16062437052cd6141881e06088349078/output-document"
|
||||
And the content type is "application/json"
|
||||
Scenario: Try delete a Output document when it is assigned to a step
|
||||
Given that I want to delete a "OutputDocument"
|
||||
And I request "project/16062437052cd6141881e06088349078/output-document/32743823452cd63105006e1076595203"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "assigned"
|
||||
|
||||
Examples:
|
||||
|
||||
| step_number |
|
||||
| 3 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Update the five steps and then check if the values had changed
|
||||
|
||||
@@ -1629,8 +1629,56 @@ class RestContext extends BehatContext
|
||||
}
|
||||
if (!$swFound) {
|
||||
//print_r($this->_data);
|
||||
throw new \Exception("JSON Response does not have '$varName' property\n\n" );
|
||||
$this->printDebug("JSON Response does not have '$sessionVarName' property\n\n");
|
||||
//throw new \Exception("JSON Response does not have '$sessionVarName' property\n\n" );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^that "([^"]*)" property in object "([^"]*)" equals "([^"]*)"$/
|
||||
*/
|
||||
public function thatPropertyInObjectEquals($propertyName, $propertyParent, $value)
|
||||
{
|
||||
$data = $this->_data;
|
||||
if (empty($data)) {
|
||||
throw new Exception("Response is empty or was not JSON\n\n"
|
||||
. $this->_response->getBody(true));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($data->$propertyParent)) {
|
||||
throw new Exception("Response has not the property '$propertyParent'\n\n"
|
||||
. $this->_response->getBody(true));
|
||||
return;
|
||||
}
|
||||
|
||||
$data = $data->$propertyParent;
|
||||
|
||||
if (!empty($data)) {
|
||||
if (!is_object($data)) {
|
||||
throw new Exception("the $propertyParent in Response data is not an object!\n\n" );
|
||||
}
|
||||
if (!isset($data->$propertyName)) {
|
||||
throw new Exception("Property '"
|
||||
. $propertyName . "' is not set!\n\n"
|
||||
);
|
||||
}
|
||||
if (is_array($data->$propertyName)) {
|
||||
throw new Exception("$propertyName is an array and we expected a value\n\n"
|
||||
. $this->_response->getBody(true));
|
||||
}
|
||||
if ($data->$propertyName != $propertyValue) {
|
||||
throw new \Exception('Property value mismatch! (given: '
|
||||
. $propertyValue . ', match: '
|
||||
. $data->$propertyName . ")\n\n"
|
||||
);
|
||||
}
|
||||
} else {
|
||||
throw new Exception("Response was not JSON\n\n"
|
||||
. $this->_response->getBody(true));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/**
|
||||
* @Given /^save exported process to "([^"]*)"$/
|
||||
|
||||
Reference in New Issue
Block a user