Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
@@ -121,7 +121,6 @@ Feature: Activity Resources Main Tests
|
||||
And the property "tas_assign_type" of "properties" is set to "<tas_assign_type>"
|
||||
And the property "tas_assign_variable" of "properties" is set to "<tas_assign_variable>"
|
||||
And the property "tas_group_variable" of "properties" is set to "<tas_group_variable>"
|
||||
And the property "tas_selfservice_timeout" of "properties" is set to <tas_selfservice_timeout>
|
||||
And the property "tas_selfservice_time" of "properties" is set to "<tas_selfservice_time>"
|
||||
And the property "tas_selfservice_time_unit" of "properties" is set to "<tas_selfservice_time_unit>"
|
||||
And the property "tas_transfer_fly" of "properties" is set to "<tas_transfer_fly>"
|
||||
|
||||
@@ -31,7 +31,7 @@ Feature: Files Manager Resources Main Tests
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 1 records
|
||||
And the response has 2 records
|
||||
|
||||
Scenario Outline: Create files and subfolders
|
||||
Given POST this data:
|
||||
@@ -99,12 +99,12 @@ Feature: Files Manager Resources Main Tests
|
||||
And the content type is "application/json"
|
||||
And the type is "<type>"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_filename | prf_content | http_code | type | prf_number |
|
||||
| put into public folder | file_test_1.txt | only text - modified | 200 | object | 0 |
|
||||
| put into mailtemplates folder | file_test_2.html | <h1>Test</h1><p>html test</p><i>modified</i> | 200 | object | 1 |
|
||||
| put into public subfolder | file_test_3 | put test | 200 | object | 2 |
|
||||
| put into mailtemplates subfolder | file_test_4 | put test | 200 | object | 3 |
|
||||
Examples:
|
||||
| test_description | prf_filename | prf_content | http_code | type | prf_number |
|
||||
| put into public folder | file_test_1.txt | only text - modified | 200 | object | 0 |
|
||||
| put into mailtemplates folder | file_test_2.html | <h1>Test</h1><p>html test</p><i>modified</i> | 200 | object | 1 |
|
||||
| put into public subfolder | file_test_3 | put test | 200 | object | 2 |
|
||||
| put into mailtemplates subfolder | file_test_4 | put test | 200 | object | 3 |
|
||||
|
||||
|
||||
Scenario Outline: Get a single Files Manager and check some properties
|
||||
@@ -117,46 +117,67 @@ Feature: Files Manager Resources Main Tests
|
||||
And the "prf_path" property in row <row> equals "<prf_path>"
|
||||
And the "prf_content" property in row <row> equals "<prf_content>"
|
||||
|
||||
|
||||
Examples:
|
||||
| test_description | prf_filename | prf_content | http_code | type | prf_number | row | prf_path |
|
||||
| put into public folder | file_test_1.txt | only text - modified | 200 | object | 0 | 1 | public/ |
|
||||
| put into mailtemplates folder | file_test_2.html | <h1>Test</h1><p>html test</p><i>modified</i> | 200 | object | 1 | 1 | templates/ |
|
||||
| put into public subfolder | file_test_3.txt | put test | 200 | object | 2 | 0 | public/public_subfolder |
|
||||
| put into mailtemplates subfolder | file_test_4.html | put test | 200 | object | 3 | 0 | templates/templates_subfolder |
|
||||
Examples:
|
||||
| test_description | prf_filename | prf_content | http_code | type | prf_number | row | prf_path |
|
||||
| put into public folder | file_test_1.txt | only text - modified | 200 | object | 0 | 1 | public/ |
|
||||
| put into mailtemplates folder | file_test_2.html | <h1>Test</h1><p>html test</p><i>modified</i> | 200 | object | 1 | 1 | templates/ |
|
||||
| put into public subfolder | file_test_3.txt | put test | 200 | object | 2 | 0 | public/public_subfolder |
|
||||
| put into mailtemplates subfolder | file_test_4.html | put test | 200 | object | 3 | 0 | templates/templates_subfolder |
|
||||
|
||||
|
||||
Scenario Outline: Upload files to same folders
|
||||
Given POST I want to upload the file "<file>" to path "<prf_path>". Url "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
And store "prf_uid" in session array as variable "prf_uid_<prf_number>"
|
||||
|
||||
Examples:
|
||||
| file | prf_path | prf_number |
|
||||
|/home/wendy/uploadfiles/test1.html | templates | 4 |
|
||||
|/home/wendy/uploadfiles/test2.html | templates | 5 |
|
||||
|/home/wendy/uploadfiles/test.txt | public | 6 |
|
||||
Examples:
|
||||
| file | prf_path | prf_number |
|
||||
|/home/wendy/uploadfiles/test1.html | templates | 4 |
|
||||
|/home/wendy/uploadfiles/test2.html | templates | 5 |
|
||||
|/home/wendy/uploadfiles/test.txt | public | 6 |
|
||||
|
||||
|
||||
Scenario: Upload files when the file already exists
|
||||
Given POST I want to upload the file "/home/wendy/uploadfiles/alert_message.html" to path "templates". Url "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "already exists"
|
||||
|
||||
Scenario: Upload files when the file already exists in the folder but with different content. must overwrite
|
||||
Given POST I want to upload the file "/home/wendy/uploadfiles/TestQA.html" to path "templates". Url "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be 200
|
||||
|
||||
|
||||
Scenario: Get a single Files Manager and check some properties the overwritten file
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager?path=templates"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the "prf_filename" property in row 4 equals "TestQA.html"
|
||||
And the "prf_content" property in row 4 equals "Test QA - cuando se realiza la sobreescritura desde upload"
|
||||
|
||||
|
||||
Scenario: Update the overwritten file to return to their original values
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"prf_content": "Test QA"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "prf_uid" stored in session array
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And that "prf_filename" is set to "TestQA.html"
|
||||
And that "prf_content" is set to "Test QA"
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Download files
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager/prf_uid/download" with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_number |
|
||||
| Download file | 0 |
|
||||
| Download file | 1 |
|
||||
| Download file | 2 |
|
||||
| Download file | 4 |
|
||||
|
||||
Examples:
|
||||
| test_description | prf_number |
|
||||
| Download file | 0 |
|
||||
| Download file | 1 |
|
||||
| Download file | 2 |
|
||||
| Download file | 4 |
|
||||
|
||||
|
||||
Scenario Outline: Delete file
|
||||
@@ -166,25 +187,24 @@ Feature: Files Manager Resources Main Tests
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_number |
|
||||
| delete public folder | 0 |
|
||||
| delete mailtemplates folder | 1 |
|
||||
| delete public subfolder | 2 |
|
||||
| delete mailtemplates subfolder | 3 |
|
||||
| delete mailtemplates subfolder | 4 |
|
||||
| delete mailtemplates subfolder | 5 |
|
||||
| delete mailtemplates subfolder | 6 |
|
||||
Examples:
|
||||
| test_description | prf_number |
|
||||
| delete public folder | 0 |
|
||||
| delete mailtemplates folder | 1 |
|
||||
| delete public subfolder | 2 |
|
||||
| delete mailtemplates subfolder | 3 |
|
||||
| delete mailtemplates subfolder | 4 |
|
||||
| delete mailtemplates subfolder | 5 |
|
||||
| delete mailtemplates subfolder | 6 |
|
||||
|
||||
|
||||
Scenario Outline: Delete folder
|
||||
Given that I want to delete the folder
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager/folder?path=<prf_path>"
|
||||
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_path |
|
||||
| delete public sub folder | templates/templates_subfolder |
|
||||
| delete templates sub folder | public/public_subfolder |
|
||||
Examples:
|
||||
| test_description | prf_path |
|
||||
| delete public sub folder | templates/templates_subfolder |
|
||||
| delete templates sub folder | public/public_subfolder |
|
||||
|
||||
@@ -36,13 +36,4 @@ Feature: File Manager Negative Tests
|
||||
| Invalid path template | 1265557095225ff5c688f46031700471 | file_test_2.html | temptes_manager/ | <h1>Test</h1><p>html test</p> | 400 | prf_path |
|
||||
| Field Required prf_filename in public | 1265557095225ff5c688f46031700471 | | public/ | only text | 400 | prf_filename |
|
||||
| Field Required prf_filename in template | 1265557095225ff5c688f46031700471 | | templates/ | <h1>Test</h1><p>html test</p> | 400 | prf_filename |
|
||||
| Field Required project | | file_test_1.txt | public/ | only text | 400 | prj_uid |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# how to get content if a file - revisar si hay el endpoint para poner el contenido del html
|
||||
# how to delete sub folders
|
||||
# upload big files -
|
||||
# actualizar el conteniudo subiendo un archivo nuevo con el mismo nombre...
|
||||
| Field Required project | | file_test_1.txt | public/ | only text | 400 | prj_uid |
|
||||
@@ -35,7 +35,7 @@ Feature: User
|
||||
#GET /api/1.0/{workspace}/user/{usr_uid}
|
||||
# Upload a image
|
||||
Scenario: Upload a image
|
||||
Given POST I want to upload the image "/home/daniel/pic3.jpg" to user "00000000000000000000000000000001". Url "user/"
|
||||
Given POST I want to upload the image "/home/wendy/photo/pic3.jpg" to user "00000000000000000000000000000001". Url "user/"
|
||||
|
||||
#POST /api/1.0/{workspace}/user
|
||||
# Create new User
|
||||
|
||||
@@ -95,14 +95,6 @@ Feature: User Main Tests
|
||||
| Create user Vacation | 5 | micaela | sanchez | micaela | micaela@gmail.com | sancjh #544 | 555-6652 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | | VACATION | PROCESSMAKER_OPERATOR | sample | sample |
|
||||
|
||||
|
||||
#Para que funcione este test, debe existir el archivo que se quiere subir
|
||||
#GET /api/1.0/{workspace}/user/{usr_uid}
|
||||
# Upload a image
|
||||
Scenario: Upload a image
|
||||
Given POST I want to upload the image "/home/daniel/pic3.jpg" to user "00000000000000000000000000000001". Url "user/"
|
||||
|
||||
|
||||
# Upload a image
|
||||
Scenario Outline: Upload a image
|
||||
Given POST I want to upload the image "<usr_photo>" to user with the key "usr_uid" stored in session array as variable "usr_uid_<usr_number>". Url "user/"
|
||||
|
||||
@@ -149,7 +141,7 @@ Feature: User Main Tests
|
||||
"usr_phone": "<usr_phone>",
|
||||
"usr_position": "<usr_position>",
|
||||
"usr_replaced_by": "<usr_replaced_by>",
|
||||
"usr_due_date": "<usr_dgit addue_date>",
|
||||
"usr_due_date": "<usr_due_date>",
|
||||
"usr_calendar": "<usr_calendar>",
|
||||
"usr_status": "<usr_status>",
|
||||
"usr_role": "<usr_role>",
|
||||
@@ -167,8 +159,8 @@ Feature: User Main Tests
|
||||
Examples:
|
||||
|
||||
| Test_description | usr_number | usr_firstname | usr_lastname | usr_username | usr_email | usr_address | usr_zip_code | usr_country | usr_city | usr_location | usr_phone | usr_position | usr_replaced_by | usr_due_date | usr_calendar | usr_status | usr_role | usr_new_pass | usr_cnf_pass |
|
||||
| Update usr_calendar, usr_role | 1 | jhoohan | smith | jhoohan | jhon@gmail.com | grenn #344 | 555-6555 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | 99159704252f501c63f8c58025859967 | ACTIVE | PROCESSMAKER_ADMIN | sample | sample |
|
||||
| Update usr_firstname, usr_lastname, usr_username | 2 | william | carters | william | will@gmail.com | saim #45 | 555-6522 | BO | L | LPB | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | sample | sample |
|
||||
| Update usr_calendar, usr_role | 1 | jhoohan | smith | jhoohan | jhon@gmail.com | grenn #344 | 555-6555 | US | FL | MIA | 555-6655-555 | Gerencia | | 2014-02-15 | 99159704252f501c63f8c58025859967 | ACTIVE | PROCESSMAKER_ADMIN | sample | sample |
|
||||
| Update usr_firstname, usr_lastname, usr_username | 2 | wilian | carters | wilian | will@gmail.com | saim #45 | 555-6522 | BO | L | LPB | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | sample | sample |
|
||||
| Update usr_status | 3 | sarita | sandler | sarita | saraah@gmail.com | laberh #985 | 555-9999 | AR | B | BUE | 2353643644 | Desarrollo | 61364466452d56711adb378002702791 | 2014-12-12 | 99159704252f501c63f8c58025859967 | INACTIVE | PROCESSMAKER_ADMIN | admin | admin |
|
||||
|
||||
|
||||
@@ -202,7 +194,7 @@ Feature: User Main Tests
|
||||
|
||||
| Test_description | usr_number | usr_firstname | usr_lastname | usr_username | usr_email | usr_address | usr_zip_code | usr_country | usr_city | usr_location | usr_phone | usr_position | usr_replaced_by | usr_due_date | usr_calendar | usr_status | usr_role | usr_new_pass | usr_cnf_pass |
|
||||
| Update usr_calendar, usr_role | 1 | jhoohan | smith | jhoohan | jhon@gmail.com | grenn #344 | 555-6555 | US | FL | MIA | 555-6655-555 | Gerencia | | 2016-02-15 | 99159704252f501c63f8c58025859967 | ACTIVE | PROCESSMAKER_ADMIN | sample | sample |
|
||||
| Update usr_firstname, usr_lastname, usr_username | 2 | william | carters | william | will@gmail.com | saim #45 | 555-6522 | BO | L | LPB | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | sample | sample |
|
||||
| Update usr_firstname, usr_lastname, usr_username | 2 | wilian | carters | wilian | will@gmail.com | saim #45 | 555-6522 | BO | L | LPB | 23344444 | Adminsitracion | 44811996752d567110634a1013636964 | 2014-12-12 | | ACTIVE | PROCESSMAKER_MANAGER | sample | sample |
|
||||
| Update usr_status | 3 | sarita | sandler | sarita | saraah@gmail.com | laberh #985 | 555-9999 | AR | B | BUE | 2353643644 | Desarrollo | 61364466452d56711adb378002702791 | 2014-12-12 | 99159704252f501c63f8c58025859967 | INACTIVE | PROCESSMAKER_ADMIN | admin | admin |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Process Variables Main Tests
|
||||
Requirements:
|
||||
a workspace with the process 3306142435318cd22d1eba2015305561 ("Process variables") already loaded
|
||||
there are three activities in the process
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Get all variables of a Process
|
||||
And I request "project/3306142435318cd22d1eba2015305561/variables"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the "var_name" property in row <i> equals "<var_name>"
|
||||
|
||||
Examples:
|
||||
| i | var_name |
|
||||
| 0 | SYS_LANG |
|
||||
| 1 | SYS_SKIN |
|
||||
| 2 | SYS_SYS |
|
||||
| 3 | APPLICATION |
|
||||
| 4 | PROCESS |
|
||||
| 5 | TASK |
|
||||
| 6 | INDEX |
|
||||
| 7 | USER_LOGGED |
|
||||
| 8 | USR_USERNAME |
|
||||
| 9 | PIN |
|
||||
| 10 | grilla2 |
|
||||
| 11 | grilla3 |
|
||||
| 12 | grilla1 |
|
||||
|
||||
|
||||
Scenario: Get grid variables of a Process
|
||||
Given I request "project/3306142435318cd22d1eba2015305561/grid/variables"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 3 records
|
||||
And the "var_name" property in row 0 equals "grilla2"
|
||||
And the "var_name" property in row 1 equals "grilla3"
|
||||
And the "var_name" property in row 2 equals "grilla1"
|
||||
|
||||
|
||||
Scenario: Get all variables of a Grid
|
||||
Given I request "project/3306142435318cd22d1eba2015305561/grid/8246998615318cd7cc451d2089449499/variables"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And that "var_name" is set to "fecha"
|
||||
And that "var_label" is set to "Date Static Date Y/m/d 24/07-31/07"
|
||||
And that "var_type" is set to "date"
|
||||
And that "var_name" is set to "text"
|
||||
And that "var_label" is set to "Text Field + Validate Any"
|
||||
And that "var_type" is set to "text"
|
||||
And that "var_name" is set to "currency"
|
||||
And that "var_label" is set to "Currency Fields Real Number ###,###,###,###.##"
|
||||
And that "var_type" is set to "currency"
|
||||
And that "var_name" is set to "porcentage"
|
||||
And that "var_label" is set to "Porcentage Field + Real Number ###.## %"
|
||||
And that "var_type" is set to "percentage"
|
||||
And that "var_name" is set to "textarea"
|
||||
And that "var_label" is set to "Text area Field"
|
||||
And that "var_type" is set to "textarea"
|
||||
And that "var_name" is set to "dropdown"
|
||||
And that "var_label" is set to "Dropdown Field"
|
||||
And that "var_type" is set to "dropdown"
|
||||
And that "var_name" is set to "yesno"
|
||||
And that "var_label" is set to "Yes/No Field"
|
||||
And that "var_type" is set to "yesno"
|
||||
And that "var_name" is set to "checkbox"
|
||||
And that "var_label" is set to "Check Box Field"
|
||||
And that "var_type" is set to "checkbox"
|
||||
And that "var_name" is set to "suggest1"
|
||||
And that "var_label" is set to "Suggest Usuarios"
|
||||
And that "var_type" is set to "suggest"
|
||||
And that "var_name" is set to "link"
|
||||
And that "var_label" is set to "Link Field"
|
||||
And that "var_type" is set to "link"
|
||||
And that "var_name" is set to "addfile"
|
||||
And that "var_label" is set to "Add File Field"
|
||||
And that "var_type" is set to "file"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Process Variables Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
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>
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the response status message should have the following text "<status_message>"
|
||||
|
||||
Examples:
|
||||
| status_code | status_message |
|
||||
| 400 | grid_uid |
|
||||
@@ -100,7 +100,7 @@ Feature: Project Properties - Step Resources
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the "obj_uid" property in row 1 equals "32743823452cd63105006e1076595203"
|
||||
And the "obj_uid" property in row 1 equals "6869969705306aaae049a62048840877"
|
||||
And the "obj_title" property in row 1 equals "OutputDocument Demo"
|
||||
And the "obj_description" property in row 1 equals "Description"
|
||||
And the "obj_type" property in row 1 equals "OUTPUT_DOCUMENT"
|
||||
|
||||
@@ -39,7 +39,7 @@ Feature: Project Properties - Step Resources Main Tests
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"git
|
||||
And the type is "object"
|
||||
And store "step_uid" in session array as variable "step_uid_<step_number>"
|
||||
|
||||
Examples:
|
||||
@@ -328,7 +328,7 @@ Feature: Project Properties - Step Resources Main Tests
|
||||
| Trigger assigned to External in type before | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 5 | 0 |
|
||||
|
||||
|
||||
Scenario Outline: Unassign all"DynaForm Demo1" from "Task1"
|
||||
Scenario Outline: Unassign all "DynaForm Demo1" from "Task1" and "Task 2"
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "step1" stored in session array
|
||||
Given that I want to delete a resource with the key "step_uid" stored in session array as variable "step_uid_<step_number>"
|
||||
@@ -344,6 +344,8 @@ Feature: Project Properties - Step Resources Main Tests
|
||||
| Trigger assigned to Task 2 in type After | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | 2 |
|
||||
| Trigger assigned to Task 2 in type After | 16062437052cd6141881e06088349078 | 10163687452cd6234e0dd25086954968 | 3 |
|
||||
| Trigger assigned to Task 2 in type before | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 4 |
|
||||
| Trigger assigned to Task 2 in type before | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 5 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: List assigned Steps to "Task1" & "Task2" (empty) (verify if everithing was deleted)
|
||||
|
||||
@@ -8,7 +8,7 @@ Feature: Group
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario Outline: Get the Trigger Wizards List when there are exactly 6 library
|
||||
Scenario Outline: Get the Trigger Wizard List when there are exactly 6 library
|
||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizards"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
@@ -20,12 +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 | pmTalend | Talend ETL Integration | class.pmTalend.pmFunctions.php |
|
||||
| 2 | pmSugar | Sugar CRM Triggers | class.pmSugar.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 | pmSugar | Sugar CRM Triggers | class.pmSugar.pmFunctions.php |
|
||||
| 3 | pmTalend | Talend ETL Integration | class.pmTalend.pmFunctions.php |
|
||||
| 4 | pmZimbra | Zimbra Triggers v. 0.1 | class.pmZimbra.pmFunctions.php |
|
||||
| 5 | pmTrAlfresco | Alfresco DM Triggers v. 0.1 | class.pmTrAlfresco.pmFunctions.php |
|
||||
|
||||
|
||||
Scenario Outline: Get a single Library
|
||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/<lib_name>"
|
||||
And the content type is "application/json"
|
||||
@@ -65,6 +68,7 @@ Feature: Group
|
||||
| pmSugar | CreateSugarAccount | Creates SugarCRM entries from the Account module |
|
||||
|
||||
|
||||
|
||||
Scenario: Get a List of triggers of a project
|
||||
And I request "project/14414793652a5d718b65590036026581/triggers"
|
||||
And the content type is "application/json"
|
||||
@@ -74,7 +78,7 @@ Feature: Group
|
||||
And the json data is an empty array
|
||||
|
||||
|
||||
Scenario Outline: Create new Trigger
|
||||
Scenario Outline: Create new Trigger: PMFAddAttachmentToArray
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
@@ -104,8 +108,42 @@ Feature: Group
|
||||
Examples:
|
||||
| i | lib_name | fn_name | tri_title | tri_description | tri_type | tri_params.input.arrayData | tri_params.input.index | tri_params.input.value | tri_params.input.suffix | tri_params.output.tri_answer |
|
||||
| 0 | pmFunctions | PMFAddAttachmentToArray | My trigger | | SCRIPT | array(1, 2) | 1 | 2 | My Copy({i}) | $respuesta |
|
||||
| 1 | pmFunctions | PMFSendMessage | My trigger 1 | Envio de email | SCRIPT |
|
||||
|
||||
|
||||
Scenario Outline: Create new Trigger: createDWS
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_title": "<tri_title>",
|
||||
"tri_description": "<tri_description>",
|
||||
"tri_type": "<tri_type>",
|
||||
"tri_params": {
|
||||
"input": {
|
||||
|
||||
"sharepointServer": "<tri_params.input.sharepointServer>",
|
||||
"auth": "<tri_params.input.auth>",
|
||||
"name": "<tri_params.input.name>",
|
||||
"users": "<tri_params.input.users>",
|
||||
"title": "<tri_params.input.title>",
|
||||
"documents": "<tri_params.input.documents>"
|
||||
|
||||
},
|
||||
"output": {
|
||||
"tri_answer": "<tri_params.output.tri_answer>"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/<lib_name>/<fn_name>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And store "tri_uid" in session array as variable "tri_uid<i>"
|
||||
|
||||
Examples:
|
||||
| i | lib_name | fn_name | tri_title | tri_description | tri_type | tri_params.input.sharepointServer | tri_params.input.auth | tri_params.input.name | tri_params.input.users | tri_params.input.title | tri_params.input.documents | tri_params.output.tri_answer |
|
||||
| 1 | pmTrSharepoint | createDWS | Sharepoint 1 | | SCRIPT | @@SERVER | username:password | Test DWS | @@users | Test DWS | /files/test.doc | $respuesta |
|
||||
|
||||
Scenario Outline: Update Trigger
|
||||
Given PUT this data:
|
||||
@@ -138,6 +176,42 @@ Feature: Group
|
||||
| i | lib_name | fn_name | tri_title | tri_description | tri_type | tri_params.input.arrayData | tri_params.input.index | tri_params.input.value | tri_params.input.suffix | tri_params.output.tri_answer |
|
||||
| 0 | pmFunctions | PMFAddAttachmentToArray | My trigger... | ... | SCRIPT | array(1, 2, 3, 4) | 1 | 2 | My Copy2({i}) | $r |
|
||||
|
||||
|
||||
Scenario Outline: Create new Trigger: createDWS
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"tri_title": "<tri_title>",
|
||||
"tri_description": "<tri_description>",
|
||||
"tri_type": "<tri_type>",
|
||||
"tri_params": {
|
||||
"input": {
|
||||
|
||||
"sharepointServer": "<tri_params.input.sharepointServer>",
|
||||
"auth": "<tri_params.input.auth>",
|
||||
"name": "<tri_params.input.name>",
|
||||
"users": "<tri_params.input.users>",
|
||||
"title": "<tri_params.input.title>",
|
||||
"documents": "<tri_params.input.documents>"
|
||||
|
||||
},
|
||||
"output": {
|
||||
"tri_answer": "<tri_params.output.tri_answer>"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "tri_uid" stored in session array as variable "tri_uid<i>"
|
||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/<lib_name>/<fn_name>"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
| i | lib_name | fn_name | tri_title | tri_description | tri_type | tri_params.input.sharepointServer | tri_params.input.auth | tri_params.input.name | tri_params.input.users | tri_params.input.title | tri_params.input.documents | tri_params.output.tri_answer |
|
||||
| 1 | pmTrSharepoint | createDWS | Sharepoint 1 - Modified | | SCRIPT | @@SERVER_URL | username:password | Test DWS | @@users | Test DWS | /files/test.doc | $respuesta |
|
||||
|
||||
|
||||
Scenario Outline: Get a Trigger that was created with the wizard
|
||||
Given that I want to get a resource with the key "tri_uid" stored in session array as variable "tri_uid<i>"
|
||||
@@ -151,8 +225,10 @@ Feature: Group
|
||||
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 |
|
||||
|
||||
| i | lib_name | fn_name | tri_title | tri_description | tri_type |
|
||||
| 0 | pmFunctions | PMFAddAttachmentToArray | My trigger... | ... | SCRIPT |
|
||||
| 1 | pmTrSharepoint | createDWS | Test DWS | | SCRIPT |
|
||||
|
||||
|
||||
Scenario Outline: Delete a trigger of a project
|
||||
@@ -166,6 +242,7 @@ Feature: Group
|
||||
Examples:
|
||||
| i |
|
||||
| 0 |
|
||||
| 1 |
|
||||
|
||||
|
||||
Scenario: Get a List of triggers of a project
|
||||
|
||||
@@ -5,4 +5,49 @@ Feature: Triggers Wizard Negative Tests
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: Get a single Library with bad parameters (negative tests)
|
||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/sampleqa"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "not exist"
|
||||
|
||||
|
||||
Scenario: Get a single Function of the Library with bad parameters (negative tests)
|
||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/qadesarrollo/funcionexterna"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "not exist"
|
||||
|
||||
|
||||
Scenario Outline: Create new Trigger with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_title": "<tri_title>",
|
||||
"tri_description": "<tri_description>",
|
||||
"tri_type": "<tri_type>",
|
||||
"tri_params": {
|
||||
"input": {
|
||||
"arrayData": "<tri_params.input.arrayData>",
|
||||
"index": "<tri_params.input.index>",
|
||||
"value": "<tri_params.input.value>",
|
||||
"suffix": "<tri_params.input.suffix>"
|
||||
},
|
||||
"output": {
|
||||
"tri_answer": "<tri_params.output.tri_answer>"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/trigger-wizard/<lib_name>/<fn_name>"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | lib_name | fn_name | tri_title | tri_description | tri_type | tri_params.input.arrayData | tri_params.input.index | tri_params.input.value | tri_params.input.suffix | tri_params.output.tri_answer | error_code | error_message |
|
||||
| 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 | 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 |
|
||||
@@ -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))){
|
||||
@@ -1254,7 +1259,7 @@ class RestContext extends BehatContext
|
||||
$pageUrl = str_replace($varName, $varValue, $pageUrl);
|
||||
|
||||
|
||||
$this->printDebug("URL: $pageUrl\n$varName = $varValue\n");
|
||||
//$this->printDebug("URL: $pageUrl\n$varName = $varValue\n");
|
||||
|
||||
|
||||
$this->iRequest($pageUrl, $urlType);
|
||||
|
||||
Reference in New Issue
Block a user