From 9ecf38eac551fb578ebca1780366a56cdf19b4e0 Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Wed, 9 Apr 2014 16:52:10 -0400 Subject: [PATCH] =?UTF-8?q?=C3=A4vaces=20en=20categories,=20departments,?= =?UTF-8?q?=20case=20variables=20y=20case=20tracker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../category/basic_sequence_category.feature | 2 +- .../basic_sequence_department.feature | 96 ++++++++++--- .../departments/main_tests_department.feature | 136 +++++++++++++++--- .../negative_tests_department.feature | 24 +++- .../main_tests_case_variables.feature | 81 +---------- .../negative_tests_case_variables.feature | 32 +---- .../case_tracker_move_position.feature | 4 +- 7 files changed, 221 insertions(+), 154 deletions(-) diff --git a/features/backend/admin_setup/settings/category/basic_sequence_category.feature b/features/backend/admin_setup/settings/category/basic_sequence_category.feature index 9322f1830..9b4801d88 100644 --- a/features/backend/admin_setup/settings/category/basic_sequence_category.feature +++ b/features/backend/admin_setup/settings/category/basic_sequence_category.feature @@ -1,4 +1,4 @@ -@ProcessMakerMichelangelo @RestAPI +ou @ProcessMakerMichelangelo @RestAPI Feature: Process Category Requirements: a workspace with the workspace with one process category diff --git a/features/backend/admin_setup/users/departments/basic_sequence_department.feature b/features/backend/admin_setup/users/departments/basic_sequence_department.feature index a2f68d0a9..c55e80782 100644 --- a/features/backend/admin_setup/users/departments/basic_sequence_department.feature +++ b/features/backend/admin_setup/users/departments/basic_sequence_department.feature @@ -12,7 +12,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 16 record + And the response has 15 record Scenario: Get a single department of de Sales Division department @@ -31,6 +31,15 @@ Background: 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 Available User (Department: Sales Division) + Given I request "department/12921473252d567506e6e63079240767/available-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 7 record + Scenario: Create a new department in the workspace Given POST this data: @@ -56,7 +65,7 @@ Background: """ { "dep_title" : "TestDepartment Update", - "dep_status" : "INACTIVE" + "dep_status" : "ACTIVE" } """ And that I want to update a resource with the key "dep_uid" stored in session array @@ -67,33 +76,78 @@ Background: 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" + And the "dep_status" property equals "ACTIVE" - #Scenario: Assign user to department created in this script - # Given POST this data: - # """ - # { + Scenario: Assign user to department created in this script (Assign user: arlene) + Given POST this data: + """ + { - # "dep_title" : "TestDepartment", - # "dep_parent" : "",git - # "dep_status" : "ACTIVE" + } + """ + And that I want to update a resource with the key "dep_uid" stored in session array + And I request "department//assign-user/23085901752d5671483a4c2059274810" + 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 store "dep_uid" in session array - #} - #""" - #And I request "department//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: Set manager user to department (new supervisor of department: jacob) + Given POST 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" + 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 store "dep_uid" in session array + + + + Scenario: Unassign a User to department (Unassign user: arlene) + Given POST 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" + 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 store "dep_uid" in session array + + + Scenario: Set manager user to department (new supervisor of department: dylan) + Given POST 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" + 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 store "dep_uid" in session array Scenario: List all Departaments in the workspace when exactly are 16 departaments created @@ -101,7 +155,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 17 record + And the response has 16 record Scenario: Delete a department created in this script @@ -118,4 +172,4 @@ 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 16 record \ No newline at end of file + And the response has 15 record \ No newline at end of file diff --git a/features/backend/admin_setup/users/departments/main_tests_department.feature b/features/backend/admin_setup/users/departments/main_tests_department.feature index edf9f0313..d8406fd32 100644 --- a/features/backend/admin_setup/users/departments/main_tests_department.feature +++ b/features/backend/admin_setup/users/departments/main_tests_department.feature @@ -12,7 +12,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 16 record + And the response has 15 record Scenario: Get a single department of de Sales Division department @@ -31,8 +31,21 @@ Background: 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 + 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: """ @@ -77,12 +90,12 @@ Background: And the response status message should have the following text "exist" - Scenario: List all Departaments in the workspace when exactly are 21 departaments created + 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 19 record + And the response has 20 record Scenario Outline: Update a department created in this script @@ -126,25 +139,108 @@ Background: | 3 | Department 3 UPDATE | ACTIVE | - #Scenario: Assign user to department created in this script - # Given POST this data: - # """ - # { + Scenario Outline: Assign user to department created in this script + Given PUT this data: + """ + { - # "dep_title" : "TestDepartment", - # "dep_parent" : "",git - # "dep_status" : "ACTIVE" + } + """ + 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" + And the content type is "application/json" + And the type is "object" + And store "dep_uid" in session array - #} - #""" - #And I request "department//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 + 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 | + Scenario Outline: Set manager user to department + Given PUT this data: + """ + { + + } + """ + 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" + And the content type is "application/json" + And the type is "object" + And store "dep_uid" in session array + + + 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 | + + + 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: + + | 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 | + + + Scenario Outline: Unassign a User to department + Given POST 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" + 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 store "dep_uid" in session array + + + 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 | + + + 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 20 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" @@ -168,4 +264,4 @@ 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 16 record \ No newline at end of file + And the response has 15 record \ No newline at end of file diff --git a/features/backend/admin_setup/users/departments/negative_tests_department.feature b/features/backend/admin_setup/users/departments/negative_tests_department.feature index 26ce78402..351054960 100644 --- a/features/backend/admin_setup/users/departments/negative_tests_department.feature +++ b/features/backend/admin_setup/users/departments/negative_tests_department.feature @@ -25,13 +25,33 @@ Scenario Outline: Create a new departments in the workspace with bad parameters | 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 | + | Invalid dep_status | Department 1 | | SAMPLE | 400 | dep_status | + + Scenario Outline: Assign user to department (NEGATIVE TEST) + Given PUT this data: + """ + { + + } + """ + And I request "department//assign-user/" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + + | Description | dep_uid | usr_uid | error_code | error_message | + | Invalid usr_uid | 56255940652d5674c75bc70062927441 | 23085900000000000000002059274810 | 400 | usr_uid | + | Invalid dep_uid | 56255900000000000000000062927441 | 23085901752d5671483a4c2059274810 | 400 | dep_uid | + | Field Requered usr_uid | 56255940652d5674c75bc70062927441 | | 404 | Not Found | + | Field Requered dep_uid | | 25286582752d56713231082039265791 | 404 | Not Found | + Scenario: Delete a department when have asigned user (negative tests) Given that I want to delete a resource with the key "15978182252d5674d210310076985235" And I request "department/15978182252d5674d210310076985235" Then the response status code should be 400 - And the response status message should have the following text "" + And the response status message should have the following text "" \ No newline at end of file diff --git a/features/backend/application_cases/case_variables/main_tests_case_variables.feature b/features/backend/application_cases/case_variables/main_tests_case_variables.feature index cd71767f6..c9f6b2e54 100644 --- a/features/backend/application_cases/case_variables/main_tests_case_variables.feature +++ b/features/backend/application_cases/case_variables/main_tests_case_variables.feature @@ -50,30 +50,7 @@ Scenario: Returns the variables can be system variables and/or case variables. And the "sample" property in object 1 of property "grid" equals "jose" And the "currency1" property in object 1 of property "grid" equals "12,334,444.00" And the "percentage1" property in object 1 of property "grid" equals "333.00 %" - And the "suggest1_label" property in object 1 of property "grid" equals "gavin" - And the "suggest1" property in object 1 of property "grid" equals "33140476452d5671b0abda5073786635" - And the "textarea1" property in object 1 of property "grid" equals "ninguno" - And the "dropdown1" property in object 1 of property "grid" equals "dos" - And the "dropdown1_label" property in object 1 of property "grid" equals "dos" - And the "yesno1" property in object 1 of property "grid" equals "1" - And the "checkbox1" property in object 1 of property "grid" equals "On" - And the "date1" property in object 1 of property "grid" equals "2014-03-13" - And the "link1" property in object 1 of property "grid" equals "http://www.google.com/" - And the "link1_label" property in object 1 of property "grid" equals "link1" - And the "sample" property in object 2 of property "grid" equals "maria" - And the "currency1" property in object 2 of property "grid" equals "132,424.00" - And the "percentage1" property in object 2 of property "grid" equals "344.00 %" - And the "suggest1_label" property in object 2 of property "grid" equals "emily" - And the "suggest1" property in object 2 of property "grid" equals "34289569752d5673d310e82094574281" - And the "textarea1" property in object 2 of property "grid" equals "sample" - And the "dropdown1" property in object 2 of property "grid" equals "uno" - And the "dropdown1_label" property in object 2 of property "grid" equals "uno" - And the "yesno1" property in object 2 of property "grid" equals "0" - And the "checkbox1" property in object 2 of property "grid" equals "Off" - And the "date1" property in object 2 of property "grid" equals "2014-03-29" - And the "link1" property in object 2 of property "grid" equals "http://www.google.com/" - And the "link1_label" property in object 2 of property "grid" equals "link1" - + Scenario: Sends variables to a case Given PUT this data: @@ -111,7 +88,7 @@ Scenario: Returns the variables can be system variables and/or case variables. And the response charset is "UTF-8" And the type is "object" And the "nameany" property equals "sample-put" - And the "namealphabetic" property equals "juan-put" + And the "namealphabetic" property equals "juanput" And the "namealphanumeric" property equals "sample123567" And the "nameinteger" property equals "1313200000" And the "namerealnumber" property equals "4324325000567.12" @@ -143,35 +120,7 @@ Scenario: Returns the variables can be system variables and/or case variables. And the "date2" property equals "2013-11-08" And the "date3" property equals "2014-03-03" And the "date4" property equals "2014-03-01" - And the "suggest2" property equals "51049032352d56710347233042615067" - And the "suggest2_label" property equals "aaron" - And the "sample" property equals "unoput" - And the "currency1" property equals "133,000.00" - And the "percentage1" property equals "424.00 %" - And the "suggest1_label" property equals "gavin" - And the "suggest1" property equals "33140476452d5671b0abda5073786635" - And the "textarea1" property equals "ninguno" - And the "dropdown1" property equals "dos" - And the "dropdown1_label" property equals "dos" - And the "yesno1" property equals "1" - And the "checkbox1" property equals "On" - And the "date1" property equals "2014-03-13" - And the "link1" property equals "http://www.google.com/" - And the "link1_label" property equals "link1" - And the "sample" property equals "maria" - And the "currency1" property equals "132,424.00" - And the "percentage1" property equals "344.00 %" - And the "suggest1_label" property equals "emily" - And the "suggest1" property equals "34289569752d5673d310e82094574281" - And the "textarea1" property equals "sample" - And the "dropdown1" property equals "uno" - And the "dropdown1_label" property equals "uno" - And the "yesno1" property equals "0" - And the "checkbox1" property equals "Off" - And the "date1" property equals "2014-03-29" - And the "link1" property equals "http://www.google.com/" - And the "link1_label" property equals "link1" - + Scenario: Return variables to a case Given PUT this data: @@ -246,26 +195,4 @@ Scenario: Returns the variables can be system variables and/or case variables. And the "sample" property in object 1 of property "grid" equals "jose" And the "currency1" property in object 1 of property "grid" equals "12,334,444.00" And the "percentage1" property in object 1 of property "grid" equals "333.00 %" - And the "suggest1_label" property in object 1 of property "grid" equals "gavin" - And the "suggest1" property in object 1 of property "grid" equals "33140476452d5671b0abda5073786635" - And the "textarea1" property in object 1 of property "grid" equals "ninguno" - And the "dropdown1" property in object 1 of property "grid" equals "dos" - And the "dropdown1_label" property in object 1 of property "grid" equals "dos" - And the "yesno1" property in object 1 of property "grid" equals "1" - And the "checkbox1" property in object 1 of property "grid" equals "On" - And the "date1" property in object 1 of property "grid" equals "2014-03-13" - And the "link1" property in object 1 of property "grid" equals "http://www.google.com/" - And the "link1_label" property in object 1 of property "grid" equals "link1" - And the "sample" property in object 1 of property "grid" equals "maria" - And the "currency1" property in object 1 of property "grid" equals "132,424.00" - And the "percentage1" property in object 1 of property "grid" equals "344.00 %" - And the "suggest1_label" property in object 1 of property "grid" equals "emily" - And the "suggest1" property in object 1 of property "grid" equals "34289569752d5673d310e82094574281" - And the "textarea1" property in object 1 of property "grid" equals "sample" - And the "dropdown1" property in object 1 of property "grid" equals "uno" - And the "dropdown1_label" property in object 1 of property "grid" equals "uno" - And the "yesno1" property in object 1 of property "grid" equals "0" - And the "checkbox1" property in object 1 of property "grid" equals "Off" - And the "date1" property in object 1 of property "grid" equals "2014-03-29" - And the "link1" property in object 1 of property "grid" equals "http://www.google.com/" - And the "link1_label" property in object 1 of property "grid" equals "link1" \ No newline at end of file + \ No newline at end of file diff --git a/features/backend/application_cases/case_variables/negative_tests_case_variables.feature b/features/backend/application_cases/case_variables/negative_tests_case_variables.feature index c47891fdb..5ce9a3962 100644 --- a/features/backend/application_cases/case_variables/negative_tests_case_variables.feature +++ b/features/backend/application_cases/case_variables/negative_tests_case_variables.feature @@ -7,35 +7,5 @@ Background: Scenario: Returns the variables can be system variables and/or case variables (negative tests). Given I request "cases/95124734553388becc0e332080057699/variable" - Then the response status code should be 400 + Then the response status code should be 404 And the response status message should have the following text "Not Found" - - -Scenario: Sends variables to a case (negative tests) - Given PUT this data: - """ - { - "nameany": "sample-put", - "namealphabetic": "juanput", - "namealphanumeric": "sample123put", - "nameinteger": "1313200000", - "namerealnumber": "4324325000put", - "nameemail": "qa@colosaput.com", - "namelogin": "sampleput", - "valorreal": "32,142,424.00", - "valorinteger": "4,242,424", - "porcentagereal": "424.00 %", - "porcentageinteger": "424 %", - "observaciones": "ningunaput", - "grid": { - "1": { - "sample": "unoput", - "currency1": "133,000.00", - "percentage1": "424.00 %", - } - """ - And I request "cases/95124734553388becc0e332080057699/variable" - 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" \ No newline at end of file diff --git a/features/backend/projects/case_tracker/case_tracker_move_position.feature b/features/backend/projects/case_tracker/case_tracker_move_position.feature index cba181d6c..9f4758f2a 100644 --- a/features/backend/projects/case_tracker/case_tracker_move_position.feature +++ b/features/backend/projects/case_tracker/case_tracker_move_position.feature @@ -1,8 +1,8 @@ @ProcessMakerMichelangelo @RestAPI -Feature: Step update position +Feature: Step update position Main Tests Scenario: List all the Sub Processs (result 0 Sub Processs) Given that I have a valid access_token - And I request "project/6838258995339cb1474fc94058315158/case-tracker/object/6262239315339cb46efc6e4031561540 + And I request "project/6838258995339cb1474fc94058315158/case-tracker/object/6262239315339cb46efc6e4031561540" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object"