diff --git a/features/backend/process_variables/negative_tests_process_variables.feature b/features/backend/process_variables/negative_tests_process_variables.feature index 93eb76399..3e621a83f 100644 --- a/features/backend/process_variables/negative_tests_process_variables.feature +++ b/features/backend/process_variables/negative_tests_process_variables.feature @@ -5,13 +5,7 @@ Feature: Process Variables Negative Tests Background: Given that I have a valid access_token - - Scenario: Get all variables of a Process bad parameters (negative tests) - And I request "project/3306142435318cd22d1eba2015305561/variables" - Then the response status code should be 400 - - - Scenario Outline: Get all variables of a Grid bad parameters (negative tests) + Scenario Outline: Get all variables of a Grid bad parameters (negative tests) Given I request "project/14414793652a5d718b65590036026581/grid/00000000000000000000000000000000/variables" And the content type is "application/json" Then the response status code should be @@ -21,13 +15,4 @@ Feature: Process Variables Negative Tests Examples: | status_code | status_message | - | 400 | grid_uid | - - - Scenario: Get all variables of a Grid bad parameters (negative tests) - Given I request "project/3306142435318cd22d1eba2015305561/grid/8246998615318cd7cc451d2089449499/variables" - And that "var_name" is set to "desarrollo" - Then the response status code should be 400 - And the response status message should have the following text "var_name" - - \ No newline at end of file + | 400 | grid_uid | \ No newline at end of file diff --git a/features/backend/trigger_wizard/main_tests_trigger_wizards.feature b/features/backend/trigger_wizard/main_tests_trigger_wizards.feature index 907c410c2..15030ad55 100644 --- a/features/backend/trigger_wizard/main_tests_trigger_wizards.feature +++ b/features/backend/trigger_wizard/main_tests_trigger_wizards.feature @@ -20,17 +20,15 @@ Feature: Group And the "lib_class_name" property in row equals "" Examples: - | i | lib_name | lib_title | lib_class_name | - | 0 | pmFunctions | ProcessMaker Functions | class.pmFunctions.php | - | 1 | pmTrSharepoint | Sharepoint DWS Triggers v. 0.1 | class.pmTrSharepoint.pmFunctions.php | - | 2 | pmTrAlfresco | Alfresco DM Triggers v. 0.1 | class.pmTrAlfresco.pmFunctions.php | - | 3 | pmZimbra | Zimbra Triggers v. 0.1 | class.pmZimbra.pmFunctions.php | - | 4 | pmSugar | Sugar CRM Triggers | class.pmSugar.pmFunctions.php | - | 5 | pmTalend | Talend ETL Integration | class.pmTalend.pmFunctions.php | + | i | lib_name | lib_title | lib_class_name | + | 0 | pmFunctions | ProcessMaker Functions | class.pmFunctions.php | + | 1 | pmTrSharepoint | Sharepoint DWS Triggers v. 0.1 | class.pmTrSharepoint.pmFunctions.php | + | 2 | pmTrAlfresco | Alfresco DM Triggers v. 0.1 | class.pmTrAlfresco.pmFunctions.php | + | 3 | pmZimbra | Zimbra Triggers v. 0.1 | class.pmZimbra.pmFunctions.php | + | 4 | pmSugar | Sugar CRM Triggers | class.pmSugar.pmFunctions.php | + | 5 | pmTalend | Talend ETL Integration | class.pmTalend.pmFunctions.php | - - Scenario Outline: Get a single Library And I request "project/14414793652a5d718b65590036026581/trigger-wizard/" And the content type is "application/json" @@ -227,6 +225,7 @@ Scenario Outline: Create new Trigger: createDWS And that "tri_type" is set to "" Examples: + | i | lib_name | fn_name | tri_title | tri_description | tri_type | | 0 | pmFunctions | PMFAddAttachmentToArray | My trigger... | ... | SCRIPT | | 1 | pmTrSharepoint | createDWS | Test DWS | | SCRIPT | diff --git a/features/backend/trigger_wizard/negative_tests_triggers_wizards.feature b/features/backend/trigger_wizard/negative_tests_triggers_wizards.feature index 8b5240dd1..cb6a05cb7 100644 --- a/features/backend/trigger_wizard/negative_tests_triggers_wizards.feature +++ b/features/backend/trigger_wizard/negative_tests_triggers_wizards.feature @@ -47,7 +47,7 @@ Feature: Triggers Wizard Negative Tests | Field required project | | pmFunctions | PMFAddAttachmentToArray | My trigger | sample | SCRIPT | array(1, 2) | 1 | 2 | My Copy({i}) | $respuesta | 400 | prj_uid | | Field required tri_title | 14414793652a5d718b65590036026581 | pmFunctions | PMFAddAttachmentToArray | | sample | SCRIPT | array(1, 2) | 1 | 2 | My Copy({i}) | $respuesta | 400 | tri_title | | Field required tri_type | 14414793652a5d718b65590036026581 | pmFunctions | PMFAddAttachmentToArray | My trigger | sample | | array(1, 2) | 1 | 2 | My Copy({i}) | $respuesta | 400 | tri_type | - | Field required tri_params input | 14414793652a5d718b65590036026581 | pmFunctions | PMFAddAttachmentToArray | My trigger | sample | SCRIPT | | | | | $respuesta | 400 | tri_params | - | Field required tri_params output | 14414793652a5d718b65590036026581 | pmFunctions | PMFAddAttachmentToArray | My trigger | sample | SCRIPT | array(1, 2) | 1 | 2 | My Copy({i}) | | 400 | tri_params | + | Field required tri_params input | 14414793652a5d718b65590036026581 | pmFunctions | PMFAddAttachmentToArray | My trigger | sample | SCRIPT | | | | | $respuesta | 400 | arrayData | + | Field required tri_params output | 14414793652a5d718b65590036026581 | pmFunctions | PMFAddAttachmentToArray | My trigger | sample | SCRIPT | array(1, 2) | 1 | 2 | My Copy({i}) | | 400 | tri_answer | | Invalid lib_name | 14414793652a5d718b65590036026581 | processmakerfunction | PMFAddAttachmentToArray | My trigger | sample | SCRIPT | array(1, 2) | 1 | 2 | My Copy({i}) | $respuesta | 400 | lib_name | | Invalid tri_type | 14414793652a5d718b65590036026581 | pmFunctions | PMFAddAttachmentToArray | My trigger | sample | sample | array(1, 2) | 1 | 2 | My Copy({i}) | $respuesta | 400 | tri_type | \ No newline at end of file diff --git a/features/bootstrap/RestContext.php b/features/bootstrap/RestContext.php index e64ef88b0..2a18f6846 100644 --- a/features/bootstrap/RestContext.php +++ b/features/bootstrap/RestContext.php @@ -931,6 +931,11 @@ class RestContext extends BehatContext */ public function theResponseStatusCodeShouldBe($httpStatus) { + if(!(isset($this->_response))){ + throw new \Exception('HTTP code does not match ' . $httpStatus . + ' (actual: No response defined)' + ); + } if ((string)$this->_response->getStatusCode() !== $httpStatus) { $message=""; if($bodyResponse=json_decode($this->_response->getBody(true))){