Mejoras y avance de los feature case scheduler, file manager, trigger wizards
This commit is contained in:
@@ -84,7 +84,7 @@ Feature: Case Scheduler Main Tests
|
||||
"""
|
||||
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"
|
||||
And the response status message should have the following text "Duplicate Case Scheduler name"
|
||||
|
||||
|
||||
Scenario: Get the case schedulers list when there are exactly 13 case schedulers
|
||||
|
||||
@@ -36,7 +36,7 @@ Feature: Output Documents Negative Tests
|
||||
| Invalid sch_option | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 21 | 20 | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 400 | sch_option |
|
||||
| Invalid sch_del_user_name | sample | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 400 | User |
|
||||
| Invalid sch_del_user_pass | admin | sample | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# 22 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|5\|6\|7 | | | | | | 400 | password |
|
||||
| Invalid tas_uid | admin | admin | 00000000000005be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | task |
|
||||
| Invalid tas_uid | admin | admin | 00000000000005be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | Task not found |
|
||||
| Invalid sch_start_time | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 2 | 3 | 2014-03-21 | 2014-04-18 | 39:00:99 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 400 | sch_start_time |
|
||||
| Invalid sch_start_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 3 | 3 | 2014-20-35 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 1\|7 | | 400 | sch_start_date |
|
||||
| Invalid sch_week_days | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 4 | 2 | 2014-03-21 | 2014-04-18 | 18:00 | 8\|9\|10 | | | | | | 400 | sch_week_days |
|
||||
|
||||
@@ -37,9 +37,9 @@ Feature: Files Manager Resources Main Tests
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"prf_filename": "<file_name>",
|
||||
"prf_path": "<path>",
|
||||
"prf_content": "<content>"
|
||||
"prf_filename": "<prf_filename>",
|
||||
"prf_path": "<prf_path>",
|
||||
"prf_content": "<prf_content>"
|
||||
}
|
||||
"""
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
@@ -50,17 +50,46 @@ Feature: Files Manager Resources Main Tests
|
||||
And store "prf_uid" in session array as variable "prf_uid_<prf_number>"
|
||||
|
||||
Examples:
|
||||
| test_description | file_name | path | content | http_code | type | prf_number |
|
||||
| into public folder | file_test_1.txt | public/ | only text | 200 | object | 0 |
|
||||
| into mailtemplates folder | file_test_2.html | templates/ | <h1>Test</h1><p>html test</p> | 200 | object | 1 |
|
||||
| into public subfolder | file_test_3.txt | public/public_subfolder | test | 200 | object | 2 |
|
||||
| into mailtemplates subfolder | file_test_4.html | templates/templates_subfolder | test | 200 | object | 3 |
|
||||
| test_description | prf_filename | prf_path | prf_content | http_code | type | prf_number |
|
||||
| into public folder | file_test_1.txt | public/ | only text | 200 | object | 0 |
|
||||
| into mailtemplates folder | file_test_2.html | templates/ | <h1>Test</h1><p>html test</p> | 200 | object | 1 |
|
||||
| into public subfolder | file_test_3 | public/public_subfolder | test | 200 | object | 2 |
|
||||
| into mailtemplates subfolder | file_test_4 | templates/templates_subfolder | test | 200 | object | 3 |
|
||||
|
||||
Scenario Outline: Post files
|
||||
|
||||
Scenario: Create files and subfolders with same name in path public
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"prf_filename": "file_test_1.txt",
|
||||
"prf_path": "public/",
|
||||
"prf_content": "only text"
|
||||
}
|
||||
"""
|
||||
And I request "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: Create files and subfolders with same name in path templates
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"prf_filename": "file_test_2.html",
|
||||
"prf_path": "templates/",
|
||||
"prf_content": "<h1>Test</h1><p>html test</p>"
|
||||
}
|
||||
"""
|
||||
And I request "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 Outline: Update files by updating the content
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"prf_content": "<content>"
|
||||
"prf_content": "<prf_content>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
@@ -71,22 +100,63 @@ Feature: Files Manager Resources Main Tests
|
||||
And the type is "<type>"
|
||||
|
||||
Examples:
|
||||
| test_description | content | http_code | type | prf_number |
|
||||
| put into public folder | only text - modified | 200 | object | 0 |
|
||||
| put into mailtemplates folder | <h1>Test</h1><p>html test</p><i>modified</i> | 200 | object | 1 |
|
||||
| put into public subfolder | put test | 200 | object | 2 |
|
||||
| put into mailtemplates subfolder | put test | 200 | object | 3 |
|
||||
| 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
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager?path=<prf_path>"
|
||||
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 <row> equals "<prf_filename>"
|
||||
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 |
|
||||
|
||||
|
||||
#Para que funcione este test, debe existir el archivo que se quiere subir
|
||||
Scenario Outline: Upload files to same folders
|
||||
Given POST I want to upload the file "<file>" to path "<path>". Url "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
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 | path | prf_number |
|
||||
|/home/daniel/test1.html | templates | 4 |
|
||||
|/home/daniel/test2.html | templates | 5 |
|
||||
|/home/daniel/test.txt | public | 6 |
|
||||
| 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 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 |
|
||||
|
||||
|
||||
Scenario Outline: Delete file
|
||||
@@ -107,5 +177,14 @@ Feature: Files Manager Resources Main Tests
|
||||
| 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"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_path |
|
||||
| delete public sub folder | templates/templates_subfolder |
|
||||
| delete templates sub folder | public/public_subfolder |
|
||||
|
||||
@@ -1,6 +1,48 @@
|
||||
# get a list of an inexistent path
|
||||
# try to create a file with same name as an existent
|
||||
# try to upload a file with same name as an existent
|
||||
# how to get content if a file
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: File Manager Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario: Get a list public folder of process files manager with bad parameters (negative tests)
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager?path=sample"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "<path>"
|
||||
|
||||
|
||||
Scenario: Get a list templates folder of process files manager with bad parameters (negative tests)
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager?path=sample"
|
||||
Then the response status code should be 200
|
||||
And the response status message should have the following text "<path>"
|
||||
|
||||
|
||||
Scenario Outline: Create files and subfolders for a project with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"prf_filename": "<prf_filename>",
|
||||
"prf_path": "<prf_path>",
|
||||
"prf_content": "<prf_content>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/file-manager"
|
||||
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 | prf_filename | prf_path | prf_content | error_code | error_message |
|
||||
| Invalid path public | 1265557095225ff5c688f46031700471 | file_test_1.txt | file_input_public/ | only text | 400 | prf_path |
|
||||
| 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 | 200 | prf_filename |
|
||||
| Field Required prf_filename in template | 1265557095225ff5c688f46031700471 | | templates/ | <h1>Test</h1><p>html test</p> | 200 | prf_filename |
|
||||
| Field Required project | | file_test_1.txt | public/ | only text | 200 | 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 bi files
|
||||
# upload big files -
|
||||
# actualizar el conteniudo subiendo un archivo nuevo con el mismo nombre...
|
||||
@@ -82,7 +82,7 @@ Feature: Group
|
||||
"tri_description": "<tri_description>",
|
||||
"tri_type": "<tri_type>",
|
||||
"tri_params": {
|
||||
"input": {
|
||||
"input": {
|
||||
"arrayData": "<tri_params.input.arrayData>",
|
||||
"index": "<tri_params.input.index>",
|
||||
"value": "<tri_params.input.value>",
|
||||
@@ -102,8 +102,9 @@ Feature: Group
|
||||
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.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 |
|
||||
| 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: Update Trigger
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Triggers Wizard Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
|
||||
@@ -1250,7 +1250,6 @@ class RestContext extends BehatContext
|
||||
} else {
|
||||
$varValue = $sessionData->$sessionVarName;
|
||||
}
|
||||
print_r($sessionData);
|
||||
|
||||
$pageUrl = str_replace($varName, $varValue, $pageUrl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user