diff --git a/features/backend/application_cases/case_actions/main_tests_cases_actions.feature b/features/backend/application_cases/case_actions/main_tests_cases_actions.feature index 73a086ca1..ee77c340e 100644 --- a/features/backend/application_cases/case_actions/main_tests_cases_actions.feature +++ b/features/backend/application_cases/case_actions/main_tests_cases_actions.feature @@ -606,4 +606,70 @@ Scenario: case tasks of case 145, case on unassigned list And that "del_task_due_date" is set to "2014-04-02 15:02:17" And that "del_finish_date" is set to "Not finished" And that "duration" is set to "Not finished" - And that "color" is set to "#FF0000" \ No newline at end of file + And that "color" is set to "#FF0000" + + +# BUG 15290, Derivation Of Screen Error in execution + +Scenario Outline: Create a new case with process attach in the bug reporter + Given POST this data: + """ + { + "pro_uid": "", + "tas_uid": "", + "variables": [{"name": "admin", "amount":"1030"}] + } + """ + And I request "cases" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "object" + And store "app_uid" in session array as variable "app_uid_" + And store "app_number" in session array as variable "app_number_" + + Examples: + | Description | case_number | pro_uid | tas_uid | + | Create new case with process "testExecutionOfDerivationScreen" | 1 | 87648819953a85c0abc01d3080475981 | 75617018953a885be331271018981055 | + + +Scenario Outline: Route a case to the next task in the process + Given PUT this data: + """ + { + "del_index": "1" + } + """ + And I request "cases/app_uid/route-case" with the key "app_uid" stored in session array as variable "app_uid_" + Then the response status code should be 200 + And the content type is "application/json" + And the response charset is "UTF-8" + And the type is "object" + + + Examples: + + | test_description | case_number | + | Derivate case of the process | 1 | + + +Scenario Outline: Delete a case + Given PUT this data: + """ + { + + } + """ + + And that I want to delete a resource with the key "app_uid" stored in session array as variable "app_uid_" + And I request "cases" + Then the response status code should be 200 + And the content type is "application/json" + And the response charset is "UTF-8" + And the type is "object" + + + Examples: + + | test_description | case_number | + | Delete a case 1 | 1 | \ No newline at end of file diff --git a/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature b/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature index 821188f17..bfdd20bdb 100644 --- a/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature +++ b/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature @@ -189,83 +189,84 @@ Scenario Outline: Delete all case scheduler of a project created previously in t #Scenario para la revision del "BUG 15040" donde se comprueba la creacion de nuevos case scheduler en diferentes proyectos BPMN. -#Scenario Outline: Create a new case scheduler with same name -# Given POST this data: -# """ -# { -# "sch_option": "5", -# "sch_name": "sample", -# "sch_del_user_name": "admin", -# "tas_uid": "4790702485368efad167477011123879", -# "sch_start_time": "", -# "sch_start_date": "", -# "sch_end_date": "", -# "sch_week_days": "", -# "sch_start_day": "", -# "sch_start_day_opt_1": "", -# "sch_start_day_opt_2": "", -# "sch_months": "", -# "sch_repeat_every": "12.30" -# } -# """ -# And I request "project/1455892245368ebeb11c1a5001393784/case-scheduler" -# 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 "sch_uid" in session array as variable "sch_uid_" -# -# Examples: -# -# | test_description | sch_uid_number | -# | Create with Daily | 1 | -# -# -#Scenario Outline: Create new Projects with event case scheduler -# Given POST data from file "" -# And I request "projects" -# 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 "array" -# And store "new_uid" in session array as variable "project_new_uid_" where an object has "object" equal to "project" -# And store "new_uid" in session array as variable "diagram_new_uid_" where an object has "object" equal to "diagram" -# And store "new_uid" in session array as variable "activity_new_uid_" where an object has "object" equal to "activity" -# And store "new_uid" in session array as variable "evn_uid_" where an object has "object" equal to "event" -# And store "new_uid" in session array as variable "flow_new_uid_" where an object has "object" equal to "flow" -# -# Examples: -# -# | Description | project_new_uid_number | evn_uid_number | project_template | -# | Create a new project with event case scheduler | 1 | 3 | project_bug_case_scheduler1.json | -# | Create a new project with event case scheduler | 2 | 4 | project_bug_case_scheduler2.json | -# -# -#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//event" -# Then the response status code should be 200 -# And the response charset is "UTF-8" -# And the type is "object" -# -# Examples: -# -# | project_new_uid_number | evn_uid_number | -# | 1 | 3 | -# | 2 | 4 | -# -# -#Scenario Outline: Delete a Project previously created in this script -# Given that I want to delete a resource with the key "new_uid" stored in session array as variable "project_new_uid_" in position 0 -# And I request "projects" -# 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_new_uid_number | -# | 1 | -# | 2 | +Scenario Outline: Create a new case scheduler with same name + Given POST this data: + """ + { + "sch_option": "5", + "sch_name": "sample", + "sch_del_user_name": "admin", + "tas_uid": "4790702485368efad167477011123879", + "sch_start_time": "", + "sch_start_date": "", + "sch_end_date": "", + "sch_week_days": "", + "sch_start_day": "", + "sch_start_day_opt_1": "", + "sch_start_day_opt_2": "", + "sch_months": "", + "sch_repeat_every": "12.30" + } + """ + And I request "project//case-scheduler" + 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 "sch_uid" in session array as variable "sch_uid_" + + Examples: + + | test_description | sch_uid_number | project | + | Create with Daily in project Derivation rules - evaluation | 1 | 46279907250ec73b9b25a78031279680 | + | Create with Daily in project Derivation rules - Parallel | 2 | 35894775350ec7daa099378048029617 | + + +Scenario Outline: Delete case scheduler of a project created previously in this script + Given that I want to delete a resource with the key "sch_uid" stored in session array as variable "sch_uid_" + And I request "project/46279907250ec73b9b25a78031279680/case-scheduler" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + + Examples: + + | sch_uid_number | + | 1 | + | 2 | + + +Scenario Outline: Create new Projects with event case scheduler + Given POST data from file "" + And I request "projects" + 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 "array" + And store "new_uid" in session array as variable "project_new_uid_" where an object has "object" equal to "project" + And store "new_uid" in session array as variable "diagram_new_uid_" where an object has "object" equal to "diagram" + And store "new_uid" in session array as variable "activity_new_uid_" where an object has "object" equal to "activity" + And store "new_uid" in session array as variable "evn_uid_" where an object has "object" equal to "event" + And store "new_uid" in session array as variable "flow_new_uid_" where an object has "object" equal to "flow" + + Examples: + + | Description | project_new_uid_number | evn_uid_number | project_template | + | Create a new project with event case scheduler 1 | 1 | 3 | project_bug_case_scheduler1.json | + | Create a new project with event case scheduler 2 | 2 | 4 | project_bug_case_scheduler2.json | + + +Scenario Outline: Delete a Project previously created in this script + Given that I want to delete a resource with the key "new_uid" stored in session array as variable "project_new_uid_" in position 0 + And I request "projects" + 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_new_uid_number | + | 1 | + | 2 | diff --git a/features/backend/projects/dynaforms/main_tests_dynaform.feature b/features/backend/projects/dynaforms/main_tests_dynaform.feature index 9e5df7e8b..f48fb51a5 100644 --- a/features/backend/projects/dynaforms/main_tests_dynaform.feature +++ b/features/backend/projects/dynaforms/main_tests_dynaform.feature @@ -26,12 +26,15 @@ Feature: Dynaform Main Tests Scenario Outline: Normal Dynaform creation - Given POST this data: + Given POST a dynaform: """ { "dyn_title": "", "dyn_description": "", - "dyn_type": "" + "dyn_type": "", + "dyn_content": "", + "dyn_version": 1 + } """ And I request "project//dynaform" @@ -42,20 +45,45 @@ Feature: Dynaform Main Tests 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 | + | test_description | project | dyn_title | dyn_description | dyn_type | dyn_content | dyn_uid_number | + | create dynaform xmlform P1 | 14414793652a5d718b65590036026581 | Dynaform - Normal | dyn normal P1 | xmlform | sample content 1 | 1 | + | create dynaform grid P1 | 14414793652a5d718b65590036026581 | Dynaform - Grid | dyn grid P1 | grid | sample content 2 | 2 | + | create dynaform xmlform P2 | 42445320652cd534acb3824056962285 | Dynaform - Normal | dyn normal P2 | xmlform | | 3 | + | create dynaform grid P2 | 42445320652cd534acb3824056962285 | Dynaform - Grid | dyn grid P2 | grid | sample content 4 | 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 "" + And that "dyn_content" is set to "" + And that "dyn_version" is set to 1 + + Examples: + | test_description | project | dyn_title | dyn_description | dyn_type | dyn_content | dyn_uid_number | + | create dynaform xmlform P1 | 14414793652a5d718b65590036026581 | Dynaform - Normal | dyn normal P1 | xmlform | sample content 1 | 1 | + | create dynaform grid P1 | 14414793652a5d718b65590036026581 | Dynaform - Grid | dyn grid P1 | grid | sample content 2 | 2 | + | create dynaform xmlform P2 | 42445320652cd534acb3824056962285 | Dynaform - Normal | dyn normal P2 | xmlform | | 3 | + | create dynaform grid P2 | 42445320652cd534acb3824056962285 | Dynaform - Grid | dyn grid P2 | grid | sample content 4 | 4 | + Scenario: Create dynaform with same name - Given POST this data: + Given POST a dynaform: """ { "dyn_title": "Dynaform - Normal", "dyn_description": "dyn normal P1", - "dyn_type": "xmlform" + "dyn_type": "xmlform", + "dyn_content": "sample content 1", + "dyn_version": 1 } """ And I request "project/14414793652a5d718b65590036026581/dynaform" @@ -185,12 +213,15 @@ Feature: Dynaform Main Tests Scenario Outline: Update the Dynaform and then check if the values had changed - Given PUT this data: + Given PUT a dynaform: """ { "dyn_title": "", "dyn_description": "", - "dyn_type": "" + "dyn_type": "", + "dyn_content": "", + "dyn_version": 1 + } """ And that I want to update a resource with the key "dyn_uid" stored in session array as variable "dyn_uid_" @@ -202,11 +233,11 @@ Feature: Dynaform Main Tests 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 | + | test_description | project | dyn_title | dyn_description | dyn_type | dyn_content | dyn_uid_number | + | Update dynaform xmlform P1 | 14414793652a5d718b65590036026581 | My DynaForm1 Modified | My DynaForm1 DESCRIPTION Modified | grid | update sample content 1 | 1 | + | Update dynaform grid P1 | 14414793652a5d718b65590036026581 | Dynaform - Grid Modified | dyn grid P1 DESCRIPTION Modified | xmlform | update sample content 2 | 2 | + | Update dynaform xmlform P2 | 42445320652cd534acb3824056962285 | Dynaform - Normal Modified | dyn normal P2 DESCRIPTION Modified | grid | sample | 3 | + | Update dynaform grid P2 | 42445320652cd534acb3824056962285 | Dynaform - Grid Modified | dyn grid P2 DESCRIPTION Modified | xmlform | sample content 4 | 4 | @@ -220,14 +251,15 @@ Feature: Dynaform Main Tests And that "dyn_title" is set to "" And that "dyn_description" is set to "" And that "dyn_type" is set to "" + And that "dyn_content" is set to "" + And that "dyn_version" is set to 1 - - 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 | + Examples: + | test_description | project | dyn_title | dyn_description | dyn_type | dyn_content | dyn_uid_number | + | Update dynaform xmlform P1 | 14414793652a5d718b65590036026581 | My DynaForm1 Modified | My DynaForm1 DESCRIPTION Modified | grid | update sample content 1 | 1 | + | Update dynaform grid P1 | 14414793652a5d718b65590036026581 | Dynaform - Grid Modified | dyn grid P1 DESCRIPTION Modified | xmlform | update sample content 2 | 2 | + | Update dynaform xmlform P2 | 42445320652cd534acb3824056962285 | Dynaform - Normal Modified | dyn normal P2 DESCRIPTION Modified | grid | sample | 3 | + | Update dynaform grid P2 | 42445320652cd534acb3824056962285 | Dynaform - Grid Modified | dyn grid P2 DESCRIPTION Modified | xmlform | sample content 4 | 4 | diff --git a/features/backend/projects/dynaforms/negative_tests_dynaform.feature b/features/backend/projects/dynaforms/negative_tests_dynaform.feature index 218b189ad..b3036ea4b 100644 --- a/features/backend/projects/dynaforms/negative_tests_dynaform.feature +++ b/features/backend/projects/dynaforms/negative_tests_dynaform.feature @@ -7,84 +7,119 @@ Feature: Dynaform Negative Tests Scenario Outline: Normal Dynaform creation for a project with bad parameters (negative tests) - Given POST this data: - """ + Given POST this data: + """ + { + "dyn_title": "", + "dyn_description": "", + "dyn_type": "", + "dyn_content": "", + "dyn_version": 1 + + } + """ + 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 | dyn_content | + | Field required project | | Dynaform - Normal | dyn normal P1 | xmlform | 400 | prj_uid | sample 1 | + | 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 | sample 3 | + | Invalid dyn_type | 42445320652cd534acb3824056962285 | Dynaform - Grid | dyn grid P2 | graad | 400 | dyn_type | sample 4 | + + +Scenario: Normal Dynaform creation with wrong dyn_version (negative tests) + Given POST this data: + """ + { + "dyn_title": "dynaform", + "dyn_description": "version wrong", + "dyn_type": "xmlform", + "dyn_content": "ejemplo", + "dyn_version": 65 + } + """ + And I request "project/14414793652a5d718b65590036026581/dynaform" + Then the response status code should be 400 + And the response status message should have the following text "dyn_version" + + +Scenario: Normal Dynaform creation without dyn_version (negative tests) + Given POST this data: + """ + { + "dyn_title": "dynaform", + "dyn_description": "version wrong", + "dyn_type": "xmlform", + "dyn_content": "ejemplo", + "dyn_version": "" + } + """ + And I request "project/14414793652a5d718b65590036026581/dynaform" + Then the response status code should be 400 + And the response status message should have the following text "dyn_version" + + +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": { - "dyn_title": "", - "dyn_description": "", - "dyn_type": "" + "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 "" + } + """ + 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 | + Examples: - - 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_import.prj_uid | - | invalid copy_dyn_uid | 42445320652cd534acb3824056962285 | Dynaform - Copy 2 | dyn copy | xmlform | 14414793652a5d718b65590036026581 | 70070685500000000000000000000000 | 400 | copy_import.dyn_uid | + | 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_import.prj_uid | + | invalid copy_dyn_uid | 42445320652cd534acb3824056962285 | Dynaform - Copy 2 | dyn copy | xmlform | 14414793652a5d718b65590036026581 | 70070685500000000000000000000000 | 400 | copy_import.dyn_uid | - Scenario Outline: Create dynaform based on a PMTable for a project with bad parameters (negative tests) - Given POST this data: - """ +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": { - "dyn_title": "", - "dyn_description": "", - "dyn_type": "", - "pmtable": + "tab_uid": "", + "fields": [ { - "tab_uid": "", - "fields": [ - { - "fld_name": "", - "pro_variable": "" - }, - { - "fld_name": "", - "pro_variable": "" - }, - { - "fld_name": "" - } - ] + "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 "" + } + """ + And I request "project//dynaform" + Then the response status code should be + And the response status message should have the following text "" - Examples: + 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 | + | 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 |