diff --git a/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature b/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature index bfdd20bdb..efa6aaabe 100644 --- a/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature +++ b/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature @@ -59,7 +59,8 @@ Scenario Outline: Create a 13 case scheduler for a project | Create with One time only | 12 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-One Time only 678%$@ | 4 | | | 20:00 | | | | | | | | Create with Every | 13 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Every 987&%@ | 5 | | | | | | | | | 12.30 | | Create with Daily - Test BUG 15316 | 14 | admin | 46941969352af5be2ab3f39001216717 | Bug 15316 | 1 | 2014-01-30 | | 12:00 | | | | | | | - + | Test BUG 15330, 15331: Every format in the properties Invalid Start Timer | 15 | admin | 46941969352af5be2ab3f39001216717 | BUG 15330 | 5 | | | | | | | | | 1.00 | + Scenario: Create a new case scheduler with same name Given POST this data: @@ -82,7 +83,7 @@ Scenario: Create a new case scheduler with same name """ And I request "project/1265557095225ff5c688f46031700471/case-scheduler" Then the response status code should be 400 - And the response status message should have the following text "Duplicate Case Scheduler name" + And the response status message should have the following text "duplicate" Scenario: Get the case schedulers list when there are exactly 13 case schedulers @@ -91,7 +92,7 @@ Scenario: Get the case schedulers list when there are exactly 13 case schedulers And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has 14 record + And the response has 15 record Scenario Outline: Update the case schedulers for a project and then check if the values had changed @@ -184,6 +185,7 @@ Scenario Outline: Delete all case scheduler of a project created previously in t | 12 | | 13 | | 14 | + | 15 | diff --git a/features/backend/projects/variables/basic_sequence_variables.feature b/features/backend/projects/variables/basic_sequence_variables.feature index 5a413cf46..1a931066c 100644 --- a/features/backend/projects/variables/basic_sequence_variables.feature +++ b/features/backend/projects/variables/basic_sequence_variables.feature @@ -20,7 +20,7 @@ Feature: Process variables Resources """ { "var_name": "My Variable", - "var_field_type": "text_field", + "var_field_type": "string", "var_field_size": 12, "var_label": "Nombre:", "var_dbconnection": "", @@ -44,8 +44,8 @@ Feature: Process variables Resources And PUT this data: """ { - "var_name": "My Variable Modify", - "var_field_type": "text_field", + + "var_field_type": "string", "var_field_size": 1, "var_label": "Nombre modificado:", "var_dbconnection": "", diff --git a/features/backend/projects/variables/main_tests_variables.feature b/features/backend/projects/variables/main_tests_variables.feature index f6791b1e8..25d184af5 100644 --- a/features/backend/projects/variables/main_tests_variables.feature +++ b/features/backend/projects/variables/main_tests_variables.feature @@ -72,9 +72,9 @@ Scenario Outline: Update a process variable 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 | - | 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 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 | | | diff --git a/features/bootstrap/RestContext.php b/features/bootstrap/RestContext.php index 98dd105c2..69eb22afd 100644 --- a/features/bootstrap/RestContext.php +++ b/features/bootstrap/RestContext.php @@ -78,6 +78,10 @@ class RestContext extends BehatContext throw new \Exception('Parameters not loaded!'); } else { $parameters = $this->_parameters; + + if(($name=="uploadFilesFolder")&&(!isset($parameters[$name]) ) ){ + $parameters[$name] = "/opt/uploadfiles/"; + } return (isset($parameters[$name])) ? $parameters[$name] : null; } } @@ -1362,7 +1366,7 @@ class RestContext extends BehatContext */ public function postIWantToUploadTheFileToPathPublicUrl($prfFile, $prfPath, $url) { - $prfFile = sys_get_temp_dir() . $prfFile; + $prfFile = $this->getParameter('uploadFilesFolder') . $prfFile; $baseUrl = $this->getParameter('base_url'); $url = $baseUrl.$url; $accesstoken = $this->getParameter('access_token'); @@ -1422,7 +1426,7 @@ class RestContext extends BehatContext */ public function postIWantToUploadTheImageToUser($imageFile, $usrUid, $url) { - $imageFile = sys_get_temp_dir() . $imageFile; + $imageFile = $this->getParameter('uploadFilesFolder') . $imageFile; $baseUrl = $this->getParameter('base_url'); $url = $baseUrl.$url.$usrUid."/image-upload"; @@ -1464,7 +1468,7 @@ class RestContext extends BehatContext } $usrUid = $varValue; - $imageFile = sys_get_temp_dir() . $imageFile; + $imageFile = $imageFile; $this->postIWantToUploadTheImageToUser($imageFile, $usrUid, $url); } @@ -1521,7 +1525,7 @@ class RestContext extends BehatContext */ public function postUploadAnInputDocumentTo($file, $url, PyStringNode $string) { - $file = sys_get_temp_dir() . $file; + $file = $this->getParameter('uploadFilesFolder') . $file; $postFields = json_decode($string); $postFields->form ='@'.$file; @@ -1537,7 +1541,7 @@ class RestContext extends BehatContext */ public function postUploadAProjectFile($file, $url) { - $file = sys_get_temp_dir() . $file; + $file = $this->getParameter('uploadFilesFolder') . $file; $postFields = new StdClass(); $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"; $this->printDebug("Exporting process to: $exportedProcessFileName"); @@ -1661,8 +1665,8 @@ class RestContext extends BehatContext { $postFields = json_decode($string); - if ((isset($postFields->dyn_content))&&(file_exists(sys_get_temp_dir() . $postFields->dyn_content))) { - $postFields->dyn_content = sys_get_temp_dir() . $postFields->dyn_content; + if ((isset($postFields->dyn_content))&&(file_exists($this->getParameter('uploadFilesFolder') . $postFields->dyn_content))) { + $postFields->dyn_content = $this->getParameter('uploadFilesFolder') . $postFields->dyn_content; $this->printDebug("Extracting dyanform content from: ".$postFields->dyn_content."\n"); $postFields->dyn_content = file_get_contents($postFields->dyn_content); @@ -1683,8 +1687,8 @@ class RestContext extends BehatContext { $postFields = json_decode($string); - if ((isset($postFields->dyn_content))&&(file_exists(sys_get_temp_dir() . $postFields->dyn_content))) { - $postFields->dyn_content = sys_get_temp_dir() . $postFields->dyn_content; + if ((isset($postFields->dyn_content))&&(file_exists($this->getParameter('uploadFilesFolder') . $postFields->dyn_content))) { + $postFields->dyn_content = $this->getParameter('uploadFilesFolder') . $postFields->dyn_content; $this->printDebug("Extracting dyanform content from: ".$postFields->dyn_content."\n"); $postFields->dyn_content = file_get_contents($postFields->dyn_content);