Modificacion de los features variables
This commit is contained in:
@@ -20,7 +20,7 @@ Feature: Process variables Resources
|
|||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"var_name": "My Variable",
|
"var_name": "My Variable",
|
||||||
"var_field_type": "text_field",
|
"var_field_type": "string",
|
||||||
"var_field_size": 12,
|
"var_field_size": 12,
|
||||||
"var_label": "Nombre:",
|
"var_label": "Nombre:",
|
||||||
"var_dbconnection": "",
|
"var_dbconnection": "",
|
||||||
@@ -44,8 +44,8 @@ Feature: Process variables Resources
|
|||||||
And PUT this data:
|
And PUT this data:
|
||||||
"""
|
"""
|
||||||
{
|
{
|
||||||
"var_name": "My Variable Modify",
|
|
||||||
"var_field_type": "text_field",
|
"var_field_type": "string",
|
||||||
"var_field_size": 1,
|
"var_field_size": 1,
|
||||||
"var_label": "Nombre modificado:",
|
"var_label": "Nombre modificado:",
|
||||||
"var_dbconnection": "",
|
"var_dbconnection": "",
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ Scenario Outline: Update a process variable
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| test_description | var_uid_number | var_field_type | var_field_size | var_label | var_dbconnection | var_sql | var_null | var_default | var_accepted_values |
|
| test_description | var_uid_number | var_field_type | var_field_size | var_label | var_dbconnection | var_sql | var_null | var_default | var_accepted_values |
|
||||||
| Update a text | 1 | text | 12 | Texto 1 - Updated | | | 0 | | |
|
| Update a text | 1 | string | 12 | Texto 1 - Updated | | | 0 | | |
|
||||||
| Update a date | 2 | date | 10 | Fecha - Updated | | | 0 | | |
|
| Update a date | 2 | date | 10 | Fecha - Updated | | | 0 | | |
|
||||||
| Update a dropdown | 3 | dropdown | 12 | Dropdown 1 - Updated | | SELECT IC_UID, IC_NAME FROM ISO_COUNTRY | 0 | | |
|
| Update a dropdown | 3 | string | 12 | Dropdown 1 - Updated | | SELECT IC_UID, IC_NAME FROM ISO_COUNTRY | 0 | | |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,10 @@ class RestContext extends BehatContext
|
|||||||
throw new \Exception('Parameters not loaded!');
|
throw new \Exception('Parameters not loaded!');
|
||||||
} else {
|
} else {
|
||||||
$parameters = $this->_parameters;
|
$parameters = $this->_parameters;
|
||||||
|
|
||||||
|
if(($name=="uploadFilesFolder")&&(!isset($parameters[$name]) ) ){
|
||||||
|
$parameters[$name] = "/opt/uploadfiles/";
|
||||||
|
}
|
||||||
return (isset($parameters[$name])) ? $parameters[$name] : null;
|
return (isset($parameters[$name])) ? $parameters[$name] : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1362,7 +1366,7 @@ class RestContext extends BehatContext
|
|||||||
*/
|
*/
|
||||||
public function postIWantToUploadTheFileToPathPublicUrl($prfFile, $prfPath, $url)
|
public function postIWantToUploadTheFileToPathPublicUrl($prfFile, $prfPath, $url)
|
||||||
{
|
{
|
||||||
$prfFile = sys_get_temp_dir() . $prfFile;
|
$prfFile = $this->getParameter('uploadFilesFolder') . $prfFile;
|
||||||
$baseUrl = $this->getParameter('base_url');
|
$baseUrl = $this->getParameter('base_url');
|
||||||
$url = $baseUrl.$url;
|
$url = $baseUrl.$url;
|
||||||
$accesstoken = $this->getParameter('access_token');
|
$accesstoken = $this->getParameter('access_token');
|
||||||
@@ -1422,7 +1426,7 @@ class RestContext extends BehatContext
|
|||||||
*/
|
*/
|
||||||
public function postIWantToUploadTheImageToUser($imageFile, $usrUid, $url)
|
public function postIWantToUploadTheImageToUser($imageFile, $usrUid, $url)
|
||||||
{
|
{
|
||||||
$imageFile = sys_get_temp_dir() . $imageFile;
|
$imageFile = $this->getParameter('uploadFilesFolder') . $imageFile;
|
||||||
$baseUrl = $this->getParameter('base_url');
|
$baseUrl = $this->getParameter('base_url');
|
||||||
$url = $baseUrl.$url.$usrUid."/image-upload";
|
$url = $baseUrl.$url.$usrUid."/image-upload";
|
||||||
|
|
||||||
@@ -1464,7 +1468,7 @@ class RestContext extends BehatContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
$usrUid = $varValue;
|
$usrUid = $varValue;
|
||||||
$imageFile = sys_get_temp_dir() . $imageFile;
|
$imageFile = $imageFile;
|
||||||
|
|
||||||
$this->postIWantToUploadTheImageToUser($imageFile, $usrUid, $url);
|
$this->postIWantToUploadTheImageToUser($imageFile, $usrUid, $url);
|
||||||
}
|
}
|
||||||
@@ -1521,7 +1525,7 @@ class RestContext extends BehatContext
|
|||||||
*/
|
*/
|
||||||
public function postUploadAnInputDocumentTo($file, $url, PyStringNode $string)
|
public function postUploadAnInputDocumentTo($file, $url, PyStringNode $string)
|
||||||
{
|
{
|
||||||
$file = sys_get_temp_dir() . $file;
|
$file = $this->getParameter('uploadFilesFolder') . $file;
|
||||||
$postFields = json_decode($string);
|
$postFields = json_decode($string);
|
||||||
$postFields->form ='@'.$file;
|
$postFields->form ='@'.$file;
|
||||||
|
|
||||||
@@ -1537,7 +1541,7 @@ class RestContext extends BehatContext
|
|||||||
*/
|
*/
|
||||||
public function postUploadAProjectFile($file, $url)
|
public function postUploadAProjectFile($file, $url)
|
||||||
{
|
{
|
||||||
$file = sys_get_temp_dir() . $file;
|
$file = $this->getParameter('uploadFilesFolder') . $file;
|
||||||
$postFields = new StdClass();
|
$postFields = new StdClass();
|
||||||
$postFields->project_file ='@'.$file;
|
$postFields->project_file ='@'.$file;
|
||||||
|
|
||||||
@@ -1642,7 +1646,7 @@ class RestContext extends BehatContext
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
$destinationFolder = sys_get_temp_dir() . $destinationFolder;
|
$destinationFolder = $this->getParameter('uploadFilesFolder') . $destinationFolder;
|
||||||
$exportedProcessFileName = $destinationFolder.str_replace(" ","_",$exportedProcessFileName).".pmx";
|
$exportedProcessFileName = $destinationFolder.str_replace(" ","_",$exportedProcessFileName).".pmx";
|
||||||
|
|
||||||
$this->printDebug("Exporting process to: $exportedProcessFileName");
|
$this->printDebug("Exporting process to: $exportedProcessFileName");
|
||||||
@@ -1661,8 +1665,8 @@ class RestContext extends BehatContext
|
|||||||
{
|
{
|
||||||
$postFields = json_decode($string);
|
$postFields = json_decode($string);
|
||||||
|
|
||||||
if ((isset($postFields->dyn_content))&&(file_exists(sys_get_temp_dir() . $postFields->dyn_content))) {
|
if ((isset($postFields->dyn_content))&&(file_exists($this->getParameter('uploadFilesFolder') . $postFields->dyn_content))) {
|
||||||
$postFields->dyn_content = sys_get_temp_dir() . $postFields->dyn_content;
|
$postFields->dyn_content = $this->getParameter('uploadFilesFolder') . $postFields->dyn_content;
|
||||||
$this->printDebug("Extracting dyanform content from: ".$postFields->dyn_content."\n");
|
$this->printDebug("Extracting dyanform content from: ".$postFields->dyn_content."\n");
|
||||||
$postFields->dyn_content = file_get_contents($postFields->dyn_content);
|
$postFields->dyn_content = file_get_contents($postFields->dyn_content);
|
||||||
|
|
||||||
@@ -1683,8 +1687,8 @@ class RestContext extends BehatContext
|
|||||||
{
|
{
|
||||||
$postFields = json_decode($string);
|
$postFields = json_decode($string);
|
||||||
|
|
||||||
if ((isset($postFields->dyn_content))&&(file_exists(sys_get_temp_dir() . $postFields->dyn_content))) {
|
if ((isset($postFields->dyn_content))&&(file_exists($this->getParameter('uploadFilesFolder') . $postFields->dyn_content))) {
|
||||||
$postFields->dyn_content = sys_get_temp_dir() . $postFields->dyn_content;
|
$postFields->dyn_content = $this->getParameter('uploadFilesFolder') . $postFields->dyn_content;
|
||||||
$this->printDebug("Extracting dyanform content from: ".$postFields->dyn_content."\n");
|
$this->printDebug("Extracting dyanform content from: ".$postFields->dyn_content."\n");
|
||||||
$postFields->dyn_content = file_get_contents($postFields->dyn_content);
|
$postFields->dyn_content = file_get_contents($postFields->dyn_content);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user