Merged in wnestor/processmaker (pull request #293)
Reorganizacion de folders y culminacion del behat basic, main y negative de department
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Departaments
|
||||
Requirements:
|
||||
a workspace with the 16 departments created already loaded
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 16 record
|
||||
|
||||
|
||||
Scenario: Get a single department of de Sales Division department
|
||||
Given I request "department/12921473252d567506e6e63079240767"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the "dep_parent" property equals ""
|
||||
And the "dep_title" property equals "Sales Division"
|
||||
And the "dep_status" property equals "ACTIVE"
|
||||
And the "dep_manager" property equals ""
|
||||
And the "dep_ldap_dn" property equals ""
|
||||
And the "dep_last" property equals "0"
|
||||
And the "dep_manager_username" property equals ""
|
||||
And the "dep_manager_lastname" property equals ""
|
||||
And the "has_children" property equals "0"
|
||||
|
||||
|
||||
Scenario: Create a new department in the workspace
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "TestDepartment",
|
||||
"dep_parent" : "",
|
||||
"dep_status" : "ACTIVE"
|
||||
|
||||
}
|
||||
"""
|
||||
And I request "department"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "dep_uid" in session array
|
||||
|
||||
|
||||
Scenario: Update a department created in this script
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"dep_title" : "TestDepartment Update",
|
||||
"dep_status" : "INACTIVE"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "dep_uid" stored in session array
|
||||
And I request "department"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
|
||||
Scenario: Get a single department after update of the department created of this script
|
||||
Given that I want to get a resource with the key "dep_uid" stored in session array
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the "dep_title" property equals "TestDepartment Update"
|
||||
And the "dep_status" property equals "INACTIVE"
|
||||
|
||||
|
||||
#Scenario: Assign user to department created in this script
|
||||
# Given POST this data:
|
||||
# """
|
||||
# {
|
||||
|
||||
# "dep_title" : "TestDepartment",
|
||||
# "dep_parent" : "",git
|
||||
# "dep_status" : "ACTIVE"
|
||||
|
||||
#}
|
||||
#"""
|
||||
#And I request "department/<dep_uid>/assign-user/62511352152d5673bba9cd4062743508 "
|
||||
#Then the response status code should be 201
|
||||
#And the response charset is "UTF-8"
|
||||
#And the content type is "application/json"
|
||||
#And the type is "object"
|
||||
#And store "dep_uid" in session array
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 17 record
|
||||
|
||||
|
||||
Scenario: Delete a department created in this script
|
||||
Given that I want to delete a resource with the key "dep_uid" stored in session array
|
||||
And I request "department"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 16 record
|
||||
@@ -0,0 +1,169 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Departaments Main Tests
|
||||
Requirements:
|
||||
a workspace with the 16 departments created already loaded
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 16 record
|
||||
|
||||
|
||||
Scenario: Get a single department of de Sales Division department
|
||||
Given I request "department/12921473252d567506e6e63079240767"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And the "dep_parent" property equals ""
|
||||
And the "dep_title" property equals "Sales Division"
|
||||
And the "dep_status" property equals "ACTIVE"
|
||||
And the "dep_manager" property equals ""
|
||||
And the "dep_ldap_dn" property equals ""
|
||||
And the "dep_last" property equals "0"
|
||||
And the "dep_manager_username" property equals ""
|
||||
And the "dep_manager_lastname" property equals ""
|
||||
And the "has_children" property equals "0"
|
||||
|
||||
|
||||
Scenario Outline: Create a new departments in the workspace
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "<dep_title>",
|
||||
"dep_parent" : "<dep_parent>",
|
||||
"dep_status" : "<dep_status>"
|
||||
|
||||
}
|
||||
"""
|
||||
And I request "department"
|
||||
Then the response status code should be 201
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "dep_uid" in session array as variable "dep_uid_<dep_uid_number>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | dep_uid_number | dep_title | dep_parent | dep_status |
|
||||
| Created a department padre with status active | 1 | Department 1 | | ACTIVE |
|
||||
| Created a department hijo with status active | 2 | Department 2 | 28036037252d56752770585009591640 | ACTIVE |
|
||||
| Created a department padre with status inactive | 3 | Department 3 | | INACTIVE |
|
||||
| Created a department hijo with status inactive | 4 | Department 4 | 28036037252d56752770585009591640 | INACTIVE |
|
||||
| Created a department with character special | 5 | Department 5!@#$%^& | | ACTIVE |
|
||||
|
||||
|
||||
Scenario: Create a department with same name
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "Department 1",
|
||||
"dep_parent" : "",
|
||||
"dep_status" : "ACTIVE"
|
||||
|
||||
}
|
||||
"""
|
||||
And I request "department"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "exist"
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 21 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 19 record
|
||||
|
||||
|
||||
Scenario Outline: Update a department created in this script
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "<dep_title>",
|
||||
"dep_status" : "<dep_status>"
|
||||
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
|
||||
And I request "department"
|
||||
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 | dep_uid_number | dep_title | dep_status |
|
||||
| Update of field title and status of department | 1 | Department 1 UPDATE | INACTIVE |
|
||||
| Update of field title and status of department | 3 | Department 3 UPDATE | ACTIVE |
|
||||
|
||||
|
||||
Scenario Outline: Get a single department after update of the department created of this script
|
||||
Given that I want to get a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
|
||||
And I request "department"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "dep_title" is set to "<dep_title>"
|
||||
And that "dep_status" is set to "<dep_status>"
|
||||
|
||||
Examples:
|
||||
|
||||
| dep_uid_number | dep_title | dep_status |
|
||||
| 1 | Department 1 UPDATE | INACTIVE |
|
||||
| 3 | Department 3 UPDATE | ACTIVE |
|
||||
|
||||
|
||||
#Scenario: Assign user to department created in this script
|
||||
# Given POST this data:
|
||||
# """
|
||||
# {
|
||||
|
||||
# "dep_title" : "TestDepartment",
|
||||
# "dep_parent" : "",git
|
||||
# "dep_status" : "ACTIVE"
|
||||
|
||||
#}
|
||||
#"""
|
||||
#And I request "department/<dep_uid>/assign-user/62511352152d5673bba9cd4062743508 "
|
||||
#Then the response status code should be 201
|
||||
#And the response charset is "UTF-8"
|
||||
#And the content type is "application/json"
|
||||
#And the type is "object"
|
||||
#And store "dep_uid" in session array
|
||||
|
||||
|
||||
Scenario Outline: Delete a department created in this script
|
||||
Given that I want to delete a resource with the key "dep_uid" stored in session array as variable "dep_uid_<dep_uid_number>"
|
||||
And I request "department"
|
||||
Then the response status code should be 200
|
||||
And the content type is "application/json"
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| dep_uid_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
| 3 |
|
||||
| 4 |
|
||||
| 5 |
|
||||
|
||||
|
||||
Scenario: List all Departaments in the workspace when exactly are 16 departaments created
|
||||
Given I request "department"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 16 record
|
||||
@@ -0,0 +1,28 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Departments Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Create a new departments in the workspace with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
|
||||
"dep_title" : "<dep_title>",
|
||||
"dep_parent" : "<dep_parent>",
|
||||
"dep_status" : "<dep_status>"
|
||||
|
||||
}
|
||||
"""
|
||||
And I request "department"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | dep_title | dep_parent | dep_status | error_code | error_message |
|
||||
| without dep_title | | | ACTIVE | 400 | dep_title |
|
||||
| Invalid dep_parent | Department 2 | 28036030000000000000005009591640 | ACTIVE | 400 | dep_parent |
|
||||
| Invalid dep_status | Department 3 | | TRIGGER | 400 | dep_status |
|
||||
@@ -108,21 +108,22 @@ Feature: Files Manager Resources Main Tests
|
||||
|
||||
|
||||
Scenario Outline: Get a single Files Manager and check some properties
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager?path=<prf_path>"
|
||||
Given that I want to get a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
Given 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 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>"
|
||||
And the type is "object"
|
||||
And that "prf_filename" is set to "<prf_filename>"
|
||||
And that "prf_path" is set to "<prf_path>"
|
||||
And that "prf_content" is set to "<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 |
|
||||
| put into public subfolder | file_test_3 | put test | 200 | object | 2 | 0 | public/public_subfolder |
|
||||
| put into mailtemplates subfolder | file_test_4 | put test | 200 | object | 3 | 0 | templates/templates_subfolder |
|
||||
|
||||
|
||||
Scenario Outline: Upload files to same folders
|
||||
@@ -134,21 +135,25 @@ Feature: Files Manager Resources Main Tests
|
||||
|/home/wendy/uploadfiles/test1.html | templates | 4 |
|
||||
|/home/wendy/uploadfiles/test2.html | templates | 5 |
|
||||
|/home/wendy/uploadfiles/test.txt | public | 6 |
|
||||
|/home/wendy/uploadfiles/TestQA.html| templates | 7 |
|
||||
|
||||
|
||||
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"
|
||||
|
||||
Scenario Outline: Verify if TestQA was overwrited
|
||||
Given that I want to get a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
Given 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 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"
|
||||
And the type is "object"
|
||||
And that "prf_filename" is set to "<prf_filename>"
|
||||
And that "prf_content" is set to "<prf_content>"
|
||||
|
||||
Examples:
|
||||
| prf_ filename | prf_content | prf_number |
|
||||
| TestQA.html | Test QA - cuando se realiza la sobreescritura desde upload | 7 |
|
||||
|
||||
|
||||
|
||||
Scenario: Update the overwritten file to return to their original values
|
||||
@@ -67,6 +67,21 @@ Feature: Project Properties - Step Resources Main Tests
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "exists"
|
||||
|
||||
|
||||
Scenario: Try delete a Input Document when it is assigned to a step
|
||||
And that I want to delete a resource with the key "32743823452cd63105006e1076595203" stored in session array
|
||||
And I request "project/14414793652a5d718b65590036026581/input-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 400
|
||||
|
||||
|
||||
Scenario Outline: Try delete a Output document when it is assigned to a step
|
||||
Given that I want to delete a resource with the key "83199959452cd62589576c1018679557" stored in session array
|
||||
And I request "project/<project>/output-document"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 400
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Update the five steps and then check if the values had changed
|
||||
Given PUT this data:
|
||||
@@ -200,8 +215,22 @@ Feature: Project Properties - Step Resources Main Tests
|
||||
| Trigger assigned to Task 2 in type After | 16062437052cd6141881e06088349078 | 89706843252cd9decdcf9b3047762708 | 4 | 24 | 57401970252cd6393531551040242546 | AFTER | | 3 |
|
||||
|
||||
|
||||
Scenario Outline: Trigger assigned to the step when it was already assigned
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"tri_uid": "81919273152cd636c665080083928728",
|
||||
"st_type": "BEFORE",
|
||||
"st_condition": "",
|
||||
"st_position": "1"
|
||||
}
|
||||
"""
|
||||
And I request "project/16062437052cd6141881e06088349078/activity/10163687452cd6234e0dd25086954968/step/50332332752cd9b9a7cc989003652905/trigger" with the key "step_uid" stored in session array
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "exists"
|
||||
|
||||
Scenario Outline: Delete all Triggers created previously in this script
|
||||
|
||||
Scenario Outline: Try delete a trigger when it is assigned to a step
|
||||
Given that I want to delete a "trigger"
|
||||
And I request "project/<project>/trigger/<tri_uid>"
|
||||
Then the response status code should be 400
|
||||
@@ -210,9 +239,9 @@ Scenario Outline: Delete all Triggers created previously in this script
|
||||
|
||||
Examples:
|
||||
|
||||
| project | tri_uid |
|
||||
| 16062437052cd6141881e06088349078 | 81919273152cd636c665080083928728 |
|
||||
| 16062437052cd6141881e06088349078 | 57401970252cd6393531551040242546 |
|
||||
| project | tri_uid |
|
||||
| 16062437052cd6141881e06088349078 | 81919273152cd636c665080083928728 |
|
||||
| 16062437052cd6141881e06088349078 | 57401970252cd6393531551040242546 |
|
||||
|
||||
|
||||
Scenario Outline: List available Triggers for each assigned step
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user