diff --git a/features/backend/files_manager/main_test_files_manager.feature b/features/backend/files_manager/main_test_files_manager.feature index 75c457463..90e4b1393 100644 --- a/features/backend/files_manager/main_test_files_manager.feature +++ b/features/backend/files_manager/main_test_files_manager.feature @@ -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 "" - 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 |

Test

html test

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

Test

html test

modified | 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 equals "" And the "prf_content" property in row equals "" - - 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 |

Test

html test

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

Test

html test

modified | 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 "" to path "". Url "project/1265557095225ff5c688f46031700471/file-manager" And store "prf_uid" in session array as variable "prf_uid_" - 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_" 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=" - - 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 | diff --git a/features/backend/files_manager/negative_tests_files_manager.feature b/features/backend/files_manager/negative_tests_files_manager.feature index 0bd692c19..9417ee6dd 100644 --- a/features/backend/files_manager/negative_tests_files_manager.feature +++ b/features/backend/files_manager/negative_tests_files_manager.feature @@ -36,13 +36,4 @@ Feature: File Manager Negative Tests | Invalid path template | 1265557095225ff5c688f46031700471 | file_test_2.html | temptes_manager/ |

Test

html test

| 400 | prf_path | | Field Required prf_filename in public | 1265557095225ff5c688f46031700471 | | public/ | only text | 400 | prf_filename | | Field Required prf_filename in template | 1265557095225ff5c688f46031700471 | | templates/ |

Test

html test

| 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... \ No newline at end of file + | Field Required project | | file_test_1.txt | public/ | only text | 400 | prj_uid | \ No newline at end of file diff --git a/features/backend/process_variables/main_tests_process_variables.feature b/features/backend/process_variables/main_tests_process_variables.feature index e69de29bb..a69794e96 100644 --- a/features/backend/process_variables/main_tests_process_variables.feature +++ b/features/backend/process_variables/main_tests_process_variables.feature @@ -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 equals "" + + 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" diff --git a/features/backend/process_variables/negative_tests_process_variables.feature b/features/backend/process_variables/negative_tests_process_variables.feature index e69de29bb..b79876a8d 100644 --- a/features/backend/process_variables/negative_tests_process_variables.feature +++ b/features/backend/process_variables/negative_tests_process_variables.feature @@ -0,0 +1,14 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Process Variables Negative Tests + + + Background: + Given that I have a valid access_token bad parameters (negative tests) + + +Scenario Outline: Get all variables of a Process + And I request "project/3306142435318cd22d1eba2015305561/variables" + And the "var_name" property in row 0 equals "sample" + Then the response status code should be 400 + And the response status message should have the following text "var_name" + diff --git a/features/backend/trigger_wizard/main_tests_trigger_wizards.feature b/features/backend/trigger_wizard/main_tests_trigger_wizards.feature index e4a0787d1..a65eb8eb3 100644 --- a/features/backend/trigger_wizard/main_tests_trigger_wizards.feature +++ b/features/backend/trigger_wizard/main_tests_trigger_wizards.feature @@ -104,7 +104,7 @@ 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 | + | 1 | pmFunctions | PMFSendMessage | My trigger 1 | Envio de email | SCRIPT | | | | | | Scenario Outline: Update Trigger diff --git a/features/backend/trigger_wizard/negative_tests_triggers_wizards.feature b/features/backend/trigger_wizard/negative_tests_triggers_wizards.feature index 72ea1727c..8b5240dd1 100644 --- a/features/backend/trigger_wizard/negative_tests_triggers_wizards.feature +++ b/features/backend/trigger_wizard/negative_tests_triggers_wizards.feature @@ -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_description": "", + "tri_type": "", + "tri_params": { + "input": { + "arrayData": "", + "index": "", + "value": "", + "suffix": "" + }, + "output": { + "tri_answer": "" + } + } + } + """ + And I request "project//trigger-wizard//" + Then the response status code should be + And the response status message should have the following text "" + + 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 | 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 | + | 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