Arreglos en los features file manager y project resources y adicion de una funcion en RestContext
This commit is contained in:
@@ -217,7 +217,7 @@ Scenario Outline: Delete folder
|
||||
|
||||
#BUG 15207, The "Upload" accepts files with other extensions
|
||||
|
||||
Scenario Outline: Upload files to same folders "Project - Process Complete BPMN"
|
||||
Scenario Outline: Upload files with incorret extension ".exe" - "Project - Process Complete BPMN"
|
||||
Given POST I want to upload the file "<file>" to path "<prf_path>". Url "project/1455892245368ebeb11c1a5001393784/file-manager"
|
||||
And store "prf_uid" in session array as variable "prf_uid_<prf_number>"
|
||||
And the response status message should have the following text "incorrect extension"
|
||||
|
||||
@@ -720,8 +720,7 @@ Scenario Outline: Get definition of a project
|
||||
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:
|
||||
|
||||
@@ -731,14 +730,18 @@ Scenario Outline: Get definition of a project
|
||||
|
||||
#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"
|
||||
Scenario Outline: Get for Export Project - Test process NEW
|
||||
Given I request "project/new_uid/export" with the key "new_uid" stored in session array as variable "project_new_uid_<project_new_uid_number>" in position 0
|
||||
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"
|
||||
|
||||
Examples:
|
||||
|
||||
| project_new_uid_number |
|
||||
| 7 |
|
||||
|
||||
|
||||
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
|
||||
@@ -765,7 +768,7 @@ Scenario Outline: Import a process - Test process NEW
|
||||
|
||||
Examples:
|
||||
| project_file | import_option | prj_uid_number |
|
||||
| Process_NewCreate_BPMN.pmx | create | 7 |
|
||||
| Process_NewCreate_BPMN.pmx | CREATE | 7 |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1311,6 +1311,36 @@ class RestContext extends BehatContext
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^I request "([^"]*)" with the key "([^"]*)" stored in session array as variable "([^"]*)" in position (\d+)$/
|
||||
*/
|
||||
public function iRequestWithTheKeyStoredInSessionArrayAsVariableInPosition($pageUrl, $varName, $sessionVarName, $position)
|
||||
{
|
||||
if (file_exists("session.data")) {
|
||||
$sessionData = json_decode(file_get_contents("session.data"));
|
||||
} else {
|
||||
$sessionData = array();
|
||||
}
|
||||
if (!isset($sessionData->$sessionVarName) ) {
|
||||
$varValue = '';
|
||||
} else {
|
||||
foreach ($sessionData->$sessionVarName as $key => $value) {
|
||||
if($key == $position){
|
||||
$varValue = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$pageUrl = str_replace($varName, $varValue, $pageUrl);
|
||||
|
||||
|
||||
$this->printDebug("URL: $pageUrl\n$varName = $varValue\nsessionVarName = $sessionVarName\n");
|
||||
|
||||
|
||||
$this->iRequest($pageUrl);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Given /^the property "([^"]*)" of "([^"]*)" is set to "([^"]*)"$/
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user