diff --git a/features/backend/activity/main_tests_activity.feature b/features/backend/activity/main_tests_activity.feature index 9e31ff58e..146ce4ac4 100644 --- a/features/backend/activity/main_tests_activity.feature +++ b/features/backend/activity/main_tests_activity.feature @@ -10,27 +10,26 @@ Feature: Activity Resources Main Tests Given that I have a valid access_token - Scenario Outline: Get the Properties and Definition of 3 Activities - Given I request "project//activity/" + Given I request "project/251815090529619a99a2bf4013294414/activity/" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object" And the "definition" property type is "array" And the "properties" property type is "object" - And that "tas_title" is set to "" + And the property "tas_title" of "properties" is set to "" Examples: - | project | activity | tas_title | - | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | Task 1 | - | 251815090529619a99a2bf4013294414 | 95655319552a5c790b69a04054667879 | Task 2 | - | 251815090529619a99a2bf4013294414 | 63843886052a5cc066e4c04056414372 | Task 3 | + | activity | tas_title | + | 97192372152a5c78f04a794095806311 | Task1 | + | 95655319552a5c790b69a04054667879 | Task2 | + | 63843886052a5cc066e4c04056414372 | Task3 | Scenario Outline: Get the Properties of a Activity are exactly three activity - Given I request "project//activity/?filter=properties" + Given I request "project/251815090529619a99a2bf4013294414/activity/?filter=properties" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object" @@ -38,15 +37,15 @@ Feature: Activity Resources Main Tests Examples: - | project | activity | tas_title | - | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | Task 1 | - | 251815090529619a99a2bf4013294414 | 95655319552a5c790b69a04054667879 | Task 2 | - | 251815090529619a99a2bf4013294414 | 63843886052a5cc066e4c04056414372 | Task 3 | + | activity | tas_title | + | 97192372152a5c78f04a794095806311 | Task1 | + | 95655319552a5c790b69a04054667879 | Task2 | + | 63843886052a5cc066e4c04056414372 | Task3 | Scenario Outline: Get the Definition of a Activity are exactly three activity - Given I request "project//activity/?filter=definition" + Given I request "project/251815090529619a99a2bf4013294414/activity/?filter=definition" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object" @@ -54,10 +53,10 @@ Feature: Activity Resources Main Tests Examples: - | project | activity | tas_title | - | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | Task 1 | - | 251815090529619a99a2bf4013294414 | 95655319552a5c790b69a04054667879 | Task 2 | - | 251815090529619a99a2bf4013294414 | 63843886052a5cc066e4c04056414372 | Task 3 | + | activity | tas_title | + | 97192372152a5c78f04a794095806311 | Task1 | + | 95655319552a5c790b69a04054667879 | Task2 | + | 63843886052a5cc066e4c04056414372 | Task3 | @@ -72,7 +71,6 @@ Feature: Activity Resources Main Tests "tas_description": "", "tas_priority_variable": "", "tas_derivation_screen_tpl": "", - "tas_start": "", "tas_assign_type" : "", "tas_assign_variable": "", "tas_group_variable": "", @@ -96,7 +94,7 @@ Feature: Activity Resources Main Tests } } """ - And I request "project//activity/" + And I request "project/251815090529619a99a2bf4013294414/activity/" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object" @@ -105,65 +103,94 @@ Feature: Activity Resources Main Tests Examples: - | test_description | project | activity | tas_title | tas_description | tas_priority_variable | tas_derivation_screen_tpl | tas_start | tas_assign_type | tas_assign_variable| tas_group_variable | tas_selfservice_timeout | tas_selfservice_time | tas_selfservice_time_unit | tas_selfservice_trigger_uid | tas_transfer_fly | tas_duration | tas_timeunit | tas_type_day | tas_calendar | tas_type | tas_def_title | tas_def_description | tas_send_last_email | tas_def_subject_message | tas_def_message_type | tas_def_message | tas_def_message_template | - | Update (tas_title, tas_description), tas_assign_type=BALANCED, tas_selfservice_timeout=1, tas_selfservice_time_unit=DAYS | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | update activity task1 | update description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | - | | 251815090529619a99a2bf4013294414 | 95655319552a5c790b69a04054667879 | update activity task2 | update description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | - | | 251815090529619a99a2bf4013294414 | 63843886052a5cc066e4c04056414372 | update activity task3 | update description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | + | test_description | activity | tas_title | tas_description | tas_priority_variable | tas_derivation_screen_tpl | tas_start | tas_assign_type | tas_assign_variable| tas_group_variable | tas_selfservice_timeout | tas_selfservice_time | tas_selfservice_time_unit | tas_selfservice_trigger_uid | tas_transfer_fly | tas_duration | tas_timeunit | tas_type_day | tas_calendar | tas_type | tas_def_title | tas_def_description | tas_send_last_email | tas_def_subject_message | tas_def_message_type | tas_def_message | tas_def_message_template | + | Update Task1 | 97192372152a5c78f04a794095806311 | update activity task1 | update description | @@PROCESS | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 4 | HOURS | | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | TRUE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | template.html | + | Update Task2 | 95655319552a5c790b69a04054667879 | update activity task2 | update description | @@PROCESS | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 4 | HOURS | | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | TRUE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | template.html | + | Update Task3 | 63843886052a5cc066e4c04056414372 | update activity task3 | update description | @@PROCESS | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 6 | HOURS | | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | TRUE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | template.html | @5: TEST FOR GET ACTIVITY /----------------------------------------------------------------------- Scenario Outline: Get a activity - Given I request "project//activity/" + Given I request "project/251815090529619a99a2bf4013294414/activity/" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object" - And that "tas_title" is set to "" + And the property "tas_title" of "properties" is set to "" + And the property "tas_description" of "properties" is set to "" + And the property "tas_priority_variable" of "properties" is set to "" + And the property "tas_derivation_screen_tpl" of "properties" is set to "" + And the property "tas_assign_type" of "properties" is set to "" + And the property "tas_assign_variable" of "properties" is set to "" + And the property "tas_group_variable" of "properties" is set to "" + And the property "tas_selfservice_timeout" of "properties" is set to "" + And the property "tas_selfservice_time" of "properties" is set to "" + And the property "tas_selfservice_time_unit" of "properties" is set to "" + And the property "tas_transfer_fly" of "properties" is set to "" + And the property "tas_duration" of "properties" is set to "" + And the property "tas_timeunit" of "properties" is set to "" + And the property "tas_type_day" of "properties" is set to "" + And the property "tas_calendar" of "properties" is set to "" + And the property "tas_type" of "properties" is set to "" + And the property "tas_def_title" of "properties" is set to "" + And the property "tas_def_description" of "properties" is set to "" + And the property "tas_send_last_email" of "properties" is set to "" + And the property "tas_def_subject_message" of "properties" is set to "" + And the property "tas_def_message_type" of "properties" is set to "" + And the property "tas_def_message" of "properties" is set to "" + Examples: - | project | activity | tas_title | - | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095806311 | Task Edit | + | activity | tas_title | tas_description | tas_priority_variable | tas_derivation_screen_tpl | tas_start | tas_assign_type | tas_assign_variable| tas_group_variable | tas_selfservice_timeout | tas_selfservice_time | tas_selfservice_time_unit | tas_transfer_fly | tas_duration | tas_timeunit | tas_type_day | tas_calendar | tas_type | tas_def_title | tas_def_description | tas_send_last_email | tas_def_subject_message | tas_def_message_type | tas_def_message | + | 97192372152a5c78f04a794095806311 | update activity task1 | update description | @@PROCESS | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 4 | HOURS | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | TRUE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | + | 95655319552a5c790b69a04054667879 | update activity task2 | update description | @@PROCESS | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 4 | HOURS | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | TRUE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | + | 63843886052a5cc066e4c04056414372 | update activity task3 | update description | @@PROCESS | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 6 | HOURS | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | TRUE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | -@6: TEST FOR GET PROPERTIES & DEFINITION OF A ACTIVITY /----------------------------------------------------------------------- - Scenario Outline: Get an activity - Given I request "project//activity/" - Then the response status code should be + +Scenario Outline: Update the Definition of a Activity and the check if the values had changed + Given PUT this data: + """ + { + "definition": {}, + "properties": + { + "tas_title": "", + "tas_description": "", + "tas_priority_variable": "", + "tas_derivation_screen_tpl": "", + "tas_assign_type" : "", + "tas_assign_variable": "", + "tas_group_variable": "", + "tas_selfservice_timeout": "", + "tas_selfservice_time": "", + "tas_selfservice_time_unit" : "", + "tas_selfservice_trigger_uid" : "", + "tas_transfer_fly": "", + "tas_duration" : "", + "tas_timeunit" : "", + "tas_type_day": "", + "tas_calendar": "", + "tas_type": "", + "tas_def_title": "", + "tas_def_description": "", + "tas_send_last_email": "", + "tas_def_subject_message": "", + "tas_def_message_type": "", + "tas_def_message": "", + "tas_def_message_template": "" + } + } + """ + And I request "project/251815090529619a99a2bf4013294414/activity/" + Then the response status code should be 200 And the response charset is "UTF-8" And the type is "object" - + + Examples: - | project | activity | tas_title | error_code | - | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095845000 | Task 1 | 400 | - | 251815090529619a99a2bf4013294414 | | Task 1 | 404 | - | | 97192372152a5c78f04a794095806311 | Task 1 | 400 | - - -@7: TEST FOR GET PROPERTIES ACTIVITY /--------------------------------------------------------- - Scenario Outline: Get properties of activity - Given I request "project//activity/?filter=properties" - Then the response status code should be - And the response charset is "UTF-8" - And the type is "object" - - Examples: - - | project | activity | error_code | - | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095801000 | 400 | - | 251815090529619a99a2bf4013294414 | | 404 | - | | 97192372152a5c78f04a794095806311 | 400 | - -@8: TEST FOR GET DEFINITION ACTIVITY /--------------------------------------------------------- - Scenario Outline: Get definition of activity - Given I request "project//activity/?filter=definition" - Then the response status code should be - And the response charset is "UTF-8" - And the type is "object" - - Examples: - - | project | activity | error_code | - | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095200000 | 400 | - | 251815090529619a99a2bf4013294414 | | 404 | - | | 97192372152a5c78f04a794095806311 | 400 | + | activity | tas_title | tas_description | tas_priority_variable | tas_derivation_screen_tpl | tas_start | tas_assign_type | tas_assign_variable| tas_group_variable | tas_selfservice_timeout | tas_selfservice_time | tas_selfservice_time_unit | tas_selfservice_trigger_uid | tas_transfer_fly | tas_duration | tas_timeunit | tas_type_day | tas_calendar | tas_type | tas_def_title | tas_def_description | tas_send_last_email | tas_def_subject_message | tas_def_message_type | tas_def_message | tas_def_message_template | + | 97192372152a5c78f04a794095806311 | Task1 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | + | 95655319552a5c790b69a04054667879 | Task2 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | + | 63843886052a5cc066e4c04056414372 | Task3 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | \ No newline at end of file diff --git a/features/backend/activity/negative_tests_activity.feature b/features/backend/activity/negative_tests_activity.feature index e69de29bb..169a634b4 100644 --- a/features/backend/activity/negative_tests_activity.feature +++ b/features/backend/activity/negative_tests_activity.feature @@ -0,0 +1,108 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Activity Resources Main Tests + Requirements: + a workspace with the process 251815090529619a99a2bf4013294414 already loaded + the process name is "Test (Triggers, Activity)" + there are three Activity Resources in the process + + + Background: + Given that I have a valid access_token + + + +@6: TEST FOR GET PROPERTIES & DEFINITION OF A ACTIVITY /----------------------------------------------------------------------- + Scenario Outline: Get an activity + Given I request "project//activity/" + Then the response status code should be + And the response status message should have the following text "" + + + Examples: + + | project | activity | tas_title | error_code | error_message | + | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095845000 | Task 1 | 400 | TASK | + | 251815090529619a99a2bf4013294414 | | Task 1 | 404 | Not Found | + | | 97192372152a5c78f04a794095806311 | Task 1 | 400 | projectUid | + + +@7: TEST FOR GET PROPERTIES ACTIVITY /--------------------------------------------------------- + Scenario Outline: Get properties of activity + Given I request "project//activity/?filter=properties" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + + | project | activity | error_code | error_message | + | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095801000 | 400 | TASK | + | 251815090529619a99a2bf4013294414 | | 404 | Not Found | + | | 97192372152a5c78f04a794095806311 | 400 | projectUid | + +@8: TEST FOR GET DEFINITION ACTIVITY /--------------------------------------------------------- + Scenario Outline: Get definition of activity + Given I request "project//activity/?filter=definition" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + + | project | activity | error_code | error_message | + | 251815090529619a99a2bf4013294414 | 97192372152a5c78f04a794095200000 | 400 | TASK | + | 251815090529619a99a2bf4013294414 | | 404 | Not Found | + | | 97192372152a5c78f04a794095806311 | 400 | projectUid | + + +Scenario Outline: Update the Definition of a Activity and the check if the values had changed + Given PUT this data: + """ + { + "definition": {}, + "properties": + { + "tas_title": "", + "tas_description": "", + "tas_priority_variable": "", + "tas_derivation_screen_tpl": "", + "tas_assign_type" : "", + "tas_assign_variable": "", + "tas_group_variable": "", + "tas_selfservice_timeout": "", + "tas_selfservice_time": "", + "tas_selfservice_time_unit" : "", + "tas_selfservice_trigger_uid" : "", + "tas_transfer_fly": "", + "tas_duration" : "", + "tas_timeunit" : "", + "tas_type_day": "", + "tas_calendar": "", + "tas_type": "", + "tas_def_title": "", + "tas_def_description": "", + "tas_send_last_email": "", + "tas_def_subject_message": "", + "tas_def_message_type": "", + "tas_def_message": "", + "tas_def_message_template": "" + } + } + """ + And I request "project/251815090529619a99a2bf4013294414/activity/" + Then the response status code should be 400 + And the response status message should have the following text "" + + + Examples: + + | test_description | activity | tas_title | tas_description | tas_priority_variable | tas_derivation_screen_tpl | tas_start | tas_assign_type | tas_assign_variable| tas_group_variable | tas_selfservice_timeout | tas_selfservice_time | tas_selfservice_time_unit | tas_selfservice_trigger_uid | tas_transfer_fly | tas_duration | tas_timeunit | tas_type_day | tas_calendar | tas_type | tas_def_title | tas_def_description | tas_send_last_email | tas_def_subject_message | tas_def_message_type | tas_def_message | tas_def_message_template | error_message | + | Invalid tas_assign_type | 97192372152a5c78f04a794095806311 | Task1 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | INPUT | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_assign_type | + | Invalid tas_selfservice_timeout | 95655319552a5c790b69a04054667879 | Task2 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 5 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_selfservice_timeout | + | Invalid tas_selfservice_time | 63843886052a5cc066e4c04056414372 | Task3 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 5.67,76 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_selfservice_time | + | Invalid tas_selfservice_time_unit| 97192372152a5c78f04a794095806311 | Task1 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | YEAR | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_selfservice_time_unit | + | Invalid tas_transfer_fly | 95655319552a5c790b69a04054667879 | Task2 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | INPUT | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_transfer_fly | + | Invalid tas_duration | 63843886052a5cc066e4c04056414372 | Task3 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2,54.98 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_duration | + | Invalid tas_timeunit | 97192372152a5c78f04a794095806311 | Task1 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | YEAR | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_timeunit | + | Invalid tas_type_day | 95655319552a5c790b69a04054667879 | Task2 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 6 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_type_day | + | Invalid tas_type | 63843886052a5cc066e4c04056414372 | Task3 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | INPUT | Case Title | Case Description | FALSE | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_type | + | Invalid tas_send_last_email | 97192372152a5c78f04a794095806311 | Task1 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | INPUT | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | tas_send_last_email | + | Invalid tas_def_message_type | 95655319552a5c790b69a04054667879 | Task2 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | TRUE | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | FALSE | Titulo de Notificacion 1| INPUT | Esta es una Notificacion | template.html | tas_def_message_type | \ No newline at end of file diff --git a/features/backend/dynaforms/basic_sequence_dynaform.feature b/features/backend/dynaforms/basic_sequence_dynaform.feature new file mode 100644 index 000000000..c566d0372 --- /dev/null +++ b/features/backend/dynaforms/basic_sequence_dynaform.feature @@ -0,0 +1,176 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: DynaForms Resources + #GET /api/1.0/{workspace}/project/{prj_uid}/dynaforms + # Get a List DynaForms of a Project + Scenario: Get a List DynaForms of a Project + Given that I have a valid access_token + And I request "project/14414793652a5d718b65590036026581/dynaforms" + 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 json data is an empty array + + #POST /api/1.0/{workspace}/project/{prj_uid}/dynaform + # Create a new DynaForm for a Project + # Creation normal of a DynaForm + Scenario: Create "My DynaForm1" for a Project (Creation normal of a DynaForm) + Given that I have a valid access_token + And POST this data: + """ + { + "dyn_title": "My DynaForm1", + "dyn_description": "My DynaForm1 DESCRIPTION", + "dyn_type": "xmlform" + } + """ + And I request "project/14414793652a5d718b65590036026581/dynaform" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + And store "dyn_uid" in session array as variable "dynaForm1" + + #POST /api/1.0/{workspace}/project/{prj_uid}/dynaform + # Create a new DynaForm for a Project + # Copy/Import a DynaForm + Scenario: Create "DynaForm Demo" for a Project (Copy/Import a DynaForm) + Given that I have a valid access_token + And POST this data: + """ + { + "dyn_title": "DynaForm Demo", + "dyn_description": "Description", + "dyn_type": "xmlform", + "copy_import": + { + "prj_uid": "42445320652cd534acb3824056962285", + "dyn_uid": "70070685552cd53605650f7062918506" + } + } + """ + And I request "project/14414793652a5d718b65590036026581/dynaform" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + And store "dyn_uid" in session array as variable "dynaForm2" + + #POST /api/1.0/{workspace}/project/{prj_uid}/dynaform + # Create a new DynaForm for a Project + # Creation of a DynaForm based in a PMTable + Scenario: Create "PMT_DYNAFORM" for a Project (Creation of a DynaForm based in a PMTable) + Given that I have a valid access_token + And POST this data: + """ + { + "dyn_title": "PMT_DYNAFORM", + "dyn_description": "PMT_DYNAFORM DESCRIPTION", + "dyn_type": "xmlform", + "pmtable": + { + "tab_uid": "65193158852cc1a93a5a535084878044", + "fields": [ + { + "fld_name": "DYN_UID", + "pro_variable": "@#APPLICATION" + } + ] + } + } + """ + And I request "project/14414793652a5d718b65590036026581/dynaform" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + And store "dyn_uid" in session array as variable "dynaForm3" + + #PUT /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid} + # Update a DynaForm for a Project + Scenario: Update a DynaForm for a Project + Given that I have a valid access_token + And PUT this data: + """ + { + "dyn_title": "My DynaForm1 Modified", + "dyn_description": "My DynaForm1 DESCRIPTION Modified", + "dyn_type": "xmlform" + } + """ + And that I want to update a resource with the key "dynaForm1" stored in session array + And I request "project/14414793652a5d718b65590036026581/dynaform" + 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" + And that "dyn_title" is set to "My DynaForm1 Modified" + + #GET /api/1.0/{workspace}/project/{prj_uid}/dynaforms + # Get a List DynaForms of a Project + Scenario: Get a List DynaForms of a Project + Given that I have a valid access_token + And I request "project/14414793652a5d718b65590036026581/dynaforms" + 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 "dyn_title" property in row 0 equals "DynaForm Demo" + And the "dyn_description" property in row 0 equals "Description" + And the "dyn_type" property in row 0 equals "xmlform" + + #GET /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid} + # Get a single DynaForm of a Project + Scenario: Get a single DynaForm of a Project + Given that I have a valid access_token + And that I want to get a resource with the key "dynaForm3" stored in session array + And I request "project/14414793652a5d718b65590036026581/dynaform" + 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" + And that "dyn_title" is set to "PMT_DYNAFORM" + And that "dyn_description" is set to "PMT_DYNAFORM DESCRIPTION" + And that "dyn_type" is set to "xmlform" + + #DELETE /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid} + # Delete a DynaForm of a Project + Scenario: Delete a previously created DynaForms + Given that I have a valid access_token + And that I want to delete a resource with the key "dynaForm1" stored in session array + And I request "project/14414793652a5d718b65590036026581/dynaform" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + + #DELETE /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid} + # Delete a DynaForm of a Project + Scenario: Delete a previously created DynaForms + Given that I have a valid access_token + And that I want to delete a resource with the key "dynaForm2" stored in session array + And I request "project/14414793652a5d718b65590036026581/dynaform" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + + #DELETE /api/1.0/{workspace}/project/{prj_uid}/dynaform/{dyn_uid} + # Delete a DynaForm of a Project + Scenario: Delete a previously created DynaForms + Given that I have a valid access_token + And that I want to delete a resource with the key "dynaForm3" stored in session array + And I request "project/14414793652a5d718b65590036026581/dynaform" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + + #GET /api/1.0/{workspace}/project/{prj_uid}/dynaforms + # Get a List DynaForms of a Project + Scenario: Get a List DynaForms of a Project + Given that I have a valid access_token + And I request "project/14414793652a5d718b65590036026581/dynaforms" + 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 json data is an empty array + diff --git a/features/backend/dynaforms/main_tests_dynaform.feature b/features/backend/dynaforms/main_tests_dynaform.feature new file mode 100644 index 000000000..d3d483494 --- /dev/null +++ b/features/backend/dynaforms/main_tests_dynaform.feature @@ -0,0 +1,217 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Dynaform Main Tests + Requirements: + a workspace with the process 14414793652a5d718b65590036026581 ("Sample Project #1") already loaded + there are three activities in the process + and a workspace with the process 42445320652cd534acb3824056962285 ("Sample Project #2 (DynaForms Resources)") already loaded, this process will be used for the import of Dynaform + there are one dynaform in the process + + Background: + Given that I have a valid access_token + + + Scenario Outline: Get a List DynaForms of a Project + Given I request "project//dynaforms" + 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 records + + Examples: + + | project | records | + | 14414793652a5d718b65590036026581 | 0 | + | 42445320652cd534acb3824056962285 | 1 | + + + Scenario Outline: Normal Dynaform creation + Given POST this data: + """ + { + "dyn_title": "", + "dyn_description": "", + "dyn_type": "" + } + """ + And I request "project//dynaform" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + And store "dyn_uid" in session array as variable "dyn_uid_" + + Examples: + | test_description | project | dyn_title | dyn_description | dyn_type | dyn_uid_number | + | create dynaform xmlform P1 | 14414793652a5d718b65590036026581 | Dynaform - Normal | dyn normal P1 | xmlform | 1 | + | create dynaform grid P1 | 14414793652a5d718b65590036026581 | Dynaform - Grid | dyn grid P1 | grid | 2 | + | create dynaform xmlform P2 | 42445320652cd534acb3824056962285 | Dynaform - Normal | dyn normal P2 | xmlform | 3 | + | create dynaform grid P2 | 42445320652cd534acb3824056962285 | Dynaform - Grid | dyn grid P2 | grid | 4 | + + + Scenario Outline: Create a Dynaform using the Copy/Import method + Given POST this data: + """ + { + "dyn_title": "", + "dyn_description": "", + "dyn_type": "", + "copy_import": + { + "prj_uid": "", + "dyn_uid": "" + } + } + """ + And I request "project//dynaform" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + And store "dyn_uid" in session array as variable "dyn_uid_" + + Examples: + + | test_description | project | dyn_title | dyn_description | dyn_type | dyn_uid_number | copy_prj_uid | copy_dyn_uid | + | create dynaform copy 1 | 14414793652a5d718b65590036026581 | Dynaform - Copy 1 | dyn copy | xmlform | 5 | 42445320652cd534acb3824056962285 | 70070685552cd53605650f7062918506 | + | create dynaform copy 2 | 42445320652cd534acb3824056962285 | Dynaform - Copy 2 | dyn copy | xmlform | 6 | 42445320652cd534acb3824056962285 | 70070685552cd53605650f7062918506 | + + + Scenario Outline: Create dynaform based on a PMTable + Given POST this data: + """ + { + "dyn_title": "", + "dyn_description": "", + "dyn_type": "", + "pmtable": + { + "tab_uid": "", + "fields": [ + { + "fld_name": "", + "pro_variable": "" + }, + { + "fld_name": "", + "pro_variable": "" + }, + { + "fld_name": "" + } + ] + } + } + """ + And I request "project//dynaform" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + And store "dyn_uid" in session array as variable "dyn_uid_" + + Examples: + + | test_description | project | dyn_title | dyn_description | dyn_type | dyn_uid_number | tab_uid | fld_name_01 | pro_variable_01 | fld_name_02 | pro_variable_02 | fld_name_03 | pro_variable_03 | + | create dynaform pmtable 1 | 14414793652a5d718b65590036026581 | Dynaform - pmtable 1 | dyn from pmtable | xmlform | 7 | 65193158852cc1a93a5a535084878044 | DYN_UID | @#APPLICATION | DYN_TITLE | @#TITLE | DYN_DESCRIPTION | @#DESCRIPTION | + | create dynaform pmtable 2 | 42445320652cd534acb3824056962285 | Dynaform - pmtable 2 | dyn from pmtable | xmlform | 8 | 65193158852cc1a93a5a535084878044 | DYN_UID | @#APPLICATION | DYN_TITLE | @#TITLE | DYN_DESCRIPTION | @#DESCRIPTION | + + + Scenario Outline: Get a List DynaForms of a Project list when there are 9 records, total in both projects + Given I request "project//dynaforms" + 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 records + + Examples: + + | project | records | + | 14414793652a5d718b65590036026581 | 4 | + | 42445320652cd534acb3824056962285 | 5 | + + + Scenario Outline: Update the Dynaform and then check if the values had changed + Given PUT this data: + """ + { + "dyn_title": "", + "dyn_description": "", + "dyn_type": "" + } + """ + And that I want to update a resource with the key "dyn_uid" stored in session array as variable "dyn_uid_" + And I request "project//dynaform" + 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: + | test_description | project | dyn_title | dyn_description | dyn_type | dyn_uid_number | + | Update dynaform xmlform P1 | 14414793652a5d718b65590036026581 | My DynaForm1 Modified | My DynaForm1 DESCRIPTION Modified | grid | 1 | + | Update dynaform grid P1 | 14414793652a5d718b65590036026581 | Dynaform - Grid Modified | dyn grid P1 DESCRIPTION Modified | xmlform | 2 | + | Update dynaform xmlform P2 | 42445320652cd534acb3824056962285 | Dynaform - Normal Modified | dyn normal P2 DESCRIPTION Modified | grid | 3 | + | Update dynaform grid P2 | 42445320652cd534acb3824056962285 | Dynaform - Grid Modified | dyn grid P2 DESCRIPTION Modified | xmlform | 4 | + + + + Scenario Outline: Get a single dynaform and check some properties + Given that I want to get a resource with the key "dyn_uid" stored in session array as variable "dyn_uid_" + And I request "project//dynaform" + 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" + And that "dyn_title" is set to "" + And that "dyn_description" is set to "" + And that "dyn_type" is set to "" + + + Examples: + | test_description | project | dyn_title | dyn_description | dyn_type | dyn_uid_number | + | Update dynaform xmlform P1 | 14414793652a5d718b65590036026581 | My DynaForm1 Modified | My DynaForm1 DESCRIPTION Modified | grid | 1 | + | Update dynaform grid P1 | 14414793652a5d718b65590036026581 | Dynaform - Grid Modified | dyn grid P1 DESCRIPTION Modified | xmlform | 2 | + | Update dynaform xmlform P2 | 42445320652cd534acb3824056962285 | Dynaform - Normal Modified | dyn normal P2 DESCRIPTION Modified | grid | 3 | + | Update dynaform grid P2 | 42445320652cd534acb3824056962285 | Dynaform - Grid Modified | dyn grid P2 DESCRIPTION Modified | xmlform | 4 | + + + + Scenario Outline: Delete all Dynaform created previously in this script + Given that I want to delete a resource with the key "dyn_uid" stored in session array as variable "dyn_uid_" + And I request "project//dynaform" + 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: + + | project | dyn_uid_number | + | 14414793652a5d718b65590036026581 | 1 | + | 14414793652a5d718b65590036026581 | 2 | + | 42445320652cd534acb3824056962285 | 3 | + | 42445320652cd534acb3824056962285 | 4 | + | 14414793652a5d718b65590036026581 | 5 | + | 42445320652cd534acb3824056962285 | 6 | + | 14414793652a5d718b65590036026581 | 7 | + | 42445320652cd534acb3824056962285 | 8 | + + + Scenario Outline: Get a List DynaForms of a Project + Given I request "project//dynaforms" + 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 records + + Examples: + + | project | records | + | 14414793652a5d718b65590036026581 | 0 | + | 42445320652cd534acb3824056962285 | 1 | \ No newline at end of file diff --git a/features/backend/dynaforms/negative_tests_dynaform.feature b/features/backend/dynaforms/negative_tests_dynaform.feature new file mode 100644 index 000000000..8d855049e --- /dev/null +++ b/features/backend/dynaforms/negative_tests_dynaform.feature @@ -0,0 +1,90 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Dynaform Negative Tests + + + Background: + Given that I have a valid access_token + + +Scenario Outline: Normal Dynaform creation for a project with bad parameters (negative tests) + Given POST this data: + """ + { + "dyn_title": "", + "dyn_description": "", + "dyn_type": "" + } + """ + And I request "project//dynaform" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + | test_description | project | dyn_title | dyn_description | dyn_type | error_code | error_message | + | Field required project | | Dynaform - Normal | dyn normal P1 | xmlform | 400 | prj_uid | + | Field required dyn_title | 14414793652a5d718b65590036026581 | | dyn grid P1 | grid | 400 | dyn_title | + | Field required dyn_type | 42445320652cd534acb3824056962285 | Dynaform - Normal | dyn normal P2 | | 400 | dyn_type | + | Invalid dyn_type | 42445320652cd534acb3824056962285 | Dynaform - Grid | dyn grid P2 | graad | 400 | dyn_type | + + + Scenario Outline: Create a Dynaform using the Copy/Import method for a project with bad parameters (negative tests) + Given POST this data: + """ + { + "dyn_title": "", + "dyn_description": "", + "dyn_type": "", + "copy_import": + { + "prj_uid": "", + "dyn_uid": "" + } + } + """ + And I request "project//dynaform" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + + | test_description | project | dyn_title | dyn_description | dyn_type | copy_prj_uid | copy_dyn_uid | error_code | error_message | + | invalid copy_prj_uid | 14414793652a5d718b65590036026581 | Dynaform - Copy 1 | dyn copy | xmlform | 42445320652cd0000000000000000085 | 70070685552cd53605650f7062918505 | 400 | copy_prj_uid | + | invalid copy_dyn_uid | 42445320652cd534acb3824056962285 | Dynaform - Copy 2 | dyn copy | xmlform | 14414793652a5d718b65590036026581 | 70070685500000000000000000000000 | 400 | copy_dyn_uid | + + + Scenario Outline: Create dynaform based on a PMTable for a project with bad parameters (negative tests) + Given POST this data: + """ + { + "dyn_title": "", + "dyn_description": "", + "dyn_type": "", + "pmtable": + { + "tab_uid": "", + "fields": [ + { + "fld_name": "", + "pro_variable": "" + }, + { + "fld_name": "", + "pro_variable": "" + }, + { + "fld_name": "" + } + ] + } + } + """ + And I request "project//dynaform" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + + | test_description | project | dyn_title | dyn_description | dyn_type | tab_uid | fld_name_01 | pro_variable_01 | fld_name_02 | pro_variable_02 | fld_name_03 | pro_variable_03 | error_code | error_message | + | invalid tab_uid | 14414793652a5d718b65590036026581 | Dynaform - pmtable 1 | dyn from pmtable | xmlform | 65193158852cc1a00000000000000000 | DYN_UID | @#APPLICATION | DYN_TITLE | @#TITLE | DYN_DESCRIPTION | @#DESCRIPTION | 400 | tab_uid | + | invalid fld_name_01 | 42445320652cd534acb3824056962285 | Dynaform - pmtable 2 | dyn from pmtable | xmlform | 65193158852cc1a93a5a535084878044 | DYN_INPUT | @#APPLICATION | DYN_TITLE | @#TITLE | DYN_DESCRIPTION | @#DESCRIPTION | 400 | fld_name_01 | \ No newline at end of file diff --git a/features/backend/events/main_tests_event.feature b/features/backend/events/main_tests_event.feature index efbcba2eb..81e8f4fc6 100644 --- a/features/backend/events/main_tests_event.feature +++ b/features/backend/events/main_tests_event.feature @@ -24,6 +24,7 @@ Feature: Events Resources Main Tests "evn_related_to": "", "tas_uid": "", "evn_tas_uid_from": "", + "evn_tas_uid_to": "", "evn_tas_estimated_duration": , "evn_time_unit": "", "evn_when": , @@ -36,30 +37,30 @@ Feature: Events Resources Main Tests And the content type is "application/json" And the response charset is "UTF-8" And store "evn_uid" in session array as variable "evn_uid_" - + Examples: - | test_description | evn_uid_number | evn_action | evn_description | evn_status | evn_related_to | tas_uid | evn_tas_uid_from | evn_tas_estimated_duration | evn_time_unit | evn_when | evn_when_occurs | tri_uid | - | Create Event Message with single task, duration=days and Execution AFTER_TIME | 1 | SEND_MESSAGE | Event Message, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Message with single task, duration=hours and Execution AFTER_TIME | 2 | SEND_MESSAGE | Event Message, Single 2 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Message with single task, duration=days and Execution TASK_STARTED | 3 | SEND_MESSAGE | Event Message, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | Create Event Message with multiple task, duration=days and Execution AFTER_TIME | 4 | SEND_MESSAGE | Event Message, Multiple 4 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Message with multiple task, duration=hours and Execution AFTER_TIME | 5 | SEND_MESSAGE | Event Message, Multiple 5 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Message with multiple task, duration=days and Execution TASK_STARTED | 6 | SEND_MESSAGE | Event Message, Multiple 6 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | Create Event Conditional with single task, duration=days and Execution AFTER_TIME | 7 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Conditional with single task, duration=hours and Execution AFTER_TIME | 8 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 2 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Conditional with single task, duration=days and Execution TASK_STARTED | 9 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | Create Event Conditional with multiple task, duration=days and Execution AFTER_TIME | 10 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 4 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Conditional with multiple task, duration=hours and Execution AFTER_TIME | 11 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 5 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Conditional with multiple task, duration=days and Execution TASK_STARTED | 12 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 6 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | Create Event Timer with single task, duration=days and Execution AFTER_TIME | 13 | EXECUTE_TRIGGER | Event Timer, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Timer with single task, duration=hours and Execution AFTER_TIME | 14 | EXECUTE_TRIGGER | Event Timer, Single 2 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Timer with single task, duration=days and Execution TASK_STARTED | 15 | EXECUTE_TRIGGER | Event Timer, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | Create Event Timer with multiple task, duration=days and Execution AFTER_TIME | 16 | EXECUTE_TRIGGER | Event Timer, Multiple 4 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Timer with multiple task, duration=hours and Execution AFTER_TIME | 17 | EXECUTE_TRIGGER | Event Timer, Multiple 5 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | Create Event Timer with multiple task, duration=days and Execution TASK_STARTED | 18 | EXECUTE_TRIGGER | Event Timer, Multiple 6 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - + | test_description | evn_uid_number | evn_action | evn_description | evn_status | evn_related_to | tas_uid | evn_tas_uid_from | evn_tas_uid_to | evn_tas_estimated_duration | evn_time_unit | evn_when | evn_when_occurs | tri_uid | + | Create Event Message with single task, duration=days and Execution AFTER_TIME | 1 | SEND_MESSAGE | Event Message, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Message with single task, duration=hours and Execution AFTER_TIME | 2 | SEND_MESSAGE | Event Message, Single 2 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Message with single task, duration=days and Execution TASK_STARTED | 3 | SEND_MESSAGE | Event Message, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | + | Create Event Message with multiple task, duration=days and Execution AFTER_TIME | 4 | SEND_MESSAGE | Event Message, Multiple 4 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Message with multiple task, duration=hours and Execution AFTER_TIME | 5 | SEND_MESSAGE | Event Message, Multiple 5 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Message with multiple task, duration=days and Execution TASK_STARTED | 6 | SEND_MESSAGE | Event Message, Multiple 6 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | + | Create Event Conditional with single task, duration=days and Execution AFTER_TIME | 7 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Conditional with single task, duration=hours and Execution AFTER_TIME | 8 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 2 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Conditional with single task, duration=days and Execution TASK_STARTED | 9 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | + | Create Event Conditional with multiple task, duration=days and Execution AFTER_TIME | 10 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 4 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Conditional with multiple task, duration=hours and Execution AFTER_TIME | 11 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 5 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Conditional with multiple task, duration=days and Execution TASK_STARTED | 12 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 6 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | + | Create Event Timer with single task, duration=days and Execution AFTER_TIME | 13 | EXECUTE_TRIGGER | Event Timer, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Timer with single task, duration=hours and Execution AFTER_TIME | 14 | EXECUTE_TRIGGER | Event Timer, Single 2 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Timer with single task, duration=days and Execution TASK_STARTED | 15 | EXECUTE_TRIGGER | Event Timer, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | + | Create Event Timer with multiple task, duration=days and Execution AFTER_TIME | 16 | EXECUTE_TRIGGER | Event Timer, Multiple 4 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Timer with multiple task, duration=hours and Execution AFTER_TIME | 17 | EXECUTE_TRIGGER | Event Timer, Multiple 5 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | + | Create Event Timer with multiple task, duration=days and Execution TASK_STARTED | 18 | EXECUTE_TRIGGER | Event Timer, Multiple 6 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | + Scenario: Get List all the events in the process when there are exactly zero events Given I request "project/251815090529619a99a2bf4013294414/events" @@ -95,8 +96,8 @@ Feature: Events Resources Main Tests "evn_description": "", "evn_status": "", "evn_related_to": "", - "tas_uid": "", "evn_tas_uid_from": "", + "evn_tas_uid_to": "", "evn_tas_estimated_duration": , "evn_time_unit": "", "evn_when": , @@ -112,7 +113,7 @@ Feature: Events Resources Main Tests Examples: - | test_description | evn_uid_number | evn_action | evn_description | evn_status | evn_related_to | tas_uid | evn_tas_uid_from | evn_tas_estimated_duration | evn_time_unit | evn_when | evn_when_occurs | tri_uid | + | test_description | evn_uid_number | evn_action | evn_description | evn_status | evn_related_to | evn_tas_uid_from | evn_tas_uid_to | evn_tas_estimated_duration | evn_time_unit | evn_when | evn_when_occurs | tri_uid | | Update evn_description, evn_status, evn_related_to, evn_tas_uid_from, evn_tas_estimated_duration, evn_when, evn_when_occurs 1 | 1 | SEND_MESSAGE | Update Event Message, Single 1 | INACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | DAYS | 2 | TASK_STARTED | 75916963152cc6ab085a704081670580 | | Update evn_description, evn_status, evn_related_to, evn_tas_uid_from, evn_tas_estimated_duration, evn_when, evn_when_occurs 2 | 7 | EXECUTE_CONDITIONAL_TRIGGER | Update Event Conditional, Single 1 | INACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 3 | DAYS | 2 | TASK_STARTED | 75916963152cc6ab085a704081670580 | | Update evn_description, evn_status, evn_related_to, evn_tas_uid_from, evn_tas_estimated_duration, evn_when, evn_when_occurs 3 | 13 | EXECUTE_TRIGGER | Update Event Timer, Single 1 | INACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | DAYS | 2 | TASK_STARTED | 75916963152cc6ab085a704081670580 | @@ -120,7 +121,7 @@ Feature: Events Resources Main Tests Scenario Outline: Get a Single Events and check some properties Given that I want to get a resource with the key "evn_uid" stored in session array as variable "evn_uid_" - And I request "project/251815090529619a99a2bf4013294414/events" + And I request "project/251815090529619a99a2bf4013294414/event" Then the response status code should be 200 And the response charset is "UTF-8" And the type is "array" @@ -128,6 +129,7 @@ Feature: Events Resources Main Tests And that "evn_status" is set to "" And that "evn_related_to" is set to "" And that "evn_tas_uid_from" is set to "" + And that "evn_tas_uid_to" is set to "" And that "evn_tas_estimated_duration" is set to "" And that "evn_time_unit" is set to "" And that "evn_when" is set to "" @@ -135,13 +137,12 @@ Feature: Events Resources Main Tests Examples: - | evn_uid_number | evn_description | evn_status | evn_related_to | evn_tas_uid_from | evn_tas_estimated_duration | evn_time_unit | evn_when | evn_when_occurs | - | 1 | Update Event Message, Single 1 | INACTIVE | MULTIPLE | 63843886052a5cc066e4c04056414372 | 2 | DAYS | 2 | TASK_STARTED | - | 7 | Update Event Conditional, Single 1 | INACTIVE | MULTIPLE | 63843886052a5cc066e4c04056414372 | 3 | DAYS | 2 | TASK_STARTED | - | 13 | Update Event Timer, Single 1 | INACTIVE | MULTIPLE | 63843886052a5cc066e4c04056414372 | 2 | DAYS | 2 | TASK_STARTED | - - + | evn_uid_number | evn_description | evn_status | evn_related_to | evn_tas_uid_from | evn_tas_uid_to | evn_tas_estimated_duration | evn_time_unit | evn_when | evn_when_occurs | tri_uid | + | 1 | Update Event Message, Single 1 | INACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | DAYS | 2 | TASK_STARTED | 75916963152cc6ab085a704081670580 | + | 7 | Update Event Conditional, Single 1 | INACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 3 | DAYS | 2 | TASK_STARTED | 75916963152cc6ab085a704081670580 | + | 13 | Update Event Timer, Single 1 | INACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | DAYS | 2 | TASK_STARTED | 75916963152cc6ab085a704081670580 | + Scenario Outline: Delete all Events created previously in this script Given that I want to delete a resource with the key "evn_uid" stored in session array as variable "evn_uid_" And I request "project/251815090529619a99a2bf4013294414/event" diff --git a/features/backend/events/negative_tests_event.feature b/features/backend/events/negative_tests_event.feature index 322851647..4e229f65e 100644 --- a/features/backend/events/negative_tests_event.feature +++ b/features/backend/events/negative_tests_event.feature @@ -15,6 +15,7 @@ Feature: Events Resources Negative Tests "evn_related_to": "", "tas_uid": "", "evn_tas_uid_from": "", + "evn_tas_uid_to": "", "evn_tas_estimated_duration": , "evn_time_unit": "", "evn_when": , @@ -22,32 +23,73 @@ Feature: Events Resources Negative Tests "tri_uid": "" } """ - And I request "project/251815090529619a99a2bf4013294414/event" - Then the response status code should be 201 - And the content type is "application/json" - And the response charset is "UTF-8" - And store "evn_uid" in session array as variable "evn_uid_" - + And I request "project//event" + Then the response status code should be + And the response status message should have the following text "" Examples: - | test_description | evn_uid_number | evn_action | evn_description | evn_status | evn_related_to | tas_uid | evn_tas_uid_from | evn_tas_estimated_duration | evn_time_unit | evn_when | evn_when_occurs | tri_uid | - | | 1 | SEND_MESSAGE | Event Message, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 2 | SEND_MESSAGE | Event Message, Single 2 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 3 | SEND_MESSAGE | Event Message, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | | 4 | SEND_MESSAGE | Event Message, Multiple 4 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 5 | SEND_MESSAGE | Event Message, Multiple 5 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 6 | SEND_MESSAGE | Event Message, Multiple 6 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | | 7 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 8 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 2 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 9 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | | 10 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 4 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 11 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 5 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 12 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 6 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | | 13 | EXECUTE_TRIGGER | Event Timer, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 14 | EXECUTE_TRIGGER | Event Timer, Single 2 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 15 | EXECUTE_TRIGGER | Event Timer, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - | | 16 | EXECUTE_TRIGGER | Event Timer, Multiple 4 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 17 | EXECUTE_TRIGGER | Event Timer, Multiple 5 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | - | | 18 | EXECUTE_TRIGGER | Event Timer, Multiple 6 | ACTIVE | MULTIPLE | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | - \ No newline at end of file + | test_description | project | evn_action | evn_description | evn_status | evn_related_to | tas_uid | evn_tas_uid_from | evn_tas_uid_to | evn_tas_estimated_duration | evn_time_unit | evn_when | evn_when_occurs | tri_uid | error_code | error_message | + | Field requered evn_description | 251815090529619a99a2bf4013294414 | SEND_MESSAGE | | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | evn_description | + | Field requered evn_status | 251815090529619a99a2bf4013294414 | SEND_MESSAGE | Event Message, Single 2 | | SINGLE | 97192372152a5c78f04a794095806311 | | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | evn_status | + | Field requered evn_action | 251815090529619a99a2bf4013294414 | | Event Message, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | 400 | evn_action | + | Field requered evn_related_to | 251815090529619a99a2bf4013294414 | SEND_MESSAGE | Event Message, Multiple 4 | ACTIVE | | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | evn_related_to | + | Field requered evn_tas_uid_from | 251815090529619a99a2bf4013294414 | SEND_MESSAGE | Event Message, Multiple 5 | ACTIVE | MULTIPLE | | | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | evn_tas_uid_from | + | Field requered evn_tas_uid_to | 251815090529619a99a2bf4013294414 | SEND_MESSAGE | Event Message, Multiple 6 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | 400 | evn_tas_uid_to | + | Field requered tas_uid | 251815090529619a99a2bf4013294414 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 1 | ACTIVE | SINGLE | | | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | tas_uid | + | Field requered evn_time_unit | 251815090529619a99a2bf4013294414 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | 400 | evn_time_unit | + | Field requered evn_when_occurs | 251815090529619a99a2bf4013294414 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 5 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | | 75916963152cc6ab085a704081670580 | 400 | evn_when_occurs | + | Field requered tri_uid | 251815090529619a99a2bf4013294414 | EXECUTE_CONDITIONAL_TRIGGER | Event Conditional, Multiple 6 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | | 400 | tri_uid | + | Field requered prj_uid | | EXECUTE_TRIGGER | Event Timer, Single 1 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | prj_uid | + | Invalid evn_status | 251815090529619a99a2bf4013294414 | EXECUTE_TRIGGER | Event Timer, Single 2 | SAMPLE | SINGLE | 97192372152a5c78f04a794095806311 | | | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | evn_status | + | Invalid evn_action | 251815090529619a99a2bf4013294414 | INPUT DOCUMENT | Event Timer, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | 400 | evn_action | + | Invalid evn_related_to | 251815090529619a99a2bf4013294414 | EXECUTE_TRIGGER | Event Timer, Multiple 4 | ACTIVE | SAMPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | evn_related_to | + | Invalid evn_tas_uid_from | 251815090529619a99a2bf4013294414 | EXECUTE_TRIGGER | Event Timer, Multiple 5 | ACTIVE | MULTIPLE | | 0000000000000c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | task | + | Invalid evn_tas_uid_to | 251815090529619a99a2bf4013294414 | EXECUTE_TRIGGER | Event Timer, Multiple 6 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 00000000000000c066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | 400 | task | + | Invalid tas_uid | 251815090529619a99a2bf4013294414 | SEND_MESSAGE | Event Message, Single 1 | ACTIVE | SINGLE | 0000000000000c78f04a794095806311 | | | 1 | DAYS | 1 | AFTER_TIME | 75916963152cc6ab085a704081670580 | 400 | task | + | Invalid evn_time_unit | 251815090529619a99a2bf4013294414 | SEND_MESSAGE | Event Message, Single 3 | ACTIVE | SINGLE | 97192372152a5c78f04a794095806311 | | | 1 | YEAR | 1 | TASK_STARTED | 75916963152cc6ab085a704081670580 | 400 | evn_time_unit | + | Invalid evn_when_occurs | 251815090529619a99a2bf4013294414 | SEND_MESSAGE | Event Message, Multiple 5 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 2 | HOURS | 1 | AFTER_TASK | 75916963152cc6ab085a704081670580 | 400 | evn_when_occurs | + | Invalid tri_uid | 251815090529619a99a2bf4013294414 | SEND_MESSAGE | Event Message, Multiple 6 | ACTIVE | MULTIPLE | | 97192372152a5c78f04a794095806311 | 63843886052a5cc066e4c04056414372 | 1 | DAYS | 1 | TASK_STARTED | 00000000000006ab085a704081670580 | 400 | tri_uid | + + + + Scenario: Create a new event for a project with bad parameters (negative tests) for variable evn_tas_estimated_duration + Given POST this data: + """ + { + "evn_description": "DE BEHAT", + "evn_status": "ACTIVE", + "evn_action": "SEND_MESSAGE", + "evn_related_to": "SINGLE", + "tas_uid": "97192372152a5c78f04a794095806311", + "evn_tas_estimated_duration": "", + "evn_time_unit": "DAYS", + "evn_when": 1, + "evn_when_occurs": "AFTER_TIME", + "tri_uid": "75916963152cc6ab085a704081670580" + } + """ + And I request "project/251815090529619a99a2bf4013294414/event" + Then the response status code should be 400 + And the response status message should have the following text "evn_tas_estimated_duration" + + + Scenario: Create a new event for a project with bad parameters (negative tests) for variable evn_when + Given POST this data: + """ + { + "evn_description": "DE BEHAT", + "evn_status": "ACTIVE", + "evn_action": "SEND_MESSAGE", + "evn_related_to": "SINGLE", + "tas_uid": "97192372152a5c78f04a794095806311", + "evn_tas_estimated_duration": "1", + "evn_time_unit": "DAYS", + "evn_when": "", + "evn_when_occurs": "AFTER_TIME", + "tri_uid": "75916963152cc6ab085a704081670580" + } + """ + And I request "project/251815090529619a99a2bf4013294414/event" + Then the response status code should be 400 + And the response status message should have the following text "evn_when" \ No newline at end of file diff --git a/features/backend/pm_group/basic_sequence_pm_group.feature b/features/backend/pm_group/basic_sequence_pm_group.feature new file mode 100644 index 000000000..21a5b64a1 --- /dev/null +++ b/features/backend/pm_group/basic_sequence_pm_group.feature @@ -0,0 +1,120 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Group + Background: + Given that I have a valid access_token + + #GET /api/1.0/{workspace}/groups?filter=abc&start=0&limit=25 + # Get list Groups + Scenario: Get list Groups + And I request "groups?filter=for basic behat" + 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 json data is an empty array + + #POST /api/1.0/{workspace}/group + # Create new Group + Scenario Outline: Create new Group + Given POST this data: + """ + { + "grp_title": "", + "grp_status": "" + } + """ + And I request "group" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + And store "grp_uid" in session array as variable "grp_uid" + + Examples: + | i | grp_title | grp_status | + | 0 | Demo Group1 for basic behat | ACTIVE | + | 1 | Demo Group2 for basic behat | ACTIVE | + + #PUT /api/1.0/{workspace}/group/{grp_uid} + # Update Group + Scenario Outline: Update Group + Given PUT this data: + """ + { + "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" + 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: + | i | grp_status | + | 0 | INACTIVE | + | 1 | INACTIVE | + + #GET /api/1.0/{workspace}/groups?filter=abc&start=0&limit=25 + # Get list Groups + Scenario Outline: Get list Groups + And I request "groups?filter=for basic behat" + 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 "grp_title" property in row equals "" + And the "grp_status" property in row equals "" + And the "grp_users" property in row equals "" + And the "grp_tasks" property in row equals "" + + Examples: + | i | grp_title | grp_status | grp_users | grp_tasks | + | 0 | Demo Group1 for basic behat | INACTIVE | 0 | 0 | + | 1 | Demo Group2 for basic behat | INACTIVE | 0 | 0 | + + #GET /api/1.0/{workspace}/group/{grp_uid} + # Get a single Group + Scenario Outline: Get a single Group + Given that I want to get a resource with the key "grp_uid" stored in session array as variable "grp_uid" + And I request "group" + 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" + And that "grp_title" is set to "" + And that "grp_status" is set to "" + And that "grp_users" is set to "" + And that "grp_tasks" is set to "" + + Examples: + | i | grp_title | grp_status | grp_users | grp_tasks | + | 0 | Demo Group1 for basic behat | INACTIVE | 0 | 0 | + | 1 | Demo Group2 for basic behat | INACTIVE | 0 | 0 | + + #DELETE /api/1.0/{workspace}/group/{grp_uid} + # Delete Group + Scenario Outline: Delete Group + Given that I want to delete a resource with the key "grp_uid" stored in session array as variable "grp_uid" + And I request "group" + 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: + | i | + | 0 | + | 1 | + + #GET /api/1.0/{workspace}/groups?filter=abc&start=0&limit=25 + # Get list Groups + Scenario: Get list Groups + And I request "groups?filter=for basic behat" + 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 json data is an empty array + diff --git a/features/backend/pm_group/main_tests_pm_group.feature b/features/backend/pm_group/main_tests_pm_group.feature new file mode 100644 index 000000000..69f7f1437 --- /dev/null +++ b/features/backend/pm_group/main_tests_pm_group.feature @@ -0,0 +1,136 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: PM Group Main Tests + Requirements: + a workspace with the 20 groups already loaded + + Background: + Given that I have a valid access_token + + Scenario Outline: Get list Groups of workspace using different filters + And I request "groups?filter=&start=&limit=" + And the content type is "application/json" + Then the response status code should be + And the response charset is "UTF-8" + And the type is "array" + And the response has records + + Examples: + + | test_description | filter | start | limit | records | http_code | + | lowercase | admin | 0 | 9 | 2 | 200 | + | uppercase | ADMIN | 0 | 9 | 2 | 200 | + | limit=3 | a | 0 | 3 | 3 | 200 | + | limit and start | a | 1 | 2 | 2 | 200 | + | high number for start | a | 1000 | 1 | 0 | 200 | + | high number for start | a | 1000 | 0 | 0 | 200 | + | empty result | xyz | 0 | 0 | 0 | 200 | + | empty string | | 0 | 10000 | 20 | 200 | + | empty string | | 1 | 2 | 2 | 200 | + | search 0 | 0 | 0 | 0 | 0 | 200 | + | search 0 | 0 | 0 | 100 | 0 | 200 | + | real numbers | a | 0.0 | 1.0 | 1 | 200 | + | real numbers | a | 0.0 | 0.0 | 0 | 200 | + | Search letters 'c' | c | 0 | 5 | 8 | 200 | + | Search letters 'de | de | 0 | 5 | 4 | 200 | + + + + Scenario Outline: Create new Group + Given POST this data: + """ + { + "grp_title": "", + "grp_status": "" + } + """ + And I request "group" + And the content type is "application/json" + 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 "grp_uid" in session array as variable "grp_uid_" + + Examples: + + | grp_uid_number | grp_title | grp_status | + | 0 | Demo Group1 for main behat | ACTIVE | + | 1 | Demo Group2 for main behat | ACTIVE | + | 2 | Demo Group3 for main behat | INACTIVE | + + + Scenario: Get list Groups of workspace + 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 23 records + + + Scenario Outline: Update Group and then check if the values had changed + 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" + 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: + + | grp_uid_number | grp_title | grp_status | + | 0 | Update Demo Group1 for main behat | INACTIVE | + | 1 | Update Demo Group2 for main behat | INACTIVE | + | 2 | Update Demo Group3 for main behat | ACTIVE | + + + Scenario Outline: Get a single Groups and check some properties + Given that I want to get a resource with the key "grp_uid" stored in session array as variable "grp_uid_" + And I request "group" + 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" + And the "grp_title" property equals "" + And the "grp_status" property equals "" + + + Examples: + + | grp_uid_number | grp_title | grp_status | + | 0 | Update Demo Group1 for main behat | INACTIVE | + | 1 | Update Demo Group2 for main behat | INACTIVE | + | 2 | Update Demo Group3 for main behat | ACTIVE | + + + Scenario Outline: Delete all Group created previously in this script + Given that I want to delete a resource with the key "grp_uid" stored in session array as variable "grp_uid_" + And I request "group" + 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: + + | grp_uid_number | + | 0 | + | 1 | + | 2 | + + #GET /api/1.0/{workspace}/groups?filter=abc&start=0&limit=25 + # Get list Groups + Scenario: Get list Groups + And I request "groups?filter=Update Demo Gro" + 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 json data is an empty array \ No newline at end of file diff --git a/features/backend/pm_group/negative_tests_pm_group.feature b/features/backend/pm_group/negative_tests_pm_group.feature new file mode 100644 index 000000000..982d49cfc --- /dev/null +++ b/features/backend/pm_group/negative_tests_pm_group.feature @@ -0,0 +1,40 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: PM Group Negative Tests + + Background: + Given that I have a valid access_token + + Scenario Outline: Get list Groups of workspace using different filters with bad parameters (negative tests) + And I request "groups?filter=&start=&limit=" + And the content type is "application/json" + Then the response status code should be + + + Examples: + + | test_description | filter | start | limit | records | http_code | + | Invalid start | a | b | c | 0 | 400 | + | Invalid limit | a | 0 | c | 0 | 400 | + | real numbers | a | 0.1 | 1.4599 | 0 | 400 | + | real numbers | a | 1.5 | 1.4599 | 0 | 400 | + + + Scenario Outline: Create new Group with bad parameters (negative tests) + Given POST this data: + """ + { + "grp_title": "", + "grp_status": "" + } + """ + And I request "group" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + + | grp_title | grp_status | error_code | error_message | + | Field requered grp_title | ACTIVE | 400 | grp_title | + | Field requered grp_status | ACTIVE | 400 | grp_status | + + \ No newline at end of file diff --git a/features/backend/project_user/main_tests_project_user.feature b/features/backend/project_user/main_tests_project_user.feature index 5df65f7b5..565fef845 100644 --- a/features/backend/project_user/main_tests_project_user.feature +++ b/features/backend/project_user/main_tests_project_user.feature @@ -18,13 +18,13 @@ Feature: Project User Resources Main Tests And the response has 52 records - Scenario: Get a list of starting task of a project when there are exactly 9 users + Scenario: Get a list of starting task of a project when there are exactly 3 tasks Given I request "project/1265557095225ff5c688f46031700471/starting-tasks" 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 9 records + And the response has 3 records Scenario Outline: Get a list of start task of a specific user diff --git a/features/backend/web_entry/main_tests_web_entry.feature b/features/backend/web_entry/main_tests_web_entry.feature index e69de29bb..a1da7a744 100644 --- a/features/backend/web_entry/main_tests_web_entry.feature +++ b/features/backend/web_entry/main_tests_web_entry.feature @@ -0,0 +1,207 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Web Entry + Requirements: + Default user "admin" with password "admin" + + Background: + Given that I have a valid access_token + + #GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee?filter=john&start=0&limit=50 + # List assignees of an activity + Scenario Outline: List assignees of an activity + Given I request "project/28733629952e66a362c4f63066393844/activity//assignee" + 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 json data is an empty array + + Examples: + | tas_uid | tas_title | + | 44199549652e66ba533bb06088252754 | Task 1 | + | 56118778152e66babcc2103002009439 | Task 2 | + | 18096002352e66bc1643af8048493068 | Task 3 | + + #POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee + # Assign a user or group to an activity + Scenario Outline: Assign a user or group to an activity + Given POST this data: + """ + { + "aas_uid": "", + "aas_type": "user" + } + """ + And I request "project/28733629952e66a362c4f63066393844/activity//assignee" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + + Examples: + | tas_uid | tas_title | aas_uid | + | 44199549652e66ba533bb06088252754 | Task 1 | 00000000000000000000000000000001 | + | 56118778152e66babcc2103002009439 | Task 2 | 00000000000000000000000000000001 | + | 18096002352e66bc1643af8048493068 | Task 3 | 00000000000000000000000000000001 | + + #WEB ENTRY + + #GET /api/1.0/{workspace}/project/{prj_uid}/web-entries + # Get list Web Entries of a Project + Scenario: Get list Web Entries of a Project + And I request "project/28733629952e66a362c4f63066393844/web-entries" + 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 json data is an empty array + + #POST /api/1.0/{workspace}/project/{prj_uid}/web-entry + # Create a new Web Entry for a project + # Create a new Web Entry using the method: PHP pages with Web Services + Scenario Outline: Create a new Web Entry using the method: PHP pages with Web Services + Given POST this data: + """ + { + "tas_uid": "", + "dyn_uid": "", + "method": "WS", + "input_document_access": 1, + "usr_username": "admin", + "usr_password": "admin" + } + """ + And I request "project/28733629952e66a362c4f63066393844/web-entry" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + And the response has a "url" property + And the "url" property type is "string" + + Examples: + | tas_uid | tas_title | dyn_uid | dyn_title | + | 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 |DynaForm Demo1 | + | 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 |DynaForm Demo2 | + + #POST /api/1.0/{workspace}/project/{prj_uid}/web-entry + # Create a new Web Entry for a project + # Create a new Web Entry using the method: Single HTML + Scenario Outline: Create a new Web Entry using the method: Single HTML + Given POST this data: + """ + { + "tas_uid": "", + "dyn_uid": "", + "method": "HTML", + "input_document_access": 1 + } + """ + And I request "project/28733629952e66a362c4f63066393844/web-entry" + And the content type is "application/json" + Then the response status code should be 201 + And the response charset is "UTF-8" + And the type is "object" + And the response has a "html" property + And the "html" property type is "string" + + Examples: + | tas_uid | tas_title | dyn_uid | dyn_title | + | 18096002352e66bc1643af8048493068 | Task 3 | 37977455352e66b892babe6071295002 |DynaForm Demo3 | + + #GET /api/1.0/{workspace}/project/{prj_uid}/web-entries + # Get list Web Entries of a Project + Scenario Outline: Get list Web Entries of a Project + And I request "project/28733629952e66a362c4f63066393844/web-entries" + 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 "tas_uid" property in row equals "" + And the "tas_title" property in row equals "" + And the "dyn_uid" property in row equals "" + And the "dyn_title" property in row equals "" + + Examples: + | i | tas_uid | tas_title | dyn_uid | dyn_title | + | 0 | 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 |DynaForm Demo1 | + | 1 | 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 |DynaForm Demo2 | + + #GET GET /api/1.0/{workspace}/project/{prj_uid}/web-entry/{tas_uid}/{dyn_uid} + # Get a single Web Entry of a Project + Scenario Outline: Get a single Web Entry of a Project + Given that I want to get a resource with the key "obj_uid" stored in session array + And I request "project/28733629952e66a362c4f63066393844/web-entry//" + 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" + And that "tas_uid" is set to "" + And that "tas_title" is set to "" + And that "dyn_uid" is set to "" + And that "dyn_title" is set to "" + + Examples: + | tas_uid | tas_title | dyn_uid | dyn_title | + | 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 |DynaForm Demo1 | + | 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 |DynaForm Demo2 | + + #DELETE /api/1.0/{workspace}/project/{prj_uid}/web-entry/{tas_uid}/{dyn_uid} + # Delete a Web Entry of a Project + Scenario Outline: Delete a Web Entry of a Project + Given that I want to delete a resource with the key "obj_uid" stored in session array + And I request "project/28733629952e66a362c4f63066393844/web-entry//" + 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: + | tas_uid | tas_title | dyn_uid | dyn_title | + | 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 |DynaForm Demo1 | + | 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 |DynaForm Demo2 | + + #GET /api/1.0/{workspace}/project/{prj_uid}/web-entries + # Get list Web Entries of a Project + Scenario: Get list Web Entries of a Project + And I request "project/28733629952e66a362c4f63066393844/web-entries" + 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 json data is an empty array + + #WEB ENTRY - END + + #DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid} + # Remove an assignee of an activity + Scenario Outline: Remove an assignee of an activity + Given that I want to delete a resource with the key "obj_uid" stored in session array + And I request "project/28733629952e66a362c4f63066393844/activity//assignee/" + 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: + | tas_uid | tas_title | aas_uid | + | 44199549652e66ba533bb06088252754 | Task 1 | 00000000000000000000000000000001 | + | 56118778152e66babcc2103002009439 | Task 2 | 00000000000000000000000000000001 | + | 18096002352e66bc1643af8048493068 | Task 3 | 00000000000000000000000000000001 | + + #GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee?filter=john&start=0&limit=50 + # List assignees of an activity + Scenario Outline: List assignees of an activity + Given I request "project/28733629952e66a362c4f63066393844/activity//assignee" + 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 json data is an empty array + + Examples: + | tas_uid | tas_title | + | 44199549652e66ba533bb06088252754 | Task 1 | + | 56118778152e66babcc2103002009439 | Task 2 | + | 18096002352e66bc1643af8048493068 | Task 3 | + diff --git a/features/backend/web_entry/negative_tests_web_entry.feature b/features/backend/web_entry/negative_tests_web_entry.feature new file mode 100644 index 000000000..e69de29bb diff --git a/features/bootstrap/RestContext.php b/features/bootstrap/RestContext.php index 5d5cd542f..29af6d515 100644 --- a/features/bootstrap/RestContext.php +++ b/features/bootstrap/RestContext.php @@ -1242,6 +1242,29 @@ class RestContext extends BehatContext } + /** + * @Given /^the property "([^"]*)" of "([^"]*)" is set to "([^"]*)"$/ + */ + public function thePropertyOfIsSetTo($propertyName, $objName, $propertyValue) + { + $data = $this->_data; + if (!empty($data)) { + if (!isset($data->$objName)) { + throw new Exception("Object '$objName' is not set!\n\n" ); + } + if (!isset($data->$objName->$propertyName)) { + throw new Exception("Property '$propertyName' is not set in object '$objName'!\n\n" ); + } + if ($data->$objName->$propertyName != $propertyValue) { + throw new \Exception('Property value mismatch! (given: "' + . $propertyValue . '", match: "' + . $data->$objName->$propertyName . '")\n\n' + ); + } + } else { + throw new Exception("Response was not JSON\n\n" + . $this->_response->getBody(true)); + } + } - -} +} \ No newline at end of file