From 242bd0b8d24eeb00fe300d60500521127baf9fe9 Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Wed, 16 Apr 2014 16:27:38 -0400 Subject: [PATCH] Modificaciones a los features category, departments y triggers --- .../category/main_tests_category.feature | 4 +- .../basic_sequence_department.feature | 20 ++++----- .../departments/main_tests_department.feature | 45 +++++++++---------- .../triggers/negative_tests_triggers.feature | 19 +++++++- 4 files changed, 48 insertions(+), 40 deletions(-) diff --git a/features/backend/admin_setup/category/main_tests_category.feature b/features/backend/admin_setup/category/main_tests_category.feature index c8f350a30..061c587de 100644 --- a/features/backend/admin_setup/category/main_tests_category.feature +++ b/features/backend/admin_setup/category/main_tests_category.feature @@ -80,7 +80,7 @@ Scenario Outline: Update the Category created in this script "cat_name": "cat_name" } """ - And I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_" + And I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_" And store "cat_uid" in session array as variable "cat_uid_" And the content type is "application/json" @@ -96,7 +96,7 @@ Scenario Outline: Update the Category created in this script Scenario Outline: Get a Category specific - Given I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_" + Given I request "project/category/cat_uid" with the key "cat_uid" stored in session array as variable "cat_uid_" Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" diff --git a/features/backend/admin_setup/departments/basic_sequence_department.feature b/features/backend/admin_setup/departments/basic_sequence_department.feature index 9e9bbecaa..b81f14c22 100644 --- a/features/backend/admin_setup/departments/basic_sequence_department.feature +++ b/features/backend/admin_setup/departments/basic_sequence_department.feature @@ -86,14 +86,13 @@ Background: Scenario: Assign user to department created in this script (Assign user: arlene) - Given POST this data: + Given PUT this data: """ { } """ - And that I want to update a resource with the key "dep_uid" stored in session array - And I request "department//assign-user/23085901752d5671483a4c2059274810" + And I request "department//assign-user/23085901752d5671483a4c2059274810" with the key "dep_uid" stored in session array Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" @@ -101,14 +100,13 @@ Background: Scenario: Set manager user to department (new supervisor of department: jacob) - Given POST this data: + Given PUT this data: """ { } """ - And that I want to update a resource with the key "dep_uid" stored in session array - And I request "department//set-manager/24768775452d5671dbc1e92021979323" + And I request "department//set-manager/24768775452d5671dbc1e92021979323" with the key "dep_uid" stored in session array Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" @@ -118,14 +116,13 @@ Background: Scenario: Unassign a User to department (Unassign user: arlene) - Given POST this data: + Given PUT this data: """ { } """ - And that I want to update a resource with the key "dep_uid" stored in session array - And I request "department//unassign-user/23085901752d5671483a4c2059274810" + And I request "department//unassign-user/23085901752d5671483a4c2059274810" with the key "dep_uid" stored in session array Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" @@ -134,14 +131,13 @@ Background: Scenario: Set manager user to department (new supervisor of department: dylan) - Given POST this data: + Given PUT this data: """ { } """ - And that I want to update a resource with the key "dep_uid" stored in session array - And I request "department//set-manager/38102442252d5671a629009013495090" + And I request "department//set-manager/38102442252d5671a629009013495090" with the key "dep_uid" stored in session array Then the response status code should be 200 And the response charset is "UTF-8" And the content type is "application/json" diff --git a/features/backend/admin_setup/departments/main_tests_department.feature b/features/backend/admin_setup/departments/main_tests_department.feature index ad76211dd..910604054 100644 --- a/features/backend/admin_setup/departments/main_tests_department.feature +++ b/features/backend/admin_setup/departments/main_tests_department.feature @@ -7,7 +7,7 @@ Background: Given that I have a valid access_token - Scenario: List all Departaments in the workspace when exactly are 16 departaments created + 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" @@ -39,12 +39,7 @@ Background: And the response charset is "UTF-8" And the type is "array" And the response has 4 record - And the "usr_username" property equals "joseph" - And the "usr_firstname" property equals "Joseph" - And the "usr_lastname" property equals "Bittner" - And the "usr_status" property equals "ACTIVE" - And the "usr_supervisor" property equals false - + Scenario Outline: Create a new departments in the workspace Given POST this data: @@ -67,11 +62,11 @@ Background: 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 | + | 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 @@ -79,7 +74,7 @@ Background: """ { - "dep_title" : "Department 1", + "dep_title" : "Department A", "dep_parent" : "", "dep_status" : "ACTIVE" @@ -95,7 +90,7 @@ Background: 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 record + And the response has 18 record Scenario Outline: Update a department created in this script @@ -118,8 +113,8 @@ Background: 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 | + | Update of field title and status of department | A | Department A UPDATE | INACTIVE | + | Update of field title and status of department | C | Department B UPDATE | ACTIVE | Scenario Outline: Get a single department after update of the department created of this script @@ -135,8 +130,8 @@ Background: Examples: | dep_uid_number | dep_title | dep_status | - | 1 | Department 1 UPDATE | INACTIVE | - | 3 | Department 3 UPDATE | ACTIVE | + | 1 | Department A UPDATE | INACTIVE | + | 3 | Department B UPDATE | ACTIVE | Scenario Outline: Assign user to department created in this script @@ -146,7 +141,7 @@ Background: } """ - And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_" + 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//assign-user/" Then the response status code should be 200 And the response charset is "UTF-8" @@ -171,7 +166,7 @@ Background: } """ - And that I want to update a resource with the key "dep_uid" stored in session array as variable "dep_uid_" + 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//set-manager/" Then the response status code should be 200 And the response charset is "UTF-8" @@ -188,7 +183,7 @@ Background: 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_" + 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" @@ -203,8 +198,8 @@ Background: Examples: | dep_uid_number | dep_title | dep_status | dep_manager | dep_manager_username | dep_manager_firstname | dep_manager_lastname | - | 1 | Department 1 UPDATE | ACTIVE | 23085901752d5671483a4c2059274810 | arlene | Arlene | Cleveland | - | 2 | Department 2 | ACTIVE | 25286582752d56713231082039265791 | sandra | Sandra | Casey | + | 1 | Department A UPDATE | ACTIVE | 23085901752d5671483a4c2059274810 | arlene | Arlene | Cleveland | + | 2 | Department B | ACTIVE | 25286582752d56713231082039265791 | sandra | Sandra | Casey | Scenario Outline: Unassign a User to department @@ -214,7 +209,7 @@ Background: } """ - And that I want to update a resource with the key "dep_uid" stored in session array + And that I want to update a resource with the key "dep_uid" stored in session array And I request "department//unassign-user/23085901752d5671483a4c2059274810" Then the response status code should be 200 And the response charset is "UTF-8" @@ -238,7 +233,7 @@ Background: 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 record + And the response has 18 record Scenario Outline: Delete a department created in this script diff --git a/features/backend/projects/triggers/negative_tests_triggers.feature b/features/backend/projects/triggers/negative_tests_triggers.feature index 07c877def..317216960 100644 --- a/features/backend/projects/triggers/negative_tests_triggers.feature +++ b/features/backend/projects/triggers/negative_tests_triggers.feature @@ -24,4 +24,21 @@ Feature: Triggers Negative Tests | test_description | project | tri_title | tri_description |tri_type | error_code | error_message | | Field required tri title | 251815090529619a99a2bf4013294414 | | Trigger con nombre en blanco |SCRIPT | 400 | tri_title | - \ No newline at end of file + + +#Test delete trigger when it asignee on the step + +Scenario: Get the Triggers List when there are exactly two triggers + Given I request "project/99209594750ec27ea338927000421575/triggers" + 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 response has 5 records + + +Scenario: Delete a Triggers created in the process - (Derivation rules - sequential) + Given that I want to delete a "Trigger" + And I request "project/99209594750ec27ea338927000421575/trigger/96762672253418c5fde42f1084230135" + Then the response status code should be 400 + And the response status message should have the following text "Dependencies were found for this trigger" \ No newline at end of file