From 405631702903a168642979572de2bfe73bbb9869 Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Tue, 15 Apr 2014 09:07:47 -0400 Subject: [PATCH 1/2] Modificaciones a los features output document, file manager, process y process supervisor --- ...main_sequence_output_document_case.feature | 1 + ...egative_tests_output_document_case.feature | 20 ++++++------------- .../main_test_files_manager.feature | 8 ++++++-- .../process/main_tests_process.feature | 4 ++-- ...main_tests_supervisor_ordenamiento.feature | 6 +++--- 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/features/backend/application_cases/output_document_case/main_sequence_output_document_case.feature b/features/backend/application_cases/output_document_case/main_sequence_output_document_case.feature index 71be22783..026ab8570 100644 --- a/features/backend/application_cases/output_document_case/main_sequence_output_document_case.feature +++ b/features/backend/application_cases/output_document_case/main_sequence_output_document_case.feature @@ -22,6 +22,7 @@ Scenario Outline: Generate or regenerates an output documents for a given case And the type is "array" And store "app_doc_uid" in session array as variable "app_doc_uid_" + Examples: | test_description | app_doc_uid_number | out_doc_uid | diff --git a/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature b/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature index a4e98426d..75d199c47 100644 --- a/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature +++ b/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature @@ -7,22 +7,14 @@ Requirements: Background: Given that I have a valid access_token -Scenario Outline: Pull information of an inexistent input document. should return an error - Given I request "cases/64654381053382b8bb4c415067063003/input-document/" - Then the response status code should be 200 +Scenario Outline: Pull information of an inexistent output document. should return an error + Given I request "cases/64654381053382b8bb4c415067063003/output-document/" + Then the response status code should be 400 And the response charset is "UTF-8" And the type is "array" - And the "app_doc_uid" property equals "" - And the "app_doc_filename" property equals "" - And the "doc_uid" property equals "" - And the "app_doc_version" property equals "" - And the "app_doc_create_date" property equals "" - And the "app_doc_create_user" property equals "" - And the "app_doc_type" property equals "" - And the "app_doc_index" property equals "" - And the "app_doc_link" property equals "" + Examples: - | test_description | input-document | app_doc_uid | app_doc_filename | doc_uid | app_doc_version | app_doc_create_date | app_doc_create_user | app_doc_type | app_doc_index | app_doc_link | - | Get Input "Desert.jpg" | 6075490825331a1c5eebff9015468244 | 6075490825331a1c5eebff9015468244 | Desert.jpg | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:33:25 | , Administrator (admin) | INPUT | 1 | cases/cases_ShowDocument?a=6075490825331a1c5eebff9015468244&v=1 | \ No newline at end of file + | test_description | output-document | app_doc_uid | app_doc_filename | doc_uid | app_doc_version | app_doc_create_date | app_doc_create_user | app_doc_type | app_doc_index | app_doc_link | + | Get Input "Desert.jpg" | 6075490825331a1c5eebff9015468244 | 6075490825331a1c5eebff9015468244 | Desert.jpg | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:33:25 | , Administrator (admin) | OUTPUT | 1 | cases/cases_ShowDocument?a=6075490825331a1c5eebff9015468244&v=1 | \ No newline at end of file diff --git a/features/backend/projects/files_manager/main_test_files_manager.feature b/features/backend/projects/files_manager/main_test_files_manager.feature index ee0795817..122c14173 100644 --- a/features/backend/projects/files_manager/main_test_files_manager.feature +++ b/features/backend/projects/files_manager/main_test_files_manager.feature @@ -156,14 +156,14 @@ Feature: Files Manager Resources Main Tests - Scenario: Update the overwritten file to return to their original values + Scenario Outline: Update the overwritten file to return to their original values Given PUT this data: """ { "prf_content": "Test QA" } """ - And that I want to update a resource with the key "prf_uid" stored in session array + And that I want to update a resource with the key "prf_uid" stored in session array as variable "prf_uid_" And I request "project/1265557095225ff5c688f46031700471/file-manager" Then the response status code should be 200 And the response charset is "UTF-8" @@ -171,6 +171,10 @@ Feature: Files Manager Resources Main Tests And that "prf_filename" is set to "TestQA.html" And that "prf_content" is set to "Test QA" + Examples: + | prf_ filename | prf_content | prf_number | + | TestQA.html | Test QA - cuando se realiza la sobreescritura desde upload | 7 | + Scenario Outline: Download files diff --git a/features/backend/projects/process/main_tests_process.feature b/features/backend/projects/process/main_tests_process.feature index 72f6dd7eb..ade3117df 100644 --- a/features/backend/projects/process/main_tests_process.feature +++ b/features/backend/projects/process/main_tests_process.feature @@ -94,7 +94,7 @@ Feature: Process of a Project Resources Examples: | project | pro_title | pro_description | pro_parent | pro_time | pro_timeunit | pro_status | pro_type_day | pro_type | pro_assignment | pro_show_map | pro_show_message | pro_subprocess | pro_tri_deleted | pro_tri_canceled | pro_tri_paused | pro_tri_reassigned | pro_show_delegate | pro_show_dynaform | pro_category | pro_sub_category | pro_industry | pro_update_date | pro_create_date | pro_create_user | pro_debug | pro_derivation_screen_tpl | pro_summary_dynaform | pro_calendar | | 79409754952f8f5110c4342001470580 | Update Test Process 1 | Update Process - PUT | 79409754952f8f5110c4342001470580 | 1 | DAYS | INACTIVE | | NORMAL | 1 | 0 | 0 | 0 | | | | | 0 | 0 | | | 0 | 2014-01-10 09:43:36 | 2015-12-09 09:43:36 | 00000000000000000000000000000001 | 0 | | | | - | 58773281752f50297d6bf00047802053 | Update Test Process 2 | Update Process - PUT | 58773281752f50297d6bf00047802053 | 1 | DAYS | ACTIVE | | NORMAL | 0 | 1 | 1 | 1 | 69112537052f503b53142c2026229055 | 30169571352f50349539aa7005920345 | 45413889552f5037587e5a4073302257 | 23429991752f5035c3eab21091451118 | 1 | 0 | 77488943552f502c3d7f649000082980 | | 0 | 2014-01-10 09:43:36 | 2014-02-07 10:58:15 | 51049032352d56710347233042615067 | 1 | tplScreen.html | 94906672952f5058bf3f0f8012616448 | 14606161052f50839307899033145440 | + | 58773281752f50297d6bf00047802053 | Update Test Process 2 | Update Process - PUT | 58773281752f50297d6bf00047802053 | 1 | DAYS | ACTIVE | | NORMAL | 0 | 1 | 1 | 1 | 69112537052f503b53142c2026229055 | 30169571352f50349539aa7005920345 | 45413889552f5037587e5a4073302257 | 23429991752f5035c3eab21091451118 | 1 | 0 | 4177095085330818c324501061677193 | | 0 | 2014-01-10 09:43:36 | 2014-02-07 10:58:15 | 51049032352d56710347233042615067 | 1 | tplScreen.html | 94906672952f5058bf3f0f8012616448 | 14606161052f50839307899033145440 | Scenario Outline: Get a single Process @@ -137,7 +137,7 @@ Feature: Process of a Project Resources Examples: | project | pro_title | pro_description | pro_parent | pro_time | pro_timeunit | pro_status | pro_type_day | pro_type | pro_assignment | pro_show_map | pro_show_message | pro_subprocess | pro_tri_deleted | pro_tri_canceled | pro_tri_paused | pro_tri_reassigned | pro_show_delegate | pro_show_dynaform | pro_category | pro_sub_category | pro_industry | pro_update_date | pro_create_date | pro_create_user | pro_debug | pro_derivation_screen_tpl | pro_summary_dynaform | pro_calendar | | 79409754952f8f5110c4342001470580 | Update Sample Project #1 | Update Process - PUT | 79409754952f8f5110c4342001470580 | 1 | DAYS | INACTIVE | | NORMAL | 1 | 0 | 0 | 0 | | | | | 0 | 0 | | | 0 | 2014-01-10 09:43:36 | 2015-12-09 09:43:36 | 00000000000000000000000000000001 | 0 | | | | - | 58773281752f50297d6bf00047802053 | Update Test Process | Update Process - PUT | 58773281752f50297d6bf00047802053 | 1 | DAYS | ACTIVE | | NORMAL | 0 | 1 | 1 | 1 | 69112537052f503b53142c2026229055 | 30169571352f50349539aa7005920345 | 45413889552f5037587e5a4073302257 | 23429991752f5035c3eab21091451118 | 1 | 0 | 77488943552f502c3d7f649000082980 | | 0 | 2014-01-10 09:43:36 | 2014-02-07 10:58:15 | 51049032352d56710347233042615067 | 1 | tplScreen.html | 94906672952f5058bf3f0f8012616448 | 14606161052f50839307899033145440 | + | 58773281752f50297d6bf00047802053 | Update Test Process | Update Process - PUT | 58773281752f50297d6bf00047802053 | 1 | DAYS | ACTIVE | | NORMAL | 0 | 1 | 1 | 1 | 69112537052f503b53142c2026229055 | 30169571352f50349539aa7005920345 | 45413889552f5037587e5a4073302257 | 23429991752f5035c3eab21091451118 | 1 | 0 | 4177095085330818c324501061677193 | | 0 | 2014-01-10 09:43:36 | 2014-02-07 10:58:15 | 51049032352d56710347233042615067 | 1 | tplScreen.html | 94906672952f5058bf3f0f8012616448 | 14606161052f50839307899033145440 | Scenario Outline: Update Process diff --git a/features/backend/projects/process_supervisor/main_tests_supervisor_ordenamiento.feature b/features/backend/projects/process_supervisor/main_tests_supervisor_ordenamiento.feature index 99ac4b3db..83418500d 100644 --- a/features/backend/projects/process_supervisor/main_tests_supervisor_ordenamiento.feature +++ b/features/backend/projects/process_supervisor/main_tests_supervisor_ordenamiento.feature @@ -9,7 +9,7 @@ Requirements: Scenario Outline: obtain the position of dynaform in process supervisor - Given I request "project/857888611534814982bc651033834642/process-supervisor/dynaform/step_uid" + Given I request "project/857888611534814982bc651033834642/process-supervisor/dynaform/" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object" @@ -31,12 +31,12 @@ Requirements: "pud_position": "1" } """ - And I request "project/857888611534814982bc651033834642/activity/7976552835322023005e069088446535/step/114660532534bd926817991070085867" + And I request "project/857888611534814982bc651033834642/process-supervisor/7976552835322023005e069088446535/step/114660532534bd926817991070085867" Then the response status code should be 200 Scenario Outline: Obtain the position of the steps after changing position - Given I request "project/857888611534814982bc651033834642/activity/7976552835322023005e069088446535/step/" + Given I request "project/857888611534814982bc651033834642/process-supervisor/7976552835322023005e069088446535/step/" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object" From 93475410c353fbb9fdf27954c4510d2c6d481740 Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Tue, 15 Apr 2014 15:40:21 -0400 Subject: [PATCH 2/2] Behat completo del feature calendar y modificaciones a los features department y process supervisor --- .../calendar/basic_sequence_calendar.feature | 121 +++++++++ .../calendar/main_tests_calendar.feature | 241 ++++++++++++++++++ .../calendar/negative_tests_calendar.feature | 143 +++++++++++ .../basic_sequence_department.feature | 3 +- ...main_tests_supervisor_ordenamiento.feature | 20 +- 5 files changed, 514 insertions(+), 14 deletions(-) diff --git a/features/backend/admin_setup/calendar/basic_sequence_calendar.feature b/features/backend/admin_setup/calendar/basic_sequence_calendar.feature index e69de29bb..f9efe0209 100644 --- a/features/backend/admin_setup/calendar/basic_sequence_calendar.feature +++ b/features/backend/admin_setup/calendar/basic_sequence_calendar.feature @@ -0,0 +1,121 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Calendar +Requirements: + a workspace with two calendar in this workspace "Default Calendar and Test Process" + +Background: + Given that I have a valid access_token + + +Scenario: List of calendar + Given I request "calendars" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 2 records + + +Scenario: Get a single calendar + Given I request "calendar/14606161052f50839307899033145440" + 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 the "cal_uid" property equals "14606161052f50839307899033145440" + And the "cal_name" property equals "Test Process" + And the "cal_description" property equals "Calendar para el feature Process" + + +Scenario Outline: Create a new Calendars + Given POST this data: + """ + { + "cal_name": "", + "cal_description": "", + "cal_work_days": [5, 6, 7], + "cal_work_hour": [ + {"day": 0, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 7, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + 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 "cal_uid" in session array as variable "cal_uid_" + + Examples: + + | test_description | cal_uid_number | cal_name | cal_description | + | Create calendar 1 | 1 | Calendar 1 | Prueba de Creacion de Calendario 1 | + | Create calendar 2 | 2 | Calendar 2 | Prueba de Creacion de Calendario 2 | + + +Scenario Outline: Update the calendars and then check if the values had changed + Given PUT this data: + """ + { + "cal_name": "", + "cal_description": "", + "cal_work_days": [5, 6, 7], + "cal_status": "", + "cal_work_hour": [ + {"day": 0, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 7, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + + """ + And that I want to update a resource with the key "cal_uid" stored in session array as variable "cal_uid_" + And I request "calendar" + 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 | cal_uid_number | cal_name | cal_description | cal_status | + | Update calendar 1 | 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE | + | Update calendar 2 | 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE | + + +Scenario Outline: Get a single calendar + Given that I want to get a resource with the key "cal_uid" stored in session array as variable "cal_uid_" + And I request "calendar" + 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 the "cal_name" property equals "" + And the "cal_description" property equals "" + And the "cal_status" property equals "" + + Examples: + + | cal_uid_number | cal_name | cal_description | cal_status | + | 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE | + | 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE | + + +Scenario Outline: Delete all Calendars created previously in this script + Given that I want to delete a resource with the key "cal_uid" stored in session array as variable "cal_uid_" + And I request "calendar" + And the content type is "application/json" + Then the response status code should be 200 + + + Examples: + + | cal_uid_number | + | 1 | + | 2 | \ No newline at end of file diff --git a/features/backend/admin_setup/calendar/main_tests_calendar.feature b/features/backend/admin_setup/calendar/main_tests_calendar.feature index e69de29bb..da01566d4 100644 --- a/features/backend/admin_setup/calendar/main_tests_calendar.feature +++ b/features/backend/admin_setup/calendar/main_tests_calendar.feature @@ -0,0 +1,241 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Calendar Main Tests +Requirements: + a workspace with two calendar in this workspace "Default Calendar and Test Process" + +Background: + Given that I have a valid access_token + + +Scenario: List of calendar + Given I request "calendars" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 2 records + + +Scenario: Get a single calendar + Given I request "calendar/14606161052f50839307899033145440" + 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 the "cal_uid" property equals "14606161052f50839307899033145440" + And the "cal_name" property equals "Test Process" + And the "cal_description" property equals "Calendar para el feature Process" + + +Scenario Outline: Create a new Calendars + Given POST this data: + """ + { + "cal_name": "", + "cal_description": "", + "cal_work_days": [5, 6, 7], + "cal_work_hour": [ + {"day": 0, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 7, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + 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 "cal_uid" in session array as variable "cal_uid_" + + Examples: + + | test_description | cal_uid_number | cal_name | cal_description | + | Create calendar 1 | 1 | Calendar 1 | Prueba de Creacion de Calendario 1 | + | Create calendar 2 | 2 | Calendar 2 | Prueba de Creacion de Calendario 2 | + | Create calendar with name long | 3 | Calendar 3 | Prueba de Creacion de Calendario 3 | + | Create calendar with special character | 4 | Calendar 4 !@#$%^& | Prueba de Creacion de Calendario 4 | + + +Scenario Outline: Create a new Calendar with parameter cal_work_days diferent + Given POST this data: + """ + { + "cal_name": "Calendar 5", + "cal_description": "Prueba de Creacion de Calendario 5", + "cal_work_days": [1, 2, 3, 4, 5, 6, 7], + "cal_work_hour": [ + {"day": 0, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 7, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + 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 "cal_uid" in session array as variable "cal_uid_" + + Examples: + + | cal_uid_number | + | 5 | + + +Scenario Outline: Create a new Calendar with parameter cal_work_hour diferent + Given POST this data: + """ + { + "cal_name": "Calendar 6", + "cal_description": "Prueba de Creacion de Calendario 6", + "cal_work_days": [3, 4, 5, 6, 7], + "cal_work_hour": [ + {"day": 3, "hour_start": "08:00", "hour_end": "20:00"}, + {"day": 7, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + 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 "cal_uid" in session array as variable "cal_uid_" + + Examples: + + | cal_uid_number | + | 6 | + + +Scenario Outline: Create a new Calendar with parameter cal_holiday diferent + Given POST this data: + """ + { + "cal_name": "Calendar 7", + "cal_description": "Prueba de Creacion de Calendario 7", + "cal_work_days": [2, 3, 4, 5, 6], + "cal_work_hour": [ + {"day": 2, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 6, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday2", "date_start": "2010-01-01", "date_end": "2010-02-10"}, + {"name": "holiday5", "date_start": "2014-05-01", "date_end": "2014-10-04"} + ] + } + """ + And I request "calendar" + 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 "cal_uid" in session array as variable "cal_uid_" + + Examples: + + | cal_uid_number | + | 7 | + + +Scenario: Create a new Calendar with same name + Given POST this data: + """ + { + "cal_name": "Calendar 7", + "cal_description": "Prueba de Creacion de Calendario 5", + "cal_work_days": [2, 3, 4, 5, 6], + "cal_work_hour": [ + {"day": 2, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 6, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday2", "date_start": "2010-01-01", "date_end": "2010-02-10"}, + {"name": "holiday5", "date_start": "2014-05-01", "date_end": "2014-10-04"} + ] + } + """ + And I request "calendar" + Then the response status code should be 400 + And the response status message should have the following text "already exists" + + + +Scenario Outline: Update the calendars and then check if the values had changed + Given PUT this data: + """ + { + "cal_name": "", + "cal_description": "", + "cal_work_days": [5, 6, 7], + "cal_status": "", + "cal_work_hour": [ + {"day": 0, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 7, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + + """ + And that I want to update a resource with the key "cal_uid" stored in session array as variable "cal_uid_" + And I request "calendar" + 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 | cal_uid_number | cal_name | cal_description | cal_status | + | Update calendar 1 | 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE | + | Update calendar 2 | 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE | + + +Scenario Outline: Get a single calendar + Given that I want to get a resource with the key "cal_uid" stored in session array as variable "cal_uid_" + And I request "calendar" + 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 the "cal_name" property equals "" + And the "cal_description" property equals "" + And the "cal_status" property equals "" + + Examples: + + | cal_uid_number | cal_name | cal_description | cal_status | + | 1 | Update Calendar 1 | Update Prueba de Creacion de Calendario 1 | ACTIVE | + | 2 | Update Calendar 2 | Update Prueba de Creacion de Calendario 2 | INACTIVE | + + +Scenario Outline: Delete all Calendars created previously in this script + Given that I want to delete a resource with the key "cal_uid" stored in session array as variable "cal_uid_" + And I request "calendar" + And the content type is "application/json" + Then the response status code should be 200 + + + Examples: + + | cal_uid_number | + | 1 | + | 2 | + | 3 | + | 4 | + | 5 | + | 6 | + | 7 | \ No newline at end of file diff --git a/features/backend/admin_setup/calendar/negative_tests_calendar.feature b/features/backend/admin_setup/calendar/negative_tests_calendar.feature index e69de29bb..6592349bd 100644 --- a/features/backend/admin_setup/calendar/negative_tests_calendar.feature +++ b/features/backend/admin_setup/calendar/negative_tests_calendar.feature @@ -0,0 +1,143 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Calendar Negative Tests + + +Background: + Given that I have a valid access_token + + +Scenario Outline: Create a new Calendars (Negative Tests) + Given POST this data: + """ + { + "cal_name": "", + "cal_description": "", + "cal_work_days": [5, 6, 7], + "cal_work_hour": [ + {"day": 0, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 7, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + + | test_description | cal_name | cal_description | error_code | error_message | + | Create whitout cal_name | | Prueba de Creacion de Calendario 1 | 400 | cal_name | + + +Scenario: Create a new Calendars (Wrong cal_work_days) + Given POST this data: + """ + { + "cal_name": "Sample Calendar", + "cal_description": "Creacion de Calendar 400", + "cal_work_days": [9,10.30,56], + "cal_work_hour": [ + {"day": 0, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 7, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + Then the response status code should be 400 + And the response status message should have the following text "cal_work_days" + + +Scenario: Create a new Calendars (cal_work_hour . day) + Given POST this data: + """ + { + "cal_name": "Sample Calendar", + "cal_description": "Creacion de Calendar 400", + "cal_work_days": [5, 6, 7], + "cal_work_hour": [ + {"day": 10, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 72, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + Then the response status code should be 400 + And the response status message should have the following text "day" + + +Scenario: Create a new Calendars (without cal_work_days) + Given POST this data: + """ + { + "cal_name": "Sample Calendar", + "cal_description": "Creacion de Calendar 400", + + "cal_work_hour": [ + {"day": 1, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 2, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + Then the response status code should be 400 + And the response status message should have the following text "cal_work_days" + + +Scenario: Create a new Calendars (wrong date_start ) + Given POST this data: + """ + { + "cal_name": "Sample Calendar", + "cal_description": "Creacion de Calendar 400", + "cal_work_days": [5, 6, 7], + "cal_work_hour": [ + {"day": 1, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 2, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-45-100", "date_end": "2010-01-10"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + Then the response status code should be 400 + And the response status message should have the following text "date_start" + + +Scenario: Create a new Calendars (wrong date_end) + Given POST this data: + """ + { + "cal_name": "Sample Calendar", + "cal_description": "Creacion de Calendar 400", + "cal_work_days": [5, 6, 7], + "cal_work_hour": [ + {"day": 1, "hour_start": "00:00", "hour_end": "00:00"}, + {"day": 2, "hour_start": "09:00", "hour_end": "17:00"} + ], + "cal_holiday": [ + {"name": "holiday1", "date_start": "2010-01-01", "date_end": "2010-100-87"}, + {"name": "holiday2", "date_start": "2014-04-01", "date_end": "2014-04-04"} + ] + } + """ + And I request "calendar" + Then the response status code should be 400 + And the response status message should have the following text "date_end" \ No newline at end of file diff --git a/features/backend/admin_setup/departments/basic_sequence_department.feature b/features/backend/admin_setup/departments/basic_sequence_department.feature index 413e1657f..9e9bbecaa 100644 --- a/features/backend/admin_setup/departments/basic_sequence_department.feature +++ b/features/backend/admin_setup/departments/basic_sequence_department.feature @@ -98,8 +98,7 @@ Background: 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: diff --git a/features/backend/projects/process_supervisor/main_tests_supervisor_ordenamiento.feature b/features/backend/projects/process_supervisor/main_tests_supervisor_ordenamiento.feature index 83418500d..f457d74d3 100644 --- a/features/backend/projects/process_supervisor/main_tests_supervisor_ordenamiento.feature +++ b/features/backend/projects/process_supervisor/main_tests_supervisor_ordenamiento.feature @@ -24,16 +24,21 @@ Requirements: | Position-dynaform4 | 105517492534bd929a58c15055718131 | 4 | - Scenario: Change order the dynaform of "dynaform3" by position one + Scenario Outline: Change order the dynaform of "dynaform3" by position one Given PUT this data: """ { "pud_position": "1" } """ - And I request "project/857888611534814982bc651033834642/process-supervisor/7976552835322023005e069088446535/step/114660532534bd926817991070085867" + And I request "project/857888611534814982bc651033834642/process-supervisor/dynaform/" Then the response status code should be 200 + Examples: + + | test_description | step_uid | pud_position | + | Position-dynaform1 | 674032139534bd91f9331a5032066933 | 2 | + Scenario Outline: Obtain the position of the steps after changing position Given I request "project/857888611534814982bc651033834642/process-supervisor/7976552835322023005e069088446535/step/" @@ -102,18 +107,9 @@ Requirements: -Scenario: Change order the dynaform of "dynaform3" by position three - Given PUT this data: - """ - { - "pud_position": "3" - } - """ - And I request "project/857888611534814982bc651033834642/activity/7976552835322023005e069088446535/step/114660532534bd926817991070085867" - Then the response status code should be 200 - Scenario Outline: Obtain the position of the steps after changing position + Scenario Outline: Obtain the position of the dynaforms after changing position Given I request "project/857888611534814982bc651033834642/activity/7976552835322023005e069088446535/step/" Then the response status code should be 200 And the response charset is "UTF-8"