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 e69de29bb..9322f1830 100644 --- a/features/backend/admin_setup/settings/category/basic_sequence_category.feature +++ b/features/backend/admin_setup/settings/category/basic_sequence_category.feature @@ -0,0 +1,72 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Process Category + Requirements: + a workspace with the workspace with one process category + + +Background: + Given that I have a valid access_token + + +Scenario: Get list of Categories + Given I request "categories" + 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 1 records + + +Scenario: Get a Category specific + Given I request "category/4177095085330818c324501061677193" + 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" + + +Scenario: Create a new Categories + Given POST this data: + """ + { + "cat_name": "Test new Category" + } + """ + And I request "category" + 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 "cat_uid" in session array as variable "cat_uid" + + +Scenario: Get list of Categories + Given I request "categories" + 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 2 records + + +Scenario: Update the Category created in this script + Given PUT this data: + """ + { + "cat_name": "Name Updated" + } + """ + And that I want to update a resource with the key "cat_uid" stored in session array + And I request "category" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + + +Scenario: Delete the Category created previously in this script + Given that I want to delete a resource with the key "cat_uid" stored in session array + And I request "category" + 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 "object" \ No newline at end of file diff --git a/features/backend/admin_setup/settings/category/main_tests_category.feature b/features/backend/admin_setup/settings/category/main_tests_category.feature index e69de29bb..ae5630b8e 100644 --- a/features/backend/admin_setup/settings/category/main_tests_category.feature +++ b/features/backend/admin_setup/settings/category/main_tests_category.feature @@ -0,0 +1,138 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Process Category Main Test + Requirements: + a workspace with the workspace with one process category + + +Background: + Given that I have a valid access_token + + +Scenario: Get list of Categories + Given I request "categories" + 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 1 records + + +Scenario: Get a Category specific + Given I request "category/4177095085330818c324501061677193" + 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 "cat_uid" property equals "4177095085330818c324501061677193" + And the "cat_name" property equals "Category Cases Lists" + And the "cat_total_processes" property equals 5 + + +Scenario Outline: Create a new Categories + Given POST this data: + """ + { + "cat_name": "" + } + """ + And I request "category" + 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 "cat_uid" in session array as variable "cat_uid_" + + Examples: + + | test_description | cat_uid_number | cat_name | + | Create new Category with character special | 1 | sample!@#$%^^& | + | Create new Category with only character numeric | 2 | 32425325 | + | Create new Category with only character special | 3 | @$@$#@% | + | Create new Category with normal character | 4 | sample | + + + +Scenario: Get list of Categories + Given I request "categories" + 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: Create Category with same name + Given POST this data: + """ + { + "cat_name": "sample" + } + """ + And I request "category" + Then the response status code should be 400 + And the response status message should have the following text "Duplicate" + + +Scenario Outline: Update the Category created in this script + Given PUT this data: + """ + { + "cat_name": "cat_name" + } + """ + And store "cat_uid" in session array as variable "cat_uid_" + And I request "category" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + + + Examples: + + | test_description | cat_uid_number | cat_name | + | Update Category | 1 | UPDATE sample!@#$%^^& | + | Update Category | 2 | UPDATE 32425325 | + + +Scenario Outline: Get a Category specific + Given I request "category/4177095085330818c324501061677193" + 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 "cat_name" property equals "UPDATE sample!@#$%^^&" + And the "cat_total_processes" property equals 0 + + Examples: + + | cat_uid_number | cat_name | cat_total_processes | + | 1 | UPDATE sample!@#$%^^& | 0 | + | 2 | UPDATE 32425325 | 0 | + + +Scenario Outline: Delete the Category created previously in this script + Given that I want to delete a resource with the key "cat_uid" stored in session array as variable "cat_uid_" + And I request "category" + 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 "object" + + Examples: + + | cat_uid_number | + | 1 | + | 2 | + | 3 | + | 4 | + + +Scenario: Get a Category specific + Given I request "category/4177095085330818c324501061677193" + 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 "cat_uid" property equals "4177095085330818c324501061677193" + And the "cat_name" property equals "Category Cases Lists" + And the "cat_total_processes" property equals 5 \ No newline at end of file diff --git a/features/backend/admin_setup/settings/category/negative_tests_category.feature b/features/backend/admin_setup/settings/category/negative_tests_category.feature index e69de29bb..716b8228c 100644 --- a/features/backend/admin_setup/settings/category/negative_tests_category.feature +++ b/features/backend/admin_setup/settings/category/negative_tests_category.feature @@ -0,0 +1,23 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Process Category Negative Tests + + +Background: + Given that I have a valid access_token + + +Scenario Outline: Create a new Categories (Negative Test) + Given POST this data: + """ + { + "cat_name": "" + } + """ + And I request "category" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + + | test_description | cat_name | error_code | error_message | + | without name | | 400 | cat_name | \ No newline at end of file diff --git a/features/backend/application_cases/case_actions/negative_tests_cases_actions.feature b/features/backend/application_cases/case_actions/negative_tests_cases_actions.feature index 9d8578b11..0b48c011f 100644 --- a/features/backend/application_cases/case_actions/negative_tests_cases_actions.feature +++ b/features/backend/application_cases/case_actions/negative_tests_cases_actions.feature @@ -45,12 +45,12 @@ Scenario Outline: Create a new case Impersonate (Negative Test) And the response status message should have the following text "" Examples: - | Description | case_number | usr_uid | error_code | error_message | - | Create new case with process "Derivation rules - sequential" - Case Start with chris | 26 | 51049032352d56710347233042615067 | 400 | pro_uid | - | Create new case with process "Derivation rules - evaluation" - Case Start with adam | 27 | 44811996752d567110634a1013636964 | 400 | task_uid | - | Create new case with process "Derivation rules - Parallel" - Case Start with aaron | 28 | 24166330352d56730cdd525035621101 | 400 | pro_uid | - | Create new case with process "Derivation rules - parallel evaluation"- Case Start with jeremiah | 29 | 86677227852d5671f40ba25017213081 | 400 | task_uid | - | Create new case with process "Derivation rules - selection" - Case Start with admin | 30 | 62625000752d5672d6661e6072881167 | 400 | | + | Description | pro_uid | usr_uid | tas_uid | error_code | error_message | + | Create new case with process "Derivation rules - sequential" invalid pro_uid | 99201111111111111138927000421575 | 51049032352d56710347233042615067 | 68707275350ec281ada1c95068712556 | 400 | pro_uid | + | Create new case with process "Derivation rules - evaluation" invalid task_uid | 99209594750ec27ea338927000421575 | 44811996752d567110634a1013636964 | 68707211111111111111111111712556 | 400 | task_uid | + | Create new case with process "Derivation rules - Parallel" usr_uid | 99209594750ec27ea338927000421575 | 24166331111111111111115035621101 | 68707275350ec281ada1c95068712556 | 400 | usr_uid | + | Create new case with process "Derivation rules - without pro_uid | | 86677227852d5671f40ba25017213081 | 68707275350ec281ada1c95068712556 | 400 | pro_uid | + | Create new case with process "Derivation rules - selection" tas_uid | 99209594750ec27ea338927000421575 | 62625000752d5672d6661e6072881167 | | 400 | tas_uid | Scenario Outline: Create a case, derivate and cancel. then try do pause or route diff --git a/features/backend/application_cases/case_note/basic_sequence_case_note.feature b/features/backend/application_cases/case_note/basic_sequence_case_note.feature index 4ca715b26..ad6d98e01 100644 --- a/features/backend/application_cases/case_note/basic_sequence_case_note.feature +++ b/features/backend/application_cases/case_note/basic_sequence_case_note.feature @@ -9,7 +9,6 @@ Background: Scenario: List of case notes for this case Given I request "cases/1185553665335d2e209f723099733152/notes" - the response time should at least be (\d+) milliseconds$/ Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" @@ -36,4 +35,11 @@ Scenario: Create a new case note for specified case And the content type is "application/json" And the type is "object" +Scenario: List of case notes for this case + Given I request "cases/1185553665335d2e209f723099733152/notes" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + + #case 125 \ No newline at end of file diff --git a/features/backend/application_cases/case_note/main_tests_case_note.feature b/features/backend/application_cases/case_note/main_tests_case_note.feature index 9487a72bc..e8b29201b 100644 --- a/features/backend/application_cases/case_note/main_tests_case_note.feature +++ b/features/backend/application_cases/case_note/main_tests_case_note.feature @@ -12,18 +12,47 @@ Scenario: List of case notes for this case Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" + And the "note_content" property in row 0 equals "tercer case note creado desde script" + And the "note_content" property in row 1 equals "Test sin envio de email" + + +Scenario: Get a List of cases notes of a case with paged + Given I request "cases/1185553665335d2e209f723099733152/notes/paged" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" - -Scenario: Create a new case note for specified case - Given POST this data: - """ - { - "note_content": "tercer case note creado desde script", - "send_email": 1 - } - """ - And I request "case/1185553665335d2e209f723099733152/case" - 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" \ No newline at end of file + +Scenario Outline: Create a new case note for specified case + Given POST this data: + """ + { + "note_content": "", + "send_email": + } + """ + And I request "cases/1185553665335d2e209f723099733152/note" + 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 | note_content | send_email | + | Create case note with charater special | Test!@#$ %^&*£ | 1 | + | Create case note with 150 chacarters | Este es una prueba con varios caracteres 112334@#$Este es una prueba con varios caracteres 112334@#$Este es una prueba con varios caracteres 112334@#$ | 1 | + | Create case note with character without space | Estaesunapruebasinespaciosentrepalabraslamismadebeseraceptado | 1 | + | Create case note without send mail | Test sin envio de email | 0 | + | Create case normal with character normal | tercer case note creado desde script | 1 | + + + +Scenario: List of case notes for this case + Given I request "cases/1185553665335d2e209f723099733152/notes" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the "note_content" property in row 0 equals "tercer case note creado desde script" + And the "note_content" property in row 1 equals "Test sin envio de email" \ No newline at end of file diff --git a/features/backend/application_cases/case_note/negative_tests_case_note.feature b/features/backend/application_cases/case_note/negative_tests_case_note.feature index 9000c45e0..b8655d20a 100644 --- a/features/backend/application_cases/case_note/negative_tests_case_note.feature +++ b/features/backend/application_cases/case_note/negative_tests_case_note.feature @@ -20,8 +20,5 @@ Scenario: create a new case note for specified case (Negative Tests) Then the response status code should be 400 And the response status message should have the following text "You do not have permission to cases notes" - - - - + #case 124 \ No newline at end of file diff --git a/features/backend/application_cases/output_document_case/basic_sequence_output_document_case.feature b/features/backend/application_cases/output_document_case/basic_sequence_output_document_case.feature index eaf808238..c09ed3c4b 100644 --- a/features/backend/application_cases/output_document_case/basic_sequence_output_document_case.feature +++ b/features/backend/application_cases/output_document_case/basic_sequence_output_document_case.feature @@ -20,7 +20,7 @@ Scenario: Returns an generated document for a given case Given I request "cases/33125846153383cecdf64f1079330191/output-document/3000248055333006ab56a01005891659" Then the response status code should be 200 And the response charset is "UTF-8" - And the type is "Object" + And the type is "object" Scenario: Generate or regenerates an output documents for a given case