Modificaciones a los features process variables, trigger wizard

This commit is contained in:
Wendy Nestor
2014-03-07 16:11:17 -04:00
parent 8a651c6c49
commit bafcc03075
4 changed files with 17 additions and 28 deletions

View File

@@ -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 <status_code>
@@ -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"
| 400 | grid_uid |

View File

@@ -20,17 +20,15 @@ Feature: Group
And the "lib_class_name" property in row <i> equals "<lib_class_name>"
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/<lib_name>"
And the content type is "application/json"
@@ -227,6 +225,7 @@ Scenario Outline: Create new Trigger: createDWS
And that "tri_type" is set to "<tri_type>"
Examples:
| i | lib_name | fn_name | tri_title | tri_description | tri_type |
| 0 | pmFunctions | PMFAddAttachmentToArray | My trigger... | ... | SCRIPT |
| 1 | pmTrSharepoint | createDWS | Test DWS | | SCRIPT |

View File

@@ -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 |

View File

@@ -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))){