diff --git a/features/backend/admin_setup/departments/main_tests_department.feature b/features/backend/admin_setup/departments/main_tests_department.feature index 749aac5fd..a341970c3 100644 --- a/features/backend/admin_setup/departments/main_tests_department.feature +++ b/features/backend/admin_setup/departments/main_tests_department.feature @@ -7,253 +7,277 @@ Background: Given that I have a valid access_token - Scenario: List all Departaments in the workspace when exactly are 15 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 15 record +Scenario: List all Departaments in the workspace when exactly are 15 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 15 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_uid" property equals "12921473252d567506e6e63079240767" - 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 "38102442252d5671a629009013495090" - And the "dep_ldap_dn" property equals "" - And the "dep_last" property equals "0" - And the "dep_manager_username" property equals "dylan" - And the "dep_manager_firstname" property equals "Dylan" - And the "dep_manager_lastname" property equals "Burns" - And the "has_children" property equals "0" +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_uid" property equals "12921473252d567506e6e63079240767" + 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 "38102442252d5671a629009013495090" + And the "dep_ldap_dn" property equals "" + And the "dep_last" property equals "0" + And the "dep_manager_username" property equals "dylan" + And the "dep_manager_firstname" property equals "Dylan" + And the "dep_manager_lastname" property equals "Burns" + And the "has_children" property equals "0" - Scenario: Get a List of Assigned User (Department: Sales Division) - Given I request "department/12921473252d567506e6e63079240767/assigned-user" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the type is "array" - And the response has 4 record +Scenario: Get a List of Assigned User (Department: Sales Division) + Given I request "department/12921473252d567506e6e63079240767/assigned-user" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 4 record + And that "usr_username" is set to "joseph" + And that "usr_username" is set to "jacob" + And that "usr_username" is set to "dylan" + And that "usr_username" is set to "joshua" - Scenario Outline: Create a new departments in the workspace - Given POST this data: - """ - { +Scenario Outline: Create a new departments in the workspace + Given POST this data: + """ + { - "dep_title" : "", - "dep_parent" : "", - "dep_status" : "" + "dep_title" : "", + "dep_parent" : "", + "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_" + } + """ + 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_" - Examples: + Examples: - | test_description | dep_uid_number | dep_title | dep_parent | dep_status | - | Created a department padre with status active | 1 | Department A | | ACTIVE | - | Created a department hijo with status active | 2 | Department B | 28036037252d56752770585009591640 | ACTIVE | - | Created a department padre with status inactive | 3 | Department C | | INACTIVE | - | Created a department hijo with status inactive | 4 | Department D | 28036037252d56752770585009591640 | INACTIVE | - | Created a department with character special | 5 | Department E!@#$%^& | | ACTIVE | + | test_description | dep_uid_number | dep_title | dep_parent | dep_status | + | Created a department padre with status active | 1 | Department A | | ACTIVE | + | Created a department hijo with status active | 2 | Department B | 28036037252d56752770585009591640 | ACTIVE | + | Created a department padre with status inactive | 3 | Department C | | INACTIVE | + | Created a department hijo with status inactive | 4 | Department D | 28036037252d56752770585009591640 | INACTIVE | + | Created a department with character special | 5 | Department E!@#$%^& | | ACTIVE | - Scenario: Create a department with same name - Given POST this data: - """ - { +Scenario: Create a department with same name + Given POST this data: + """ + { - "dep_title" : "Department A", - "dep_parent" : "", - "dep_status" : "ACTIVE" + "dep_title" : "Department A", + "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" + } + """ + 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 20 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 18 record +Scenario: List all Departaments in the workspace when exactly are 18 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 18 record - Scenario Outline: Update a department created in this script - Given PUT this data: - """ - { +Scenario Outline: Update a department created in this script + Given PUT this data: + """ + { - "dep_title" : "", - "dep_status" : "" + "dep_title" : "", + "dep_status" : "" - } - """ - And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_" - 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" + } + """ + And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_" + 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: + Examples: - | test_description | dep_uid_number | dep_title | dep_status | - | Update of field title and status of department | 1 | Department A UPDATE | INACTIVE | - | Update of field title and status of department | 2 | Department B UPDATE | ACTIVE | + | test_description | dep_uid_number | dep_title | dep_status | + | Update of field title and status of department | 1 | Department A UPDATE | INACTIVE | + | Update of field title and status of department | 2 | Department B 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_" - 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 "" - And that "dep_status" is set to "" - Examples: +Scenario Outline: Update a department putting the same name of a department created in this script + Given PUT this data: + """ + { - | dep_uid_number | dep_title | dep_status | - | 1 | Department A UPDATE | INACTIVE | - | 3 | Department B UPDATE | ACTIVE | + "dep_title" : "", + "dep_status" : "" + + } + """ + And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_" + And I request "department" + Then the response status code should be 400 + And the response status message should have the following text "exist" + + Examples: + + | dep_uid_number | dep_title | dep_status | + | 5 | Department C | INACTIVE | - Scenario Outline: Assign user to department created in this script - Given PUT this data: - """ - { +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_" + 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 "" + And that "dep_status" is set to "" - } - """ - And that I want to update "Assigned users" - And I request "department/dep_uid/assign-user/" with the key "dep_uid" stored in session array as variable "dep_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: + + | dep_uid_number | dep_title | dep_status | + | 1 | Department A UPDATE | INACTIVE | + | 3 | Department B UPDATE | ACTIVE | + + +Scenario Outline: Assign user to department created in this script + Given PUT this data: + """ + { + + } + """ + And that I want to update "Assigned users" + And I request "department/dep_uid/assign-user/" with the key "dep_uid" stored in session array as variable "dep_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: + Examples: - | Description | dep_uid_number | usr_uid | - | Assign user arlene in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 | - | Assign user andrew in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 | - | Assign user amy in department 2 created in this script | 2 | 25286582752d56713231082039265791 | - | Assign user sandra in department 2 created in this script | 2 | 25286582752d56713231082039265791 | - | Assign user francis in department 5 created in this script | 5 | 62511352152d5673bba9cd4062743508 | + | Description | dep_uid_number | usr_uid | + | Assign user arlene in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 | + | Assign user andrew in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 | + | Assign user amy in department 2 created in this script | 2 | 25286582752d56713231082039265791 | + | Assign user sandra in department 2 created in this script | 2 | 25286582752d56713231082039265791 | + | Assign user francis in department 5 created in this script | 5 | 62511352152d5673bba9cd4062743508 | - Scenario Outline: Set manager user to department - Given PUT this data: - """ - { +Scenario Outline: Set manager user to department + Given PUT this data: + """ + { - } - """ - And that I want to update "Department supervisor" - And I request "department/dep_uid/set-manager/" with the key "dep_uid" stored in session array as variable "dep_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" + } + """ + And that I want to update "Department supervisor" + And I request "department/dep_uid/set-manager/" with the key "dep_uid" stored in session array as variable "dep_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: - Examples: - - | Description | dep_uid_number | usr_uid | - | Set manager user "arlene" in group 1 | 1 | 23085901752d5671483a4c2059274810 | - | Set manager user "sandra" in group 2 | 2 | 25286582752d56713231082039265791 | + | Description | dep_uid_number | usr_uid | + | Set manager user "arlene" in group 1 | 1 | 23085901752d5671483a4c2059274810 | + | Set manager user "sandra" in group 2 | 2 | 25286582752d56713231082039265791 | - Scenario Outline: Get a single department of created in this script - Given that I want to get a resource with the key "dep_uid" stored in session array as variable "dep_uid_" - And I request "department" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the type is "object" - And that "dep_title" is set to "" - And that "dep_status" is set to "" - And that "dep_manager" is set to "" - And that "dep_manager_username" is set to "" - And that "dep_manager_firstname" is set to "" - And that "dep_manager_lastname" is set to "" +Scenario Outline: Get a single department of created in this script + Given that I want to get a resource with the key "dep_uid" stored in session array as variable "dep_uid_" + And I request "department" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And that "dep_title" is set to "" + And that "dep_status" is set to "" + And that "dep_manager" is set to "" + And that "dep_manager_username" is set to "" + And that "dep_manager_firstname" is set to "" + And that "dep_manager_lastname" is set to "" - Examples: + Examples: - | dep_uid_number | dep_title | dep_status | dep_manager | dep_manager_username | dep_manager_firstname | dep_manager_lastname | - | 1 | Department A UPDATE | ACTIVE | 23085901752d5671483a4c2059274810 | arlene | Arlene | Cleveland | - | 2 | Department B | ACTIVE | 25286582752d56713231082039265791 | sandra | Sandra | Casey | + | dep_uid_number | dep_title | dep_status | dep_manager | dep_manager_username | dep_manager_firstname | dep_manager_lastname | + | 1 | Department A UPDATE | ACTIVE | 23085901752d5671483a4c2059274810 | arlene | Arlene | Cleveland | + | 2 | Department B | ACTIVE | 25286582752d56713231082039265791 | sandra | Sandra | Casey | - Scenario Outline: Unassign a User to department - Given POST this data: - """ - { +Scenario Outline: Unassign a User to department + Given POST this data: + """ + { - } - """ - And that I want to update "Assigned users" - And I request "department/dep_uid/unassign-user/" with the key "dep_uid" stored in session array as variable "dep_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" + } + """ + And that I want to update "Assigned users" + And I request "department/dep_uid/unassign-user/" with the key "dep_uid" stored in session array as variable "dep_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: - Examples: - - | Description | dep_uid_number | usr_uid | - | Unassign user arlene in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 | - | Unassign user andrew in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 | - | Unassign user amy in department 2 created in this script | 2 | 25286582752d56713231082039265791 | - | Unassign user sandra in department 2 created in this script | 2 | 25286582752d56713231082039265791 | - | Unassign user francis in department 5 created in this script | 5 | 62511352152d5673bba9cd4062743508 | + | Description | dep_uid_number | usr_uid | + | Unassign user arlene in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 | + | Unassign user andrew in department 1 created in this script | 1 | 23085901752d5671483a4c2059274810 | + | Unassign user amy in department 2 created in this script | 2 | 25286582752d56713231082039265791 | + | Unassign user sandra in department 2 created in this script | 2 | 25286582752d56713231082039265791 | + | Unassign user francis in department 5 created in this script | 5 | 62511352152d5673bba9cd4062743508 | - Scenario: List all Departaments in the workspace when exactly are 15 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 18 record +Scenario: List all Departaments in the workspace when exactly are 15 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 18 record - 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_" - 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 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_" + 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: + Examples: - | dep_uid_number | - | 1 | - | 2 | - | 3 | - | 4 | - | 5 | + | 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 15 record \ No newline at end of file +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 15 record \ No newline at end of file diff --git a/features/backend/admin_setup/departments/negative_tests_department.feature b/features/backend/admin_setup/departments/negative_tests_department.feature index 3c03f5401..e4004f204 100644 --- a/features/backend/admin_setup/departments/negative_tests_department.feature +++ b/features/backend/admin_setup/departments/negative_tests_department.feature @@ -6,16 +6,16 @@ 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: - """ - { + Given POST this data: + """ + { - "dep_title" : "", - "dep_parent" : "", - "dep_status" : "" + "dep_title" : "", + "dep_parent" : "", + "dep_status" : "" - } - """ + } + """ And I request "department" Then the response status code should be And the response status message should have the following text "" @@ -29,7 +29,7 @@ Scenario Outline: Create a new departments in the workspace with bad parameters Scenario Outline: Assign user to department (NEGATIVE TEST) - Given PUT this data: + Given PUT this data: """ { @@ -50,8 +50,7 @@ Scenario Outline: Create a new departments in the workspace with bad parameters Scenario: Delete a department when have asigned user (negative tests) - Given that I want to delete a "Department" - And I request "department/15978182252d5674d210310076985235" - Then the response status code should be 400 - And the response status message should have the following text "cannot be deleted" - \ No newline at end of file + Given that I want to delete a "Department" + And I request "department/15978182252d5674d210310076985235" + Then the response status code should be 400 + And the response status message should have the following text "cannot be deleted" \ No newline at end of file diff --git a/features/backend/admin_setup/pm_group/main_tests_pm_group.feature b/features/backend/admin_setup/pm_group/main_tests_pm_group.feature index 8d5173348..f59d015ba 100644 --- a/features/backend/admin_setup/pm_group/main_tests_pm_group.feature +++ b/features/backend/admin_setup/pm_group/main_tests_pm_group.feature @@ -6,6 +6,15 @@ Feature: PM Group Main Tests Background: Given that I have a valid access_token + Scenario: Get the Groups list when there are 20 records + And I request "groups?filter=&start=0&limit=50" + 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 20 records + + Scenario Outline: Get list Groups of workspace using different filters And I request "groups?filter=&start=&limit=" And the content type is "application/json" @@ -32,7 +41,7 @@ Feature: PM Group Main Tests | Search letters 'de | de | 0 | 5 | 2 | 200 | - Scenario Outline: Create 3 new Groups + Scenario Outline: Create 3 new Groups Given POST this data: """ { @@ -55,6 +64,19 @@ Feature: PM Group Main Tests | 1 | Demo Group2 for main behat | ACTIVE | | 2 | Demo Group3 for main behat | INACTIVE | + + Scenario: Create new group with same name + Given POST this data: + """ + { + "grp_title": "Accounting", + "grp_status": "ACTIVE" + } + """ + And I request "group" + Then the response status code should be 400 + And the response status message should have the following text "already exists" + Scenario: Get the Groups list when there are 23 records And I request "groups?filter=&start=0&limit=50" @@ -106,6 +128,37 @@ Feature: PM Group Main Tests | 1 | Update Demo Group2 for main behat | INACTIVE | | 2 | Update Demo Group3 for main behat | ACTIVE | + + Scenario Outline: Update Group putting the same name of a group created in this script + Given PUT this data: + """ + { + "grp_title": "", + "grp_status": "" + } + """ + And that I want to update a resource with the key "grp_uid" stored in session array as variable "grp_uid_" + And I request "group" + Then the response status code should be 400 + And the response status message should have the following text "exists" + + Examples: + + | grp_uid_number | grp_title | grp_status | + | 2 | Demo Group2 for main behat | INACTIVE | + + + + + + + + + + + + + #ASSIGN USER TO GROUP diff --git a/features/backend/admin_setup/pm_group/negative_tests_pm_group.feature b/features/backend/admin_setup/pm_group/negative_tests_pm_group.feature index b4fa63ee4..f1c1a98af 100644 --- a/features/backend/admin_setup/pm_group/negative_tests_pm_group.feature +++ b/features/backend/admin_setup/pm_group/negative_tests_pm_group.feature @@ -53,4 +53,16 @@ Feature: PM Group Negative Tests And I request "group/66623507552d56742865613066097298/user" And the content type is "application/json" Then the response status code should be 400 - And the response status message should have the following text "usr_uid" \ No newline at end of file + And the response status message should have the following text "usr_uid" + + + Scenario: Assign the same user to the group + Given POST this data: + """ + { + "usr_uid": "00000000000000000000000000000001" + } + """ + And I request "group/70084316152d56749e0f393054862525/user" + Then the response status code should be 400 + And the response status message should have the following text "already assigned" \ No newline at end of file diff --git a/features/backend/admin_setup/pm_user/main_tests_pm_user.feature b/features/backend/admin_setup/pm_user/main_tests_pm_user.feature index e3b4e4d71..6d156eb58 100644 --- a/features/backend/admin_setup/pm_user/main_tests_pm_user.feature +++ b/features/backend/admin_setup/pm_user/main_tests_pm_user.feature @@ -100,13 +100,13 @@ Feature: User Main Tests Examples: - | Test_description | usr_number | usr_photo | + | Test_description | usr_number | usr_photo | | Create without replaced by, calendar | 1 | /home/wendy/photo/pic1.jpg | | Create without calendar | 2 | /home/wendy/photo/pic2.jpg | | Create with all fields | 3 | /home/wendy/photo/pic3.jpg | - Scenario: Get the users List when there are exactly 63 users + Scenario: Get the users List when there are exactly 68 users And I request "users" And the content type is "application/json" Then the response status code should be 200 @@ -115,15 +115,39 @@ Feature: User Main Tests And the response has 68 records + Scenario Outline: Create new User with same name + Given POST this data: + """ + { + "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": "" + } + """ + And I request "user" + Then the response status code should be 400 + And the response status message should have the following text "already exists" + + Examples: - Scenario: Get the users List when there are exactly 63 users - And I request "users" - 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 68 records - + | 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 | + | Amy | Connelly | amy | colosaqatest@gmail.com | | | | | | | | | 2015-01-14 | | ACTIVE | PROCESSMAKER_OPERATOR | sample | sample | + Scenario Outline: Update User and then check if the values had changed Given PUT this data: @@ -198,7 +222,42 @@ Feature: User Main Tests | 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 | - Scenario: Get the users List when there are exactly 63 users + Scenario Outline: Update User with the same data from an existing user + Given PUT this data: + """ + { + "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": "" + } + """ + And that I want to update a resource with the key "usr_uid" stored in session array as variable "usr_uid_" + And I request "user" + Then the response status code should be 400 + And the response status message should have the following text "already exists" + + Examples: + + | 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 | + | 4 | 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 | + + + Scenario: Get the users List when there are exactly 68 users And I request "users" And the content type is "application/json" Then the response status code should be 200 @@ -206,6 +265,7 @@ Feature: User Main Tests And the type is "array" And the response has 68 records + Scenario Outline: Delete all users created previously in this script Given that I want to delete a resource with the key "usr_uid" stored in session array as variable "usr_uid_" And I request "user" @@ -230,5 +290,4 @@ Feature: User Main Tests Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" - And the response has 63 records - \ No newline at end of file + And the response has 63 records \ No newline at end of file diff --git a/features/backend/admin_setup/roles/main_tests_roles.feature b/features/backend/admin_setup/roles/main_tests_roles.feature index 45e894224..2d8706669 100644 --- a/features/backend/admin_setup/roles/main_tests_roles.feature +++ b/features/backend/admin_setup/roles/main_tests_roles.feature @@ -105,6 +105,27 @@ Scenario: Get list of Roles And the response has 11 records +Scenario Outline: Create new Role with same name + Given POST this data: + """ + { + "rol_code": "", + "rol_name": "", + "rol_status": "" + } + + """ + And I request "role" + Then the response status code should be 400 + And the response status message should have the following text "already exists" + + Examples: + + | rol_code | rol_name | rol_status | + | PROCESSMAKER_OPERATOR | Operator | ACTIVE | + + + #Assign users to role Scenario Outline: List assigned Users to Role & List available Users to assign to Role @@ -216,6 +237,23 @@ Scenario Outline: Assign User to Role | Assign user "olivia" | 8 | 73005191052d56727901138030694610 | +Scenario Outline: Assign same User to Role "1" + Given POST this data: + """ + { + "usr_uid": "" + } + """ + And I request "role/rol_uid/user" with the key "rol_uid" stored in session array as variable "rol_uid_" + Then the response status code should be 400 + And the response status message should have the following text "already assigned" + + Examples: + + | Description | rol_uid_number | usr_uid | + | Assign user "aaron" | 1 | 51049032352d56710347233042615067 | + + Scenario Outline: List assigned Users to Role & List available Users to assign to Role Given I request "role/rol_uid/users" with the key "rol_uid" stored in session array as variable "rol_uid_" Then the response status code should be 200 @@ -423,6 +461,23 @@ Scenario Outline: Assign Permission "PM_DASHBOARD" to Role | Assign Permissions "PM_FOLDER_DEL" to rol 8 | 8 | 00000000000000000000000000000019 | +Scenario Outline: Assign same Permission "PM_DASHBOARD" to Role 1 + Given POST this data: + """ + { + "per_uid": "" + } + """ + And I request "role/rol_uid/permission" with the key "rol_uid" stored in session array as variable "rol_uid_" + Then the response status code should be 400 + And the response status message should have the following text "already assigned to the role" + + Examples: + + | Description | rol_uid_number | per_uid | + | Assign Permissions "PM_LOGIN" to rol 1 | 1 | 00000000000000000000000000000001 | + + Scenario Outline: List assigned Permissions to Role & List available Permissions to assign to Role Given I request "role/rol_uid/permissions" with the key "rol_uid" stored in session array as variable "rol_uid_" Then the response status code should be 200 @@ -583,6 +638,27 @@ Scenario Outline: Get a single Role created in this script | Update name of role created in this script | 8 | PROCESSMAKER_OCHO | update*'123 | INACTIVE | +Scenario Outline: Update Role with the same data from an existing role + Given PUT this data: + """ + { + "rol_code": "", + "rol_name": "", + "rol_status": "" + } + + """ + And that I want to update a resource with the key "rol_uid" stored in session array as variable "rol_uid_" + And I request "role" + Then the response status code should be 400 + And the response status message should have the following text "already exists" + + Examples: + + | rol_uid_number | rol_code | rol_name | rol_status | + | 2 | PROCESSMAKER_TRES | Rol con code administrator | INACTIVE | + + Scenario: Get list of Roles Given I request "roles" Then the response status code should be 200