diff --git a/features/backend/admin_setup/pm_tables/basic_sequence_pm_tables.feature b/features/backend/admin_setup/pm_tables/basic_sequence_pm_tables.feature new file mode 100644 index 000000000..af06bf294 --- /dev/null +++ b/features/backend/admin_setup/pm_tables/basic_sequence_pm_tables.feature @@ -0,0 +1,216 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Output Documents + Requirements: + a workspace with the pmtable 65193158852cc1a93a5a535084878044 ("DYNAFORM") already loaded + +Background: + Given that I have a valid access_token + + +Scenario: Get the PMTABLE List when there are exactly ONE pmtables in this workspace + Given I request "pmtable" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + And the response has 1 records + + +Scenario: Get a single the PMTABLE + Given I request "pmtable/65193158852cc1a93a5a535084878044" + 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" + + +Scenario: Get data of the PMTABLE + Given I request "pmtable/65193158852cc1a93a5a535084878044/data" + 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 that "dyn_uid" is set to "1" + And that "dyn_title" is set to "sample" + And that "dyn_description" is set to "test" + + +Scenario Outline: Create new pmtable + Given POST this data: + """ + { + "pmt_tab_name" : "", + "pmt_tab_dsc" : "", + "fields" : [ + { + "fld_key" : 1, + "fld_name" : "CAMPO1", + "fld_label" : "CAMPO1", + "fld_type" : "VARCHAR", + "fld_size" : 32 + },{ + "fld_name" : "CAMPO2", + "fld_label" : "CAMPO2", + "fld_type" : "VARCHAR", + "fld_size" : 200 + } + ] + } + """ + And I request "pmtable" + 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 "pmt_uid" in session array as variable "pmt_uid_" + + Examples: + + | test_description | pmt_uid_number | pmt_tab_name | pmt_tab_dsc | + | Create pmtable with fields defined | 1 | PMT_Test_QA | pmt table created with script | + + +Scenario Outline: Create a new Data of pm table. + Given POST this data: + """ + { + "CAMPO1" : "valor1", + "CAMPO2" : "valor2" + } + """ + And I request "pmtable/pmt_uid/data" with the key "pmt_uid" stored in session array as variable "pmt_uid_" + 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" + + Examples: + + | pmt_uid_number | + | 1 | + + +Scenario Outline: Update a pm table of a project + Given PUT this data: + """ + { + "rep_tab_dsc" : "descripcion de la tabla", + "fields" : [ + { + "fld_key" : 1, + "fld_name" : "UPDATECAMPO", + "fld_label" : "UPDATECAMPO", + "fld_type" : "VARCHAR", + "fld_size" : 200 + + } + ] + } + """ + And that I want to update a resource with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And I request "pmtable" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + + Examples: + + | pmt_uid_number | + | 1 | + + +Scenario Outline: Get a single the PMTABLE after update + Given that I want to get a resource with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And I request "pmtable" + 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 that "fld_name" is set to "UPDATECAMPO" + And that "fld_label" is set to "UPDATECAMPO" + And that "fld_type" is set to "VARCHAR" + +Examples: + + | pmt_uid_number | + | 1 | + + +Scenario Outline: Update a a data of pm table + Given PUT this data: + """ + { + "CAMPO1" : "valor1", + "CAMPO2" : "updatevalor2" + } + """ + And that I want to update a "PM Table" + And I request "pmtable/pmt_uid/data" with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + + Examples: + + | pmt_uid_number | + | 1 | + + +Scenario Outline: Get data of the PMTABLE + Given I request "pmtable/pmt_uid/data" with the key "pmt_uid" stored in session array as variable "pmt_uid_" + 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 that "CAMPO1" is set to "valor1" + And that "CAMPO2" is set to "updatevalor2" + + Examples: + + | pmt_uid_number | + | 1 | + +Scenario: Get the PMTABLE List when there are exactly ONE pmtables in this workspace + Given I request "pmtable" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + And the response has 2 records + + +Scenario Outline: Delete a pm table of a pmtable + Given that I want to delete a resource with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And I request "pmtable" + 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: + + | pmt_uid_number | + | 1 | + + +Scenario Outline: Delete a data of a pmtable + Given that I want to delete a resource with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And I request "pmtable//data/CAMPO1/updatevalor2" + 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: + + | pmt_uid_number | + | 1 | + + +Scenario: Get the PMTABLE List when there are exactly ONE pmtables in this workspace + Given I request "pmtable" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + And the response has 1 records \ No newline at end of file diff --git a/features/backend/admin_setup/pm_tables/main_tests_pm_tables.feature b/features/backend/admin_setup/pm_tables/main_tests_pm_tables.feature new file mode 100644 index 000000000..fc532b999 --- /dev/null +++ b/features/backend/admin_setup/pm_tables/main_tests_pm_tables.feature @@ -0,0 +1,253 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Output Documents Main Tests + Requirements: + a workspace with the pmtable 65193158852cc1a93a5a535084878044 ("DYNAFORM") already loaded + +Background: + Given that I have a valid access_token + + +Scenario: Get the PMTABLE List when there are exactly ONE pmtables in this workspace + Given I request "pmtable" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + And the response has 1 records + + +Scenario: Get a single the PMTABLE + Given I request "pmtable/65193158852cc1a93a5a535084878044" + 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 that "pmt_uid" is set to "65193158852cc1a93a5a535084878044" + And that "pmt_tab_name" is set to "PMT_DYNAFORM" + And that "pmt_tab_description" is set to "" + And that "pmt_tab_class_name" is set to "PmtDynaform" + And that "pmt_num_rows" is set to "1" + + +Scenario: Get data of the PMTABLE + Given I request "pmtable/65193158852cc1a93a5a535084878044/data" + 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 that "dyn_uid" is set to "1" + And that "dyn_title" is set to "sample" + And that "dyn_description" is set to "test" + + +Scenario Outline: Create news pmtable + Given POST this data: + """ + { + "pmt_tab_name" : "", + "pmt_tab_dsc" : "", + "fields" : [ + { + "fld_key" : 1, + "fld_name" : "", + "fld_label" : "", + "fld_type" : "", + "fld_size" : 32 + },{ + "fld_name" : "", + "fld_label" : "", + "fld_type" : "", + "fld_size" : 45 + },{ + "fld_name" : "", + "fld_label" : "", + "fld_type" : "", + "fld_size" : 32 + } + ] + } + """ + And I request "pmtable" + 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 "pmt_uid" in session array as variable "pmt_uid_" + + Examples: + + | test_description | pmt_uid_number | pmt_tab_name | pmt_tab_dsc | fld_name_1 | fld_label_1 | fld_type_1 | fld_name_2 | fld_label_2 | fld_type_2 | fld_name_3 | fld_label_3 | fld_type_3 | + | Create pmtable with type varchar, bigint and boolean | 1 | PMT_Test_QA1 | pmt table 1 created with script | UNO | UNO | VARCHAR | DOS | DOS | BIGINT | TRES | TRES | BOOLEAN | + | Create pmtable with type varchar, char and date | 2 | PMT_Test_QA2 | pmt table 2 created with script | UNO | UNO | VARCHAR | DOS | DOS | CHAR | TRES | TRES | DATE | + | Create pmtable with type varchar, datetime and decimal | 3 | PMT_Test_QA3 | pmt table 3 created with script | UNO | UNO | VARCHAR | DOS | DOS | DATETIME | TRES | TRES | DECIMAL | + | Create pmtable with type varchar, double and float | 4 | PMT_Test_QA4 | pmt table 4 created with script | UNO | UNO | VARCHAR | DOS | DOS | DOUBLE | TRES | TRES | FLOAT | + | Create pmtable with type varchar, integer and longvarchar | 5 | PMT_Test_QA5 | pmt table 5 created with script | UNO | UNO | VARCHAR | DOS | DOS | INTEGER | TRES | TRES | LONGVARCHAR | + | Create pmtable with type varchar, real and smallint | 6 | PMT_Test_QA6 | pmt table 6 created with script | UNO | UNO | VARCHAR | DOS | DOS | REAL | TRES | TRES | SMALLINT | + | Create pmtable with type varchar, time and tinyint | 7 | PMT_Test_QA7 | pmt table 7 created with script | UNO | UNO | VARCHAR | DOS | DOS | TIME | TRES | TRES | TINYINT | + + +Scenario Outline: Create a new Data of pm table. + Given POST this data: + """ + { + "CAMPO1" : "QA", + "CAMPO2" : "" + } + """ + And I request "pmtable/pmt_uid/data" with the key "pmt_uid" stored in session array as variable "pmt_uid_" + 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" + + Examples: + + | pmt_uid_number | CAMPO2 | + | 1 | DEV1 | + | 2 | DEV2 | + | 3 | DEV3 | + | 4 | DEV4 | + | 5 | DEV5 | + | 6 | DEV6 | + | 7 | DEV7 | + + +Scenario Outline: Update a pm table of a project + Given PUT this data: + """ + { + "rep_tab_dsc" : "descripcion de la tabla", + "fields" : [ + { + "fld_key" : 1, + "fld_name" : "", + "fld_label" : "", + "fld_type" : "", + "fld_size" : 200 + } + ] + } + """ + And that I want to update a resource with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And I request "pmtable" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + + Examples: + + | Description | pmt_uid_number | fld_name | fld_label | + | Update a pmtable 1 | 1 | UPDATEUNO | UPDATEUNO | + | Update a pmtable 3 | 3 | UPDATETRES | UPDATETRES | + | Update a pmtable 6 | 6 | UPDATESEIS | UPDATESEIS | + + +Scenario Outline: Get a single the PMTABLE after update + Given that I want to get a resource with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And I request "pmtable" + 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 that "fld_name" is set to "" + And that "fld_label" is set to "" + And that "fld_type" is set to "" + + Examples: + + | pmt_uid_number | fld_name | fld_label | + | 1 | UPDATEUNO | UPDATEUNO | + | 3 | UPDATETRES | UPDATETRES | + | 6 | UPDATESEIS | UPDATESEIS | + + + +Scenario Outline: Update a a data of pm table + Given PUT this data: + """ + { + "CAMPO1" : "QA", + "CAMPO2" : "" + } + """ + And that I want to update "PM Table" + And I request "pmtable/pmt_uid/data" with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + + Examples: + + | pmt_uid_number | CAMPO2 | + | 1 | UPDATEQA2 | + | 4 | UPDATEQA4 | + | 6 | UPDATEQA6 | + + +Scenario Outline: Get data of the PMTABLE + Given I request "pmtable/pmt_uid/data" with the key "pmt_uid" stored in session array as variable "pmt_uid_" + 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 that "CAMPO1" is set to "QA" + And that "CAMPO2" is set to "CAMPO2" + + Examples: + + | pmt_uid_number | CAMPO2 | + | 1 | UPDATEQA2 | + | 4 | UPDATEQA4 | + | 6 | UPDATEQA6 | + + +Scenario: Get the PMTABLE List when there are exactly two pmtables in this workspace + Given I request "pmtable" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + And the response has 2 records + + +Scenario Outline: Delete a pm table of a pmtable + Given that I want to delete a resource with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And I request "pmtable" + 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: + + | pmt_uid_number | + | 1 | + | 2 | + | 3 | + | 4 | + | 5 | + | 6 | + | 7 | + + +Scenario Outline: Delete a data of a pmtable + Given that I want to delete a resource with the key "pmt_uid" stored in session array as variable "pmt_uid_" + And I request "pmtable//data/CAMPO1/QA" + 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: + + | pmt_uid_number | + | 1 | + + +Scenario: Get the PMTABLE List when there are exactly ONE pmtables in this workspace + Given I request "pmtable" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + And the response has 1 records \ No newline at end of file diff --git a/features/backend/admin_setup/pm_tables/negative_tests_pm_tables.feature b/features/backend/admin_setup/pm_tables/negative_tests_pm_tables.feature new file mode 100644 index 000000000..51bf2cac9 --- /dev/null +++ b/features/backend/admin_setup/pm_tables/negative_tests_pm_tables.feature @@ -0,0 +1,65 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Output Documents Negative Tests + + +Background: + Given that I have a valid access_token + +Scenario: Create news pmtable with name same + Given POST this data: + """ + { + "pmt_tab_name" : "DYNAFORM", + "pmt_tab_dsc" : "", + "fields" : [ + { + "fld_key" : 1, + "fld_name" : "DYN_UID", + "fld_label" : "Unique Id", + "fld_type" : "VARCHAR", + "fld_size" : 32 + },{ + "fld_name" : "DYN_TITLE", + "fld_label" : "Title", + "fld_type" : "VARCHAR", + "fld_size" : 150 + } + ] + } + """ + And I request "pmtable" + Then the response status code should be 400 + And the response status message should have the following text "already exits" + + +Scenario Outline: Create news pmtable (Negative Test) + Given POST this data: + """ + { + "pmt_tab_name" : "", + "pmt_tab_dsc" : "", + "fields" : [ + { + "fld_key" : 1, + "fld_name" : "", + "fld_label" : "", + "fld_type" : "", + "fld_size" : "" + }, + ] + } + """ + And I request "pmtable" + Then the response status code should be + And the response status message should have the following text "" + + Examples: + + | test_description | pmt_tab_name | pmt_tab_dsc | fld_name | fld_label | fld_type | fld_size | fld_name | fld_label | fld_type | fld_size | fld_name | fld_label | fld_type | fld_size | error_code | error_message | + | Required pmt_tab_name | | pmt table 1 | UNO | UNO | VARCHAR | 32 | DOS | DOS | BIGINT | | TRES | TRES | BOOLEAN | | 400 | pmt_tab_name | + | Required pmt_tab_dsc | PMT_Test_QA2 | | UNO | UNO | VARCHAR | 32 | DOS | DOS | CHAR | | TRES | TRES | DATE | | 400 | pmt_tab_dsc | + | Required fld_name | PMT_Test_QA3 | pmt table 3 | | UNO | VARCHAR | 32 | DOS | DOS | DATETIME | | TRES | TRES | DECIMAL | | 400 | fld_name | + | Required fld_label | PMT_Test_QA4 | pmt table 4 | UNO | | VARCHAR | 32 | DOS | DOS | DOUBLE | | TRES | TRES | FLOAT | | 400 | fld_label | + | Required fld_type | PMT_Test_QA5 | pmt table 5 | UNO | UNO | VARCHAR | 32 | DOS | DOS | | | TRES | TRES | LONGVARCHAR | | 400 | fld_type | + | Invalid fld_size | PMT_Test_QA6 | pmt table 6 | UNO | UNO | VARCHAR | sample | DOS | DOS | REAL | samke | TRES | TRES | SMALLINT | task | 400 | fld_size | + | Invalid fld_type | PMT_Test_QA7 | pmt table 7 | UNO | UNO | 123 | 32 | DOS | DOS | 1234 | | TRES | TRES | 457,777 | | 400 | fld_type | \ No newline at end of file diff --git a/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature b/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature index 75d199c47..c3afd96bd 100644 --- a/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature +++ b/features/backend/application_cases/output_document_case/negative_tests_output_document_case.feature @@ -13,8 +13,7 @@ Scenario Outline: Pull information of an inexistent output document. should retu And the response charset is "UTF-8" And the type is "array" - Examples: - | test_description | output-document | app_doc_uid | app_doc_filename | doc_uid | app_doc_version | app_doc_create_date | app_doc_create_user | app_doc_type | app_doc_index | app_doc_link | - | Get Input "Desert.jpg" | 6075490825331a1c5eebff9015468244 | 6075490825331a1c5eebff9015468244 | Desert.jpg | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:33:25 | , Administrator (admin) | OUTPUT | 1 | cases/cases_ShowDocument?a=6075490825331a1c5eebff9015468244&v=1 | \ No newline at end of file + | test_description | output-document | app_doc_uid | app_doc_filename | doc_uid | app_doc_version | app_doc_create_date | app_doc_create_user | app_doc_type | app_doc_index | app_doc_link | + | Get Input "Desert.jpg" | 6075490825331a1c5eebff9015468244 | 6075490825331a1c5eebff9015468244 | Desert.jpg | 68671480353319e5e1dee74089764900 | 1 | 2014-03-25 11:33:25 | , Administrator (admin) | OUTPUT | 1 | cases/cases_ShowDocument?a=6075490825331a1c5eebff9015468244&v=1 | \ No newline at end of file diff --git a/features/backend/projects/activity/main_tests_activity.feature b/features/backend/projects/activity/main_tests_activity.feature index 96309f7b1..d6623b113 100644 --- a/features/backend/projects/activity/main_tests_activity.feature +++ b/features/backend/projects/activity/main_tests_activity.feature @@ -1,192 +1,252 @@ @ProcessMakerMichelangelo @RestAPI Feature: Activity Resources Main Tests Requirements: - a workspace with the process 251815090529619a99a2bf4013294414 already loaded - the process name is "Test (Triggers, Activity)" + a workspace with the process 59534741653502b6d1820d6012095837 already loaded + the process name is "Test Activity" there are three Activity Resources in the process - Background: - Given that I have a valid access_token +Background: + Given that I have a valid access_token - Scenario Outline: Get the Properties and Definition of 3 Activities - 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 the property "tas_title" of "properties" is set to "" +Scenario Outline: Get the Properties and Definition of 3 Activities + Given I request "project/59534741653502b6d1820d6012095837/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 the property "tas_title" of "properties" is set to "" + Examples: - Examples: - - | activity | tas_title | - | 97192372152a5c78f04a794095806311 | Task1 | - | 95655319552a5c790b69a04054667879 | Task2 | - | 63843886052a5cc066e4c04056414372 | Task3 | + | activity | tas_title | + | 28629650453502b70b7f3a8051740006 | Task 1 | + | 52976670353502b71e2b0a8036043148 | Task 2 | + | 24689389453502b73597aa5052425148 | Task 3 | - Scenario Outline: Get the Properties of a Activity are exactly three activity - 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" - And the response has not a "definition" property +Scenario Outline: Get the Properties of a Activity are exactly three activity + Given I request "project/59534741653502b6d1820d6012095837/activity/?filter=properties" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And the response has not a "definition" property - Examples: + Examples: - | activity | tas_title | - | 97192372152a5c78f04a794095806311 | Task1 | - | 95655319552a5c790b69a04054667879 | Task2 | - | 63843886052a5cc066e4c04056414372 | Task3 | + | activity | tas_title | + | 28629650453502b70b7f3a8051740006 | Task 1 | + | 52976670353502b71e2b0a8036043148 | Task 2 | + | 24689389453502b73597aa5052425148 | Task 3 | - Scenario Outline: Get the Definition of a Activity are exactly three activity - 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" - And the response has not a "properties" property +Scenario Outline: Get the Definition of a Activity are exactly three activity + Given I request "project/59534741653502b6d1820d6012095837/activity/?filter=definition" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And the response has not a "properties" property - Examples: + Examples: - | activity | tas_title | - | 97192372152a5c78f04a794095806311 | Task1 | - | 95655319552a5c790b69a04054667879 | Task2 | - | 63843886052a5cc066e4c04056414372 | Task3 | + | activity | tas_title | + | 28629650453502b70b7f3a8051740006 | Task 1 | + | 52976670353502b71e2b0a8036043148 | Task 2 | + | 24689389453502b73597aa5052425148 | Task 3 | - - 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_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" +Scenario Outline: Get a activity (Verification of initial values) + Given I request "project/59534741653502b6d1820d6012095837/activity/" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And the property "tas_type" of "properties" is set to "" + And the property "tas_duration" of "properties" is set to "" + And the property "tas_type_day" of "properties" is set to "" + And the property "tas_timeunit" of "properties" is set to "" + And the property "tas_priority_variable" 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_transfer_fly" of "properties" is set to "" + And the property "tas_send_last_email" of "properties" is set to "" + And the property "tas_derivation_screen_tpl" 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_selfservice_trigger_uid" of "properties" 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_def_title" of "properties" is set to "" + And the property "tas_def_description" of "properties" is set to "" + And the property "tas_def_message" of "properties" is set to "" + And the property "tas_def_subject_message" of "properties" is set to "" + And the property "tas_calendar" of "properties" is set to "" + And the property "tas_def_message_type" of "properties" is set to "" + And the property "tas_def_message_template" of "properties" is set to "" + Examples: - - Examples: - - | test_description | activity | 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_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 | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 4 | HOURS | | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | template.html | - | Update Task2 | 95655319552a5c790b69a04054667879 | update activity task2 | update description | @@PROCESS | template.html | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 4 | HOURS | | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | template.html | - | Update Task3 | 63843886052a5cc066e4c04056414372 | update activity task3 | update description | @@PROCESS | template.html | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 6 | HOURS | | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | 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/251815090529619a99a2bf4013294414/activity/" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the type is "object" - 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_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_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: - - | activity | 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_def_subject_message | tas_def_message_type | tas_def_message | tas_def_message_template | - | 97192372152a5c78f04a794095806311 | update activity task1 | update description | @@PROCESS | template.html | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 4 | HOURS | | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | template.html | - | 95655319552a5c790b69a04054667879 | update activity task2 | update description | @@PROCESS | template.html | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 4 | HOURS | | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | template.html | - | 63843886052a5cc066e4c04056414372 | update activity task3 | update description | @@PROCESS | template.html | BALANCED | @@USER_LOGGED | @@GROUP_UID | 0 | 6 | HOURS | | TRUE | 4 | HOURS | 1 | | NORMAL | Case Title | Case Description UPDATE | UPDATE Titulo de Notificacion 1 | text | Esta es una Notificacion - UPDATE | template.html | + | activity | tas_type | tas_duration | tas_type_day | tas_timeunit | tas_priority_variable | tas_assign_type | tas_assign_variable | tas_transfer_fly | tas_send_last_email | tas_derivation_screen_tpl | tas_selfservice_timeout | tas_selfservice_time | tas_selfservice_time_unit | tas_selfservice_trigger_uid | tas_title | tas_description | tas_def_title | tas_def_description | tas_def_message | tas_def_subject_message | tas_calendar | tas_def_message_type | tas_def_message_template | + | 28629650453502b70b7f3a8051740006 | NORMAL | 1 | | DAYS | | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | FALSE | | 0 | | | | Task 1 | | | | | | | text | alert_message.html | + | 52976670353502b71e2b0a8036043148 | NORMAL | 1 | | DAYS | | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | FALSE | | 0 | | | | Task 2 | | | | | | | text | alert_message.html | + | 24689389453502b73597aa5052425148 | NORMAL | 1 | | DAYS | | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | FALSE | | 0 | | | | Task 3 | | | | | | | text | alert_message.html | Scenario Outline: Update the Definition of a Activity and the check if the values had changed - Given PUT this data: - """ + Given PUT this data: + """ + { + "definition": {}, + "properties": + { + "tas_type": "", + "tas_duration": "", + "tas_timeunit": "", + "tas_priority_variable": "", + "tas_assign_type": "", + "tas_assign_variable": "", + "tas_transfer_fly": "", + "tas_derivation_screen_tpl": "", + "tas_selfservice_time_unit": "", + "tas_selfservice_timeout": "", + "tas_selfservice_trigger_uid": "", + "tas_title": "", + "tas_description": "", + "tas_def_title": "", + "tas_def_description": "", + "tas_def_message": "", + "tas_def_subject_message": "", + "tas_calendar": "", + "tas_def_message_type": "", + "tas_def_message_template": "" + } + } + """ + And I request "project/59534741653502b6d1820d6012095837/activity/" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + + Examples: + + | test_description | activity | tas_type | tas_duration | tas_timeunit | tas_priority_variable | tas_assign_type | tas_assign_variable | tas_transfer_fly | tas_derivation_screen_tpl | tas_selfservice_time_unit | tas_selfservice_timeout | tas_selfservice_trigger_uid | tas_title | tas_description | tas_def_title | tas_def_description | tas_def_message | tas_def_subject_message | tas_calendar | tas_def_message_type | tas_def_message_template | + | Update Task1 | 28629650453502b70b7f3a8051740006 | ADHOC | 2 | DAYS | @@PROCESS | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | test activity.html | HOURS | 1 | | Task 1 Update Activity | Update Description | Case Title | Case Description UPDATE | Esta es una Notificacion - UPDATE | UPDATE Titulo de Notificacion 1 | 14606161052f50839307899033145440 | text | test activity.html | + | Update Task2 | 52976670353502b71e2b0a8036043148 | NORMAL | 3 | HOURS | @@PROCESS | BALANCED | @@USER_LOGGED | TRUE | test activity.html | HOURS | 1 | | Task 2 Update Activity | Update Description | Case Title | Case Description UPDATE | Esta es una Notificacion - UPDATE | UPDATE Titulo de Notificacion 1 | 14606161052f50839307899033145440 | text | test activity.html | + | Update Task3 | 24689389453502b73597aa5052425148 | NORMAL | 2 | HOURS | @@PROCESS | BALANCED | @@USER_LOGGED | FALSE | test activity.html | HOURS | 1 | | Task 3 Update Activity | Update Description | Case Title | Case Description UPDATE | Esta es una Notificacion - UPDATE | UPDATE Titulo de Notificacion 1 | 14606161052f50839307899033145440 | text | test activity.html | + + +Scenario Outline: Get a activity (Review of variables after the update) + Given I request "project/59534741653502b6d1820d6012095837/activity/" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And the property "tas_type" 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_priority_variable" 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_transfer_fly" of "properties" is set to "" + And the property "tas_derivation_screen_tpl" of "properties" is set to "" + And the property "tas_selfservice_time_unit" of "properties" is set to "" + And the property "tas_selfservice_timeout" of "properties" is set to "" + And the property "tas_selfservice_trigger_uid" of "properties" 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_def_title" of "properties" is set to "" + And the property "tas_def_description" of "properties" is set to "" + And the property "tas_def_message" of "properties" is set to "" + And the property "tas_def_subject_message" of "properties" is set to "" + And the property "tas_calendar" of "properties" is set to "" + And the property "tas_def_message_type" of "properties" is set to "" + And the property "tas_def_message_template" of "properties" is set to "" + + Examples: + + | activity | tas_type | tas_duration | tas_timeunit | tas_priority_variable | tas_assign_type | tas_assign_variable | tas_transfer_fly | tas_derivation_screen_tpl | tas_selfservice_time_unit | tas_selfservice_timeout | tas_selfservice_trigger_uid | tas_title | tas_description | tas_def_title | tas_def_description | tas_def_message | tas_def_subject_message | tas_calendar | tas_def_message_type | tas_def_message_template | + | 28629650453502b70b7f3a8051740006 | ADHOC | 2 | DAYS | @@PROCESS | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | test activity.html | HOURS | 1 | | Task 1 Update Activity | Update Description | Case Title | Case Description UPDATE | Esta es una Notificacion - UPDATE | UPDATE Titulo de Notificacion 1 | 14606161052f50839307899033145440 | text | test activity.html | + | 52976670353502b71e2b0a8036043148 | NORMAL | 3 | HOURS | @@PROCESS | BALANCED | @@USER_LOGGED | TRUE | test activity.html | HOURS | 1 | | Task 2 Update Activity | Update Description | Case Title | Case Description UPDATE | Esta es una Notificacion - UPDATE | UPDATE Titulo de Notificacion 1 | 14606161052f50839307899033145440 | text | test activity.html | + | 24689389453502b73597aa5052425148 | NORMAL | 2 | HOURS | @@PROCESS | BALANCED | @@USER_LOGGED | FALSE | test activity.html | HOURS | 1 | | Task 3 Update Activity | Update Description | Case Title | Case Description UPDATE | Esta es una Notificacion - UPDATE | UPDATE Titulo de Notificacion 1 | 14606161052f50839307899033145440 | text | test activity.html | + + +Scenario Outline: Update the Definition of a Activity to return to baseline + Given PUT this data: + """ { "definition": {}, "properties": - { + { + "tas_type": "", + "tas_duration": "", + "tas_timeunit": "", + "tas_priority_variable": "", + "tas_assign_type": "", + "tas_assign_variable": "", + "tas_transfer_fly": "", + "tas_derivation_screen_tpl": "", + "tas_selfservice_time_unit": "", + "tas_selfservice_timeout": "", + "tas_selfservice_trigger_uid": "", "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_def_subject_message": "", - "tas_def_message_type": "", "tas_def_message": "", + "tas_def_subject_message": "", + "tas_calendar": "", + "tas_def_message_type": "", "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" + And I request "project/59534741653502b6d1820d6012095837/activity/" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + Examples: + + | activity | tas_type | tas_duration | tas_timeunit | tas_priority_variable | tas_assign_type | tas_assign_variable | tas_transfer_fly | tas_derivation_screen_tpl | tas_selfservice_timeout | tas_selfservice_time | tas_selfservice_time_unit | tas_selfservice_trigger_uid | tas_title | tas_description | tas_def_title | tas_def_description | tas_def_message | tas_def_subject_message | tas_calendar | tas_def_message_type | tas_def_message_template | + | 28629650453502b70b7f3a8051740006 | NORMAL | 1 | DAYS | | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | | 0 | | | | Task 1 | | | | | | | text | alert_message.html | + | 52976670353502b71e2b0a8036043148 | NORMAL | 1 | DAYS | | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | | 0 | | | | Task 2 | | | | | | | text | alert_message.html | + | 24689389453502b73597aa5052425148 | NORMAL | 1 | DAYS | | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | | 0 | | | | Task 3 | | | | | | | text | alert_message.html | - Examples: +Scenario Outline: Get a activity (Verification of initial values) + Given I request "project/59534741653502b6d1820d6012095837/activity/" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And the property "tas_type" of "properties" is set to "" + And the property "tas_duration" of "properties" is set to "" + And the property "tas_type_day" of "properties" is set to "" + And the property "tas_timeunit" of "properties" is set to "" + And the property "tas_priority_variable" 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_transfer_fly" of "properties" is set to "" + And the property "tas_send_last_email" of "properties" is set to "" + And the property "tas_derivation_screen_tpl" 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_selfservice_trigger_uid" of "properties" 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_def_title" of "properties" is set to "" + And the property "tas_def_description" of "properties" is set to "" + And the property "tas_def_message" of "properties" is set to "" + And the property "tas_def_subject_message" of "properties" is set to "" + And the property "tas_calendar" of "properties" is set to "" + And the property "tas_def_message_type" of "properties" is set to "" + And the property "tas_def_message_template" of "properties" is set to "" + + Examples: - | activity | 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_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 | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | - | 95655319552a5c790b69a04054667879 | Task2 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | - | 63843886052a5cc066e4c04056414372 | Task3 | Case Description | @@SYS_NEXT_USER_TO_BE_ASSIGNED | template.html | BALANCED | @@USER_LOGGED | @@GROUP_UID | 1 | 2 | DAYS | | FALSE | 2 | DAYS | 2 | | ADHOC | Case Title | Case Description | Titulo de Notificacion 1| template | Esta es una Notificacion | template.html | \ No newline at end of file + | activity | tas_type | tas_duration | tas_type_day | tas_timeunit | tas_priority_variable | tas_assign_type | tas_assign_variable | tas_transfer_fly | tas_send_last_email | tas_derivation_screen_tpl | tas_selfservice_timeout | tas_selfservice_time | tas_selfservice_time_unit | tas_selfservice_trigger_uid | tas_title | tas_description | tas_def_title | tas_def_description | tas_def_message | tas_def_subject_message | tas_calendar | tas_def_message_type | tas_def_message_template | + | 28629650453502b70b7f3a8051740006 | NORMAL | 1 | | DAYS | | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | FALSE | | 0 | | | | Task 1 | | | | | | | text | alert_message.html | + | 52976670353502b71e2b0a8036043148 | NORMAL | 1 | | DAYS | | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | FALSE | | 0 | | | | Task 2 | | | | | | | text | alert_message.html | + | 24689389453502b73597aa5052425148 | NORMAL | 1 | | DAYS | | BALANCED | @@SYS_NEXT_USER_TO_BE_ASSIGNED | FALSE | FALSE | | 0 | | | | Task 3 | | | | | | | text | alert_message.html | \ No newline at end of file diff --git a/features/backend/projects/output_documents/main_tests_output.feature b/features/backend/projects/output_documents/main_tests_output.feature index 6c33ab9c7..2df885112 100644 --- a/features/backend/projects/output_documents/main_tests_output.feature +++ b/features/backend/projects/output_documents/main_tests_output.feature @@ -39,7 +39,6 @@ Feature: Output Documents Main Tests "out_doc_title": "", "out_doc_description": "", "out_doc_filename": "", - "out_doc_template": "", "out_doc_report_generator": "", "out_doc_landscape": "", "out_doc_media": "", @@ -49,8 +48,6 @@ Feature: Output Documents Main Tests "out_doc_bottom_margin": "", "out_doc_generate": "", "out_doc_type": "", - "out_doc_current_revision": "", - "out_doc_field_mapping": "", "out_doc_versioning": "", "out_doc_destination_path": "", "out_doc_tags": "", @@ -69,24 +66,22 @@ Feature: Output Documents Main Tests Examples: - | test_description | project | out_doc_number | out_doc_title | out_doc_description |out_doc_filename | out_doc_template | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_current_revision | out_doc_field_mapping | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions | - | Create with old version and both | 4224292655297723eb98691001100052 | 1 | Endpoint Old Version | Output Document old version - EndPoint | Output 1 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | - | Craate with old version and pdf security | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY | Output Document old version PDF SECURITY | Output 2 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | - | Create with old version only doc | 4224292655297723eb98691001100052 | 3 | Endpoint Old Version Doc | Output Document old version solo doc | Output 3 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | | - | Create with old version only pdf | 4224292655297723eb98691001100052 | 4 | Endpoint Old Version PDF | Output Document old version solo pdf | Output 4 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print | - | Create with new version and both | 4224292655297723eb98691001100052 | 5 | Endpoint New Version | Output Document new version - EndPoint | Output 5 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | - | Create with new version and pdf security | 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY | Output Document new version PDF SECURITY | Output 6 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | - | Create with new version only doc | 4224292655297723eb98691001100052 | 7 | Endpoint New Version Doc | Output Document new version solo doc | Output 7 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | | - | Create with new version only pdf | 4224292655297723eb98691001100052 | 8 | Endpoint New Version PDF | Output Document new version solo pdf | Output 8 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print | - | Create with special characters in out doc title | 4224292655297723eb98691001100052 | 9 | test !@#$%^&*€¤¾½²³€¼½¼ | Output Document old version - EndPoint | Output 9 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | - | Create with special characters in out doc description | 4224292655297723eb98691001100052 | 10 | Endpoint Old1 | test %^&*€¤¾½²³€ | Output 10 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | - | Create with special characters in out doc filename | 4224292655297723eb98691001100052 | 11 | Endpoint Old Version Doc 2 | Output Document old version solo doc | Output @#$%^&*€¤ | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | | - | Create with special characters in out doc template | 4224292655297723eb98691001100052 | 12 | Endpoint Old Version PDF 3 | Output Document old version solo pdf | Output 11 | sample @#$%^&*€¤ | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print | - | Create with special characters in out doc field mapping | 4224292655297723eb98691001100052 | 13 | Endpoint New Version Doc 14 | Output Document new version solo doc | Output 12 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | 324#$%%^^@@ | 1 | | | 0 | | | | - | Create with special characters in out doc destination path | 4224292655297723eb98691001100052 | 14 | Endpoint New Version 16 | Output Document new version - EndPoint | Output 13 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | 23rg@#$% | | 0 | | | | - | Create with special characters in out doc tags | 4224292655297723eb98691001100052 | 15 | Endpoint New Version PDF SECURI17 | Output Document new version PDF SECURITY | Output 14 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | vfv23@$@% | 1 | sample | sample | print\|modify\|copy\|forms | - | Create with special characters in out doc pdf security open password | 4224292655297723eb98691001100052 | 16 | Endpoint New Version PDF 19 | Output Document new version solo pdf | Output 15 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample432@$#@$¼€¼½ | sample | print | - | Create with special characters in out doc pdf security owner password | 4224292655297723eb98691001100052 | 17 | Endpoint New Version 20 | Output Document new version - EndPoint | Output 16 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | sample432@$#@$¼€¼½ | | + | test_description | project | out_doc_number | out_doc_title | out_doc_description |out_doc_filename | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions | + | Create with old version and both | 4224292655297723eb98691001100052 | 1 | Endpoint Old Version | Output Document old version - EndPoint | Output 1 | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | + | Craate with old version and pdf security | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY | Output Document old version PDF SECURITY | Output 2 | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | + | Create with old version only doc | 4224292655297723eb98691001100052 | 3 | Endpoint Old Version Doc | Output Document old version solo doc | Output 3 | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 1 | | | 0 | | | | + | Create with old version only pdf | 4224292655297723eb98691001100052 | 4 | Endpoint Old Version PDF | Output Document old version solo pdf | Output 4 | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 1 | | | 1 | sample | sample | print | + | Create with new version and both | 4224292655297723eb98691001100052 | 5 | Endpoint New Version | Output Document new version - EndPoint | Output 5 | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | + | Create with new version and pdf security | 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY | Output Document new version PDF SECURITY | Output 6 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | + | Create with new version only doc | 4224292655297723eb98691001100052 | 7 | Endpoint New Version Doc | Output Document new version solo doc | Output 7 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 1 | | | 0 | | | | + | Create with new version only pdf | 4224292655297723eb98691001100052 | 8 | Endpoint New Version PDF | Output Document new version solo pdf | Output 8 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 1 | | | 1 | sample | sample | print | + | Create with special characters in out doc title | 4224292655297723eb98691001100052 | 9 | test !@#$%^&*€¤¾½²³€¼½¼ | Output Document old version - EndPoint | Output 9 | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | + | Create with special characters in out doc description | 4224292655297723eb98691001100052 | 10 | Endpoint Old1 | test %^&*€¤¾½²³€ | Output 10 | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | + | Create with special characters in out doc filename | 4224292655297723eb98691001100052 | 11 | Endpoint Old Version Doc 2 | Output Document old version solo doc | Output @#$%^&*€¤ | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 1 | | | 0 | | | | + | Create with special characters in out doc destination path | 4224292655297723eb98691001100052 | 12 | Endpoint New Version 16 | Output Document new version - EndPoint | Output 13 | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | 23rg@#$% | | 0 | | | | + | Create with special characters in out doc tags | 4224292655297723eb98691001100052 | 13 | Endpoint New Version PDF SECURI17 | Output Document new version PDF SECURITY | Output 14 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | vfv23@$@% | 1 | sample | sample | print\|modify\|copy\|forms | + | Create with special characters in out doc pdf security open password | 4224292655297723eb98691001100052 | 14 | Endpoint New Version PDF 19 | Output Document new version solo pdf | Output 15 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 1 | | | 1 | sample432@$#@$¼€¼½ | sample | print | + | Create with special characters in out doc pdf security owner password | 4224292655297723eb98691001100052 | 15 | Endpoint New Version 20 | Output Document new version - EndPoint | Output 16 | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | sample432@$#@$¼€¼½ | | Scenario: Create Output Documents with same name @@ -96,7 +91,6 @@ Feature: Output Documents Main Tests "out_doc_title": "Endpoint Old Version", "out_doc_description": "Output Document old version - EndPoint", "out_doc_filename": "Output 1", - "out_doc_template": "", "out_doc_report_generator": "HTML2PDF", "out_doc_landscape": "1", "out_doc_media": "Letter", @@ -106,8 +100,6 @@ Feature: Output Documents Main Tests "out_doc_bottom_margin": "30", "out_doc_generate": "BOTH", "out_doc_type": "HTML", - "out_doc_current_revision": "0", - "out_doc_field_mapping": "", "out_doc_versioning": "0", "out_doc_destination_path": "", "out_doc_tags": "", @@ -138,7 +130,6 @@ Feature: Output Documents Main Tests "out_doc_title": "", "out_doc_description": "", "out_doc_filename": "", - "out_doc_template": "", "out_doc_report_generator": "", "out_doc_landscape": "", "out_doc_media": "", @@ -148,8 +139,6 @@ Feature: Output Documents Main Tests "out_doc_bottom_margin": "", "out_doc_generate": "", "out_doc_type": "", - "out_doc_current_revision": "", - "out_doc_field_mapping": "", "out_doc_versioning": "", "out_doc_destination_path": "", "out_doc_tags": "", @@ -167,11 +156,11 @@ Feature: Output Documents Main Tests Examples: - | test_description | project | out_doc_number | out_doc_title | out_doc_description |out_doc_filename | out_doc_template | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_current_revision | out_doc_field_mapping | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions | - | Update out doc title and description | 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 | | HTML2PDF | 0 | Letter | 20 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | - | Update out doc title and out doc generate | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 | | TCPDF | 1 | Legal | 20 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy | - | Update out doc title and description | 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 | | TCPDF | 0 | Letter | 30 | 20 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | - | Update out doc title and out doc generate | 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 | | HTML2PDF | 1 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy | + | test_description | project | out_doc_number | out_doc_title | out_doc_description |out_doc_filename | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions | + | Update out doc title and description | 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 | HTML2PDF | 0 | Letter | 20 | 30 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | + | Update out doc title and out doc generate | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 | TCPDF | 1 | Legal | 20 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modify\|copy | + | Update out doc title and description | 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 | TCPDF | 0 | Letter | 30 | 20 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | + | Update out doc title and out doc generate | 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 | HTML2PDF | 1 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modify\|copy | Scenario Outline: Get a single Output Document and check some properties @@ -220,8 +209,6 @@ Feature: Output Documents Main Tests | 4224292655297723eb98691001100052 | 13 | | 4224292655297723eb98691001100052 | 14 | | 4224292655297723eb98691001100052 | 15 | - | 4224292655297723eb98691001100052 | 16 | - | 4224292655297723eb98691001100052 | 17 | Scenario: Get the Output Documents List when should be exactly two output documents @@ -234,3 +221,4 @@ Feature: Output Documents Main Tests And the "out_doc_title" property in row 0 equals "Endpoint Old Version (base)" And the "out_doc_title" property in row 1 equals "Endpoint New Version (base)" + \ No newline at end of file diff --git a/features/backend/projects/output_documents/negative_tests_output.feature b/features/backend/projects/output_documents/negative_tests_output.feature index 556ee2877..a748869fb 100644 --- a/features/backend/projects/output_documents/negative_tests_output.feature +++ b/features/backend/projects/output_documents/negative_tests_output.feature @@ -12,7 +12,6 @@ Feature: Output Documents Negative Tests "out_doc_title": "", "out_doc_description": "", "out_doc_filename": "", - "out_doc_template": "", "out_doc_report_generator": "", "out_doc_landscape": "", "out_doc_media": "", @@ -22,8 +21,6 @@ Feature: Output Documents Negative Tests "out_doc_bottom_margin": "", "out_doc_generate": "", "out_doc_type": "", - "out_doc_current_revision": "", - "out_doc_field_mapping": "", "out_doc_versioning": "", "out_doc_destination_path": "", "out_doc_tags": "", @@ -40,20 +37,19 @@ Feature: Output Documents Negative Tests Examples: - | test_description | project | out_doc_title | out_doc_description |out_doc_filename | out_doc_template | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_current_revision | out_doc_field_mapping | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions | error_code | error_message | - | Invalid PDF Generator | 4224292655297723eb98691001100052 | Endpoint New Version 4 | Output Document new version - EndPoint | Output 5 | | @#$%¼¤¾½ | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | 400 | out_doc_report_generator | - | Invalid landscape | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT5 | Output Document new version PDF SECURITY | Output 6 | | TCPDF | 34 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | 400 | out_doc_landscape | - | Invalid media type | 4224292655297723eb98691001100052 | Endpoint New Version Doc6 | Output Document new version solo doc | Output 7 | | TCPDF | 0 | Legal!@#$$$%^&| 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | | 400 | out_doc_media | - | Invalid document type | 4224292655297723eb98691001100052 | Endpoint New Version PDF7 | Output Document new version solo pdf | Output 8 | | TCPDF | 0 | Legal | 25,56.98 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print | 400 | out_doc_left_margin | - | Invalid left margin | 4224292655297723eb98691001100052 | Endpoint New Version8 | Output Document new version - EndPoint | Output 9 | | TCPDF | 1 | Letter | 30 | 30,7.98 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | 400 | out_doc_right_margin | - | Invalid right margin | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT9 | Output Document new version PDF SECURITY | Output 10 | | TCPDF | 0 | Legal | 25 | 25 | 25,54.98 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | 400 | out_doc_top_margin | - | Invalid top margin | 4224292655297723eb98691001100052 | Endpoint New Version Doc10 | Output Document new version solo doc | Output 11 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25,34.09 | WORD | HTML | 0 | | 1 | | | 0 | | | | 400 | out_doc_bottom_margin | - | Invalid bottom margin | 4224292655297723eb98691001100052 | Endpoint New Version PDF 11 | Output Document new version solo pdf | Output 12 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDtest@#$$ | HTML | 0 | | 1 | | | 1 | sample | sample | print | 400 | out_doc_generate | - | Invalid current revision | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI13 | Output Document new version PDF SECURITY | Output 14 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 45,988.566 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | 400 | out_doc_current_revision | - | Invalid doc versioning | 4224292655297723eb98691001100052 | Endpoint New Version PDF 15 | Output Document new version solo pdf | Output 16 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1,99.98 | | | 1 | sample | sample | print | 400 | out_doc_versioning | - | Invalid doc pdf security enabled | 4224292655297723eb98691001100052 | Endpoint New Version Doc 18 | Output Document new version solo doc | Output 18 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 23454 | | | | 400 | out_doc_generate | - | Invalid doc pdf security permissions | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI22 | Output Document new version PDF SECURITY | Output 21 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modfy\|cop\|for\|aaa | 400 | out_doc_pdf_security_permissions | - | Field requered out doc title | 4224292655297723eb98691001100052 | | Output Document old version - EndPoint | Output 22 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | | 400 | out_doc_title | - | Field required out doc filename | 4224292655297723eb98691001100052 | Endpoint Old Version Doc | Output Document old version solo doc | | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | | 400 | out_doc_generate | - | Output created with same name | 4224292655297723eb98691001100052 | Endpoint Old Version (base) | Output Document old version solo doc | Output 23 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 0 | | | | 400 | Output Document with the same name in this process | + | test_description | project | out_doc_title | out_doc_description |out_doc_filename | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions | error_code | error_message | + | Invalid PDF Generator | 4224292655297723eb98691001100052 | Endpoint New Version 4 | Output Document new version - EndPoint | Output 5 | @#$%¼¤¾½ | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | 400 | out_doc_report_generator | + | Invalid landscape | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT5 | Output Document new version PDF SECURITY | Output 6 | TCPDF | 34 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | 400 | out_doc_landscape | + | Invalid media type | 4224292655297723eb98691001100052 | Endpoint New Version Doc6 | Output Document new version solo doc | Output 7 | TCPDF | 0 | Legal!@#$$$%^&| 25 | 25 | 25 | 25 | WORD | HTML | 1 | | | 0 | | | | 400 | out_doc_media | + | Invalid document type | 4224292655297723eb98691001100052 | Endpoint New Version PDF7 | Output Document new version solo pdf | Output 8 | TCPDF | 0 | Legal | 25,56.98 | 25 | 25 | 25 | PDF | HTML | 1 | | | 1 | sample | sample | print | 400 | out_doc_left_margin | + | Invalid left margin | 4224292655297723eb98691001100052 | Endpoint New Version8 | Output Document new version - EndPoint | Output 9 | TCPDF | 1 | Letter | 30 | 30,7.98 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | 400 | out_doc_right_margin | + | Invalid right margin | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT9 | Output Document new version PDF SECURITY | Output 10 | TCPDF | 0 | Legal | 25 | 25 | 25,54.98 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms | 400 | out_doc_top_margin | + | Invalid top margin | 4224292655297723eb98691001100052 | Endpoint New Version Doc10 | Output Document new version solo doc | Output 11 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25,34.09 | WORD | HTML | 1 | | | 0 | | | | 400 | out_doc_bottom_margin | + | Invalid bottom margin | 4224292655297723eb98691001100052 | Endpoint New Version PDF 11 | Output Document new version solo pdf | Output 12 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDtest@#$$ | HTML | 1 | | | 1 | sample | sample | print | 400 | out_doc_generate | + | Invalid doc versioning | 4224292655297723eb98691001100052 | Endpoint New Version PDF 15 | Output Document new version solo pdf | Output 16 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 1,99.98 | | | 1 | sample | sample | print | 400 | out_doc_versioning | + | Invalid doc pdf security enabled | 4224292655297723eb98691001100052 | Endpoint New Version Doc 18 | Output Document new version solo doc | Output 18 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 1 | | | 23454 | | | | 400 | out_doc_generate | + | Invalid doc pdf security permissions | 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI22 | Output Document new version PDF SECURITY | Output 21 | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 1 | sample | sample | print\|modfy\|cop\|for\|aaa | 400 | out_doc_pdf_security_permissions | + | Field requered out doc title | 4224292655297723eb98691001100052 | | Output Document old version - EndPoint | Output 22 | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | | 0 | | | | 400 | out_doc_title | + | Field required out doc filename | 4224292655297723eb98691001100052 | Endpoint Old Version Doc | Output Document old version solo doc | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 1 | | | 0 | | | | 400 | out_doc_generate | + | Output created with same name | 4224292655297723eb98691001100052 | Endpoint Old Version (base) | Output Document old version solo doc | Output 23 | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 1 | | | 0 | | | | 400 | Output Document with the same name in this process | diff --git a/features/backend/projects/project/basic_sequence_project_resources.feature b/features/backend/projects/project/basic_sequence_project_resources.feature new file mode 100644 index 000000000..946d6f48e --- /dev/null +++ b/features/backend/projects/project/basic_sequence_project_resources.feature @@ -0,0 +1,485 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Project Resource + Requirements: + a workspace with the process 40 already loaded aproximatly + +Background: + Given that I have a valid access_token + + +Scenario: Get a list of projects + Given I request "project" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + + +Scenario: Get definition of a project activity for obtent definition + Given I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485?filter=definition" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + + +Scenario Outline: Create new Projects + Given POST this data: + """ + { + "prj_name": "Prueba New Project", + "prj_description": "New Project, created of this script", + "prj_target_namespace": "sample", + "prj_expresion_language": null, + "prj_type_language": null, + "prj_exporter": null, + "prj_exporter_version": null, + "prj_create_date": "2014-04-28 11:01:54", + "prj_update_date": "2014-04-30 08:46:17", + "prj_author": "00000000000000000000000000000001", + "prj_author_version": null, + "prj_original_source": null, + "diagrams": [ + { + "dia_uid": "956446767534fece3179b54016939905", + "prj_uid": "655001588534fece2d46f86033751389", + "dia_name": "Prueba New Project", + "dia_is_closable": 0, + "pro_uid": "736054291534fece3342096012897456", + "activities": [ + { + "act_uid": "569214945534fecfa8f0835033274864", + "act_name": "Task # 1", + "act_type": "TASK", + "act_is_for_compensation": "0", + "act_start_quantity": "1", + "act_completion_quantity": "0", + "act_task_type": "EMPTY", + "act_implementation": "", + "act_instantiate": "0", + "act_script_type": "", + "act_script": "", + "act_loop_type": "NONE", + "act_test_before": "0", + "act_loop_maximum": "0", + "act_loop_condition": "0", + "act_loop_cardinality": "0", + "act_loop_behavior": "0", + "act_is_adhoc": "0", + "act_is_collapsed": "0", + "act_completion_condition": "0", + "act_ordering": "0", + "act_cancel_remaining_instances": "0", + "act_protocol": "0", + "act_method": "0", + "act_is_global": "0", + "act_referer": "0", + "act_default_flow": "0", + "act_master_diagram": "0", + "bou_x": "486", + "bou_y": "101", + "bou_width": "161", + "bou_height": "42", + "bou_container": "bpmnDiagram" + } + ], + "events": [ + { + "evn_uid": "259220802534fecfad49854013091940", + "evn_name": "Start # 1", + "evn_type": "START", + "evn_marker": "MESSAGE", + "evn_is_interrupting": "1", + "evn_cancel_activity": "0", + "evn_activity_ref": null, + "evn_wait_for_completion": "0", + "evn_error_name": null, + "evn_error_code": null, + "evn_escalation_name": null, + "evn_escalation_code": null, + "evn_message": "LEAD", + "evn_operation_name": null, + "evn_operation_implementation_ref": null, + "evn_time_date": null, + "evn_time_cycle": null, + "evn_time_duration": null, + "evn_behavior": "CATCH", + "bou_x": "517", + "bou_y": "19", + "bou_width": "33", + "bou_height": "33", + "bou_container": "bpmnDiagram" + }, + { + "evn_uid": "856003291534fecfae5dff7085708495", + "evn_name": "End # 1", + "evn_type": "END", + "evn_marker": "EMPTY", + "evn_is_interrupting": "1", + "evn_cancel_activity": "0", + "evn_activity_ref": null, + "evn_wait_for_completion": "0", + "evn_error_name": null, + "evn_error_code": null, + "evn_escalation_name": null, + "evn_escalation_code": null, + "evn_message": "", + "evn_operation_name": null, + "evn_operation_implementation_ref": null, + "evn_time_date": null, + "evn_time_cycle": null, + "evn_time_duration": null, + "evn_behavior": "THROW", + "bou_x": "549", + "bou_y": "181", + "bou_width": "33", + "bou_height": "33", + "bou_container": "bpmnDiagram" + } + ], + "gateways": [], + "flows": [ + { + "flo_uid": "17092374253551306216a72013534569", + "flo_type": "SEQUENCE", + "flo_name": null, + "flo_element_origin": "569214945534fecfa8f0835033274864", + "flo_element_origin_type": "bpmnActivity", + "flo_element_dest": "856003291534fecfae5dff7085708495", + "flo_element_dest_type": "bpmnEvent", + "flo_is_inmediate": "1", + "flo_condition": null, + "flo_x1": "561", + "flo_y1": "193", + "flo_x2": "577", + "flo_y2": "193", + "flo_state": [ + { + "x": 566, + "y": 145 + }, + { + "x": 566, + "y": 171 + }, + { + "x": 602, + "y": 171 + }, + { + "x": 602, + "y": 198 + }, + { + "x": 582, + "y": 198 + } + ] + }, + { + "flo_uid": "304762728534fecfaf3bf88040991913", + "flo_type": "SEQUENCE", + "flo_name": null, + "flo_element_origin": "259220802534fecfad49854013091940", + "flo_element_origin_type": "bpmnEvent", + "flo_element_dest": "569214945534fecfa8f0835033274864", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate": "1", + "flo_condition": null, + "flo_x1": "529", + "flo_y1": "95", + "flo_x2": "556", + "flo_y2": "95", + "flo_state": [ + { + "x": 534, + "y": 52 + }, + { + "x": 534, + "y": 76 + }, + { + "x": 561, + "y": 76 + }, + { + "x": 561, + "y": 100 + } + ] + } + ], + "artifacts": [], + "laneset": [], + "lanes": [] + } + ] + } + """ + 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 "event_new_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 | + | Create a new process | 1 | + + +Scenario: Get a list of projects + Given I request "project" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + + +Scenario Outline: Update the Projects and then check if the values had changed + Given PUT this data: + """ + { + "prj_name": "Update Prueba New Project", + "prj_description": "Update New Project, created of this script", + "prj_target_namespace": "sample", + "prj_expresion_language": null, + "prj_type_language": null, + "prj_exporter": null, + "prj_exporter_version": null, + "prj_create_date": "2014-04-28 11:01:54", + "prj_update_date": "2014-04-30 08:46:17", + "prj_author": "00000000000000000000000000000001", + "prj_author_version": null, + "prj_original_source": null, + "diagrams": [ + { + "dia_uid": "956446767534fece3179b54016939905", + "prj_uid": "655001588534fece2d46f86033751389", + "dia_name": "Update Prueba New Project", + "dia_is_closable": 0, + "pro_uid": "736054291534fece3342096012897456", + "activities": [ + { + "act_uid": "569214945534fecfa8f0835033274864", + "act_name": "Task # 1", + "act_type": "TASK", + "act_is_for_compensation": "0", + "act_start_quantity": "1", + "act_completion_quantity": "0", + "act_task_type": "EMPTY", + "act_implementation": "", + "act_instantiate": "0", + "act_script_type": "", + "act_script": "", + "act_loop_type": "NONE", + "act_test_before": "0", + "act_loop_maximum": "0", + "act_loop_condition": "0", + "act_loop_cardinality": "0", + "act_loop_behavior": "0", + "act_is_adhoc": "0", + "act_is_collapsed": "0", + "act_completion_condition": "0", + "act_ordering": "0", + "act_cancel_remaining_instances": "0", + "act_protocol": "0", + "act_method": "0", + "act_is_global": "0", + "act_referer": "0", + "act_default_flow": "0", + "act_master_diagram": "0", + "bou_x": "486", + "bou_y": "101", + "bou_width": "161", + "bou_height": "42", + "bou_container": "bpmnDiagram" + } + ], + "events": [ + { + "evn_uid": "259220802534fecfad49854013091940", + "evn_name": "Start # 1", + "evn_type": "START", + "evn_marker": "MESSAGE", + "evn_is_interrupting": "1", + "evn_cancel_activity": "0", + "evn_activity_ref": null, + "evn_wait_for_completion": "0", + "evn_error_name": null, + "evn_error_code": null, + "evn_escalation_name": null, + "evn_escalation_code": null, + "evn_message": "LEAD", + "evn_operation_name": null, + "evn_operation_implementation_ref": null, + "evn_time_date": null, + "evn_time_cycle": null, + "evn_time_duration": null, + "evn_behavior": "CATCH", + "bou_x": "517", + "bou_y": "19", + "bou_width": "33", + "bou_height": "33", + "bou_container": "bpmnDiagram" + }, + { + "evn_uid": "856003291534fecfae5dff7085708495", + "evn_name": "End # 1", + "evn_type": "END", + "evn_marker": "EMPTY", + "evn_is_interrupting": "1", + "evn_cancel_activity": "0", + "evn_activity_ref": null, + "evn_wait_for_completion": "0", + "evn_error_name": null, + "evn_error_code": null, + "evn_escalation_name": null, + "evn_escalation_code": null, + "evn_message": "", + "evn_operation_name": null, + "evn_operation_implementation_ref": null, + "evn_time_date": null, + "evn_time_cycle": null, + "evn_time_duration": null, + "evn_behavior": "THROW", + "bou_x": "549", + "bou_y": "181", + "bou_width": "33", + "bou_height": "33", + "bou_container": "bpmnDiagram" + } + ], + "gateways": [], + "flows": [ + { + "flo_uid": "17092374253551306216a72013534569", + "flo_type": "SEQUENCE", + "flo_name": null, + "flo_element_origin": "569214945534fecfa8f0835033274864", + "flo_element_origin_type": "bpmnActivity", + "flo_element_dest": "856003291534fecfae5dff7085708495", + "flo_element_dest_type": "bpmnEvent", + "flo_is_inmediate": "1", + "flo_condition": null, + "flo_x1": "561", + "flo_y1": "193", + "flo_x2": "577", + "flo_y2": "193", + "flo_state": [ + { + "x": 566, + "y": 145 + }, + { + "x": 566, + "y": 171 + }, + { + "x": 602, + "y": 171 + }, + { + "x": 602, + "y": 198 + }, + { + "x": 582, + "y": 198 + } + ] + }, + { + "flo_uid": "304762728534fecfaf3bf88040991913", + "flo_type": "SEQUENCE", + "flo_name": null, + "flo_element_origin": "259220802534fecfad49854013091940", + "flo_element_origin_type": "bpmnEvent", + "flo_element_dest": "569214945534fecfa8f0835033274864", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate": "1", + "flo_condition": null, + "flo_x1": "529", + "flo_y1": "95", + "flo_x2": "556", + "flo_y2": "95", + "flo_state": [ + { + "x": 534, + "y": 52 + }, + { + "x": 534, + "y": 76 + }, + { + "x": 561, + "y": 76 + }, + { + "x": 561, + "y": 100 + } + ] + } + ], + "artifacts": [], + "laneset": [], + "lanes": [] + } + ] + } + """ + And that I want to update 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" + + Examples: + + | test_description | project_new_uid_number | + | Update a new project created | 1 | + + +Scenario Outline: Get definition of a project + Given that I want to get a resource with the key "new_uid" stored in session array as variable "project_new_uid_" in postion 0 + And I request "project" + 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 that "prj_name" is set to "Update Prueba New Project" + And that "prj_description" is set to "Update New Project, created of this script" + + Examples: + + | project_new_uid_number | + | 1 | + +Scenario Outline: Delete a Project activity created previously 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 | + + +Scenario: Get a list of projects + Given I request "project" + 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" \ No newline at end of file diff --git a/features/backend/projects/project/main_tests_project_resources.feature b/features/backend/projects/project/main_tests_project_resources.feature new file mode 100644 index 000000000..7c8adfa46 --- /dev/null +++ b/features/backend/projects/project/main_tests_project_resources.feature @@ -0,0 +1,532 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Project Resource Main Test + Requirements: + a workspace with the process 40 already loaded aproximatly + +Background: + Given that I have a valid access_token + + +Scenario: Get a list of projects + Given I request "project" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + + +Scenario: Get definition of a project activity for obtent definition + Given I request "project/4224292655297723eb98691001100052/activity/65496814252977243d57684076211485?filter=definition" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + + +Scenario Outline: Create new Projects + Given POST this data: + """ + { + "prj_name": "", + "prj_description": "", + "prj_target_namespace": "sample", + "prj_expresion_language": null, + "prj_type_language": null, + "prj_exporter": null, + "prj_exporter_version": null, + "prj_create_date": "2014-04-28 11:01:54", + "prj_update_date": "2014-04-30 08:46:17", + "prj_author": "", + "prj_author_version": null, + "prj_original_source": null, + "diagrams": [ + { + "dia_uid": "956446767534fece3179b54016939905", + "prj_uid": "655001588534fece2d46f86033751389", + "dia_name": "", + "dia_is_closable": 0, + "pro_uid": "736054291534fece3342096012897456", + "activities": [ + { + "act_uid": "569214945534fecfa8f0835033274864", + "act_name": "Task # 1", + "act_type": "TASK", + "act_is_for_compensation": "0", + "act_start_quantity": "1", + "act_completion_quantity": "0", + "act_task_type": "EMPTY", + "act_implementation": "", + "act_instantiate": "0", + "act_script_type": "", + "act_script": "", + "act_loop_type": "NONE", + "act_test_before": "0", + "act_loop_maximum": "0", + "act_loop_condition": "0", + "act_loop_cardinality": "0", + "act_loop_behavior": "0", + "act_is_adhoc": "0", + "act_is_collapsed": "0", + "act_completion_condition": "0", + "act_ordering": "0", + "act_cancel_remaining_instances": "0", + "act_protocol": "0", + "act_method": "0", + "act_is_global": "0", + "act_referer": "0", + "act_default_flow": "0", + "act_master_diagram": "0", + "bou_x": "486", + "bou_y": "101", + "bou_width": "161", + "bou_height": "42", + "bou_container": "bpmnDiagram" + }, + { + "act_uid": "569214945534fecfa8f0835033274864", + "act_name": "Task # 2", + "act_type": "TASK", + "act_is_for_compensation": "0", + "act_start_quantity": "1", + "act_completion_quantity": "0", + "act_task_type": "EMPTY", + "act_implementation": "", + "act_instantiate": "0", + "act_script_type": "", + "act_script": "", + "act_loop_type": "NONE", + "act_test_before": "0", + "act_loop_maximum": "0", + "act_loop_condition": "0", + "act_loop_cardinality": "0", + "act_loop_behavior": "0", + "act_is_adhoc": "0", + "act_is_collapsed": "0", + "act_completion_condition": "0", + "act_ordering": "0", + "act_cancel_remaining_instances": "0", + "act_protocol": "0", + "act_method": "0", + "act_is_global": "0", + "act_referer": "0", + "act_default_flow": "0", + "act_master_diagram": "0", + "bou_x": "486", + "bou_y": "101", + "bou_width": "161", + "bou_height": "42", + "bou_container": "bpmnDiagram" + } + ], + "events": [ + { + "evn_uid": "259220802534fecfad49854013091940", + "evn_name": "Start # 1", + "evn_type": "START", + "evn_marker": "MESSAGE", + "evn_is_interrupting": "1", + "evn_cancel_activity": "0", + "evn_activity_ref": null, + "evn_wait_for_completion": "0", + "evn_error_name": null, + "evn_error_code": null, + "evn_escalation_name": null, + "evn_escalation_code": null, + "evn_message": "LEAD", + "evn_operation_name": null, + "evn_operation_implementation_ref": null, + "evn_time_date": null, + "evn_time_cycle": null, + "evn_time_duration": null, + "evn_behavior": "CATCH", + "bou_x": "517", + "bou_y": "19", + "bou_width": "33", + "bou_height": "33", + "bou_container": "bpmnDiagram" + }, + { + "evn_uid": "856003291534fecfae5dff7085708495", + "evn_name": "End # 1", + "evn_type": "END", + "evn_marker": "EMPTY", + "evn_is_interrupting": "1", + "evn_cancel_activity": "0", + "evn_activity_ref": null, + "evn_wait_for_completion": "0", + "evn_error_name": null, + "evn_error_code": null, + "evn_escalation_name": null, + "evn_escalation_code": null, + "evn_message": "", + "evn_operation_name": null, + "evn_operation_implementation_ref": null, + "evn_time_date": null, + "evn_time_cycle": null, + "evn_time_duration": null, + "evn_behavior": "THROW", + "bou_x": "549", + "bou_y": "181", + "bou_width": "33", + "bou_height": "33", + "bou_container": "bpmnDiagram" + } + ], + "gateways": [], + "flows": [ + { + "flo_uid": "17092374253551306216a72013534569", + "flo_type": "SEQUENCE", + "flo_name": null, + "flo_element_origin": "569214945534fecfa8f0835033274864", + "flo_element_origin_type": "bpmnActivity", + "flo_element_dest": "856003291534fecfae5dff7085708495", + "flo_element_dest_type": "bpmnEvent", + "flo_is_inmediate": "1", + "flo_condition": null, + "flo_x1": "561", + "flo_y1": "193", + "flo_x2": "577", + "flo_y2": "193", + "flo_state": [ + { + "x": 566, + "y": 145 + }, + { + "x": 566, + "y": 171 + }, + { + "x": 602, + "y": 171 + }, + { + "x": 602, + "y": 198 + }, + { + "x": 582, + "y": 198 + } + ] + }, + { + "flo_uid": "304762728534fecfaf3bf88040991913", + "flo_type": "SEQUENCE", + "flo_name": null, + "flo_element_origin": "259220802534fecfad49854013091940", + "flo_element_origin_type": "bpmnEvent", + "flo_element_dest": "569214945534fecfa8f0835033274864", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate": "1", + "flo_condition": null, + "flo_x1": "529", + "flo_y1": "95", + "flo_x2": "556", + "flo_y2": "95", + "flo_state": [ + { + "x": 534, + "y": 52 + }, + { + "x": 534, + "y": 76 + }, + { + "x": 561, + "y": 76 + }, + { + "x": 561, + "y": 100 + } + ] + } + ], + "artifacts": [], + "laneset": [], + "lanes": [] + } + ] + } + """ + 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 "event_new_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 | prj_name | prj_description | prj_author | dia_name | + | Create a new process with sequencial derivation | 1 | Process sequencial | Process with derivation sequencial | 00000000000000000000000000000001 | Process sequencial | + + + + + + + + + + + + + +Scenario: Get a list of projects + Given I request "project" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + + +Scenario Outline: Update the Projects and then check if the values had changed + Given PUT this data: + """ + { + "prj_name": "Update Prueba New Project", + "prj_description": "Update New Project, created of this script", + "prj_target_namespace": "sample", + "prj_expresion_language": null, + "prj_type_language": null, + "prj_exporter": null, + "prj_exporter_version": null, + "prj_create_date": "2014-04-28 11:01:54", + "prj_update_date": "2014-04-30 08:46:17", + "prj_author": "00000000000000000000000000000001", + "prj_author_version": null, + "prj_original_source": null, + "diagrams": [ + { + "dia_uid": "956446767534fece3179b54016939905", + "prj_uid": "655001588534fece2d46f86033751389", + "dia_name": "Prueba", + "dia_is_closable": 0, + "pro_uid": "736054291534fece3342096012897456", + "activities": [ + { + "act_uid": "569214945534fecfa8f0835033274864", + "act_name": "Task # 1", + "act_type": "TASK", + "act_is_for_compensation": "0", + "act_start_quantity": "1", + "act_completion_quantity": "0", + "act_task_type": "EMPTY", + "act_implementation": "", + "act_instantiate": "0", + "act_script_type": "", + "act_script": "", + "act_loop_type": "NONE", + "act_test_before": "0", + "act_loop_maximum": "0", + "act_loop_condition": "0", + "act_loop_cardinality": "0", + "act_loop_behavior": "0", + "act_is_adhoc": "0", + "act_is_collapsed": "0", + "act_completion_condition": "0", + "act_ordering": "0", + "act_cancel_remaining_instances": "0", + "act_protocol": "0", + "act_method": "0", + "act_is_global": "0", + "act_referer": "0", + "act_default_flow": "0", + "act_master_diagram": "0", + "bou_x": "486", + "bou_y": "101", + "bou_width": "161", + "bou_height": "42", + "bou_container": "bpmnDiagram" + } + ], + "events": [ + { + "evn_uid": "259220802534fecfad49854013091940", + "evn_name": "Start # 1", + "evn_type": "START", + "evn_marker": "MESSAGE", + "evn_is_interrupting": "1", + "evn_cancel_activity": "0", + "evn_activity_ref": null, + "evn_wait_for_completion": "0", + "evn_error_name": null, + "evn_error_code": null, + "evn_escalation_name": null, + "evn_escalation_code": null, + "evn_message": "LEAD", + "evn_operation_name": null, + "evn_operation_implementation_ref": null, + "evn_time_date": null, + "evn_time_cycle": null, + "evn_time_duration": null, + "evn_behavior": "CATCH", + "bou_x": "517", + "bou_y": "19", + "bou_width": "33", + "bou_height": "33", + "bou_container": "bpmnDiagram" + }, + { + "evn_uid": "856003291534fecfae5dff7085708495", + "evn_name": "End # 1", + "evn_type": "END", + "evn_marker": "EMPTY", + "evn_is_interrupting": "1", + "evn_cancel_activity": "0", + "evn_activity_ref": null, + "evn_wait_for_completion": "0", + "evn_error_name": null, + "evn_error_code": null, + "evn_escalation_name": null, + "evn_escalation_code": null, + "evn_message": "", + "evn_operation_name": null, + "evn_operation_implementation_ref": null, + "evn_time_date": null, + "evn_time_cycle": null, + "evn_time_duration": null, + "evn_behavior": "THROW", + "bou_x": "549", + "bou_y": "181", + "bou_width": "33", + "bou_height": "33", + "bou_container": "bpmnDiagram" + } + ], + "gateways": [], + "flows": [ + { + "flo_uid": "17092374253551306216a72013534569", + "flo_type": "SEQUENCE", + "flo_name": null, + "flo_element_origin": "569214945534fecfa8f0835033274864", + "flo_element_origin_type": "bpmnActivity", + "flo_element_dest": "856003291534fecfae5dff7085708495", + "flo_element_dest_type": "bpmnEvent", + "flo_is_inmediate": "1", + "flo_condition": null, + "flo_x1": "561", + "flo_y1": "193", + "flo_x2": "577", + "flo_y2": "193", + "flo_state": [ + { + "x": 566, + "y": 145 + }, + { + "x": 566, + "y": 171 + }, + { + "x": 602, + "y": 171 + }, + { + "x": 602, + "y": 198 + }, + { + "x": 582, + "y": 198 + } + ] + }, + { + "flo_uid": "304762728534fecfaf3bf88040991913", + "flo_type": "SEQUENCE", + "flo_name": null, + "flo_element_origin": "259220802534fecfad49854013091940", + "flo_element_origin_type": "bpmnEvent", + "flo_element_dest": "569214945534fecfa8f0835033274864", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate": "1", + "flo_condition": null, + "flo_x1": "529", + "flo_y1": "95", + "flo_x2": "556", + "flo_y2": "95", + "flo_state": [ + { + "x": 534, + "y": 52 + }, + { + "x": 534, + "y": 76 + }, + { + "x": 561, + "y": 76 + }, + { + "x": 561, + "y": 100 + } + ] + } + ], + "artifacts": [], + "laneset": [], + "lanes": [] + } + ] + } + """ + And that I want to update a resource with the key "new_uid" stored in session array as variable "project_new_uid_" + 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" + + Examples: + + | test_description | project_new_uid_number | + | Update a new project created | 1 | + + +Scenario Outline: Get definition of a project + Given that I want to get a resource with the key "new_uid" stored in session array as variable "project_new_uid_" + And I request "project" + 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 that "prj_name" is set to "Update Prueba New Project" + And that "prj_description" is set to "Update New Project, created of this script" + + Examples: + + | project_new_uid_number | + | 1 | + +Scenario Outline: Delete a Project activity created previously 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_" + 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 | + + +Scenario: Get a list of projects + Given I request "project" + 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" \ No newline at end of file diff --git a/features/backend/projects/project/negative_tests_project_resources.feature b/features/backend/projects/project/negative_tests_project_resources.feature new file mode 100644 index 000000000..e69de29bb diff --git a/features/backend/projects/project/project.feature b/features/backend/projects/project/project.feature deleted file mode 100644 index 52fe0426a..000000000 --- a/features/backend/projects/project/project.feature +++ /dev/null @@ -1,42 +0,0 @@ -@ProcessMakerMichelangelo @RestAPI -Feature: Project Resources - - Background: - Given that I have a valid access_token - - Scenario: Get a list of projects - - Given I request "projects" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the content type is "application/json" - And the type is "array" - -""" - Scenario: Get a single project - - Given I request "project/4224292655297723eb98691001100052" - 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" - - - Scenario: Create a new project - Given POST data from file "process_template_v1.json" - And I request "project" - Then the response status code should be 201 - And the content type is "application/json" - And the type is "array" - - Scenario: Update a project - Given PUT data from file "process_template_v2.json" - And I request "project" - Then the response status code should be 201 - And the content type is "application/json" - And the type is "array" - - Scenario: Delete a project - Given I request "project/" - Then the response status code should be 200 -""" \ No newline at end of file diff --git a/features/bootstrap/RestContext.php b/features/bootstrap/RestContext.php index d0edde4d9..b5d9e62ad 100644 --- a/features/bootstrap/RestContext.php +++ b/features/bootstrap/RestContext.php @@ -1149,8 +1149,9 @@ class RestContext extends BehatContext /** * @Given /^that I want to update a resource with the key "([^"]*)" stored in session array as variable "([^"]*)"$/ + * @Given /^that I want to update a resource with the key "([^"]*)" stored in session array as variable "([^"]*)" in position (\d+)$/ */ - public function thatIWantToUpdateAResourceWithTheKeyStoredInSessionArrayAsVariable($varName, $sessionVarName) + public function thatIWantToUpdateAResourceWithTheKeyStoredInSessionArrayAsVariable($varName, $sessionVarName, $position=null) { if (file_exists("session.data")) { $sessionData = json_decode(file_get_contents("session.data")); @@ -1159,6 +1160,8 @@ class RestContext extends BehatContext } if (!isset($sessionData->$sessionVarName) ) { $varValue = ''; + }elseif(!is_null($position)){ + $varValue = $sessionData->$sessionVarName[$position]; } else { $varValue = $sessionData->$sessionVarName; } @@ -1169,8 +1172,9 @@ class RestContext extends BehatContext /** * @Given /^that I want to get a resource with the key "([^"]*)" stored in session array as variable "([^"]*)"$/ + * @Given /^that I want to get a resource with the key "([^"]*)" stored in session array as variable "([^"]*)" in postion (\d+)$/ */ - public function thatIWantToGetAResourceWithTheKeyStoredInSessionArrayAsVariable($varName, $sessionVarName) + public function thatIWantToGetAResourceWithTheKeyStoredInSessionArrayAsVariable($varName, $sessionVarName, $position=null) { if (file_exists("session.data")) { $sessionData = json_decode(file_get_contents("session.data")); @@ -1179,6 +1183,8 @@ class RestContext extends BehatContext } if (!isset($sessionData->$sessionVarName) ) { $varValue = ''; + }elseif(!is_null($position)){ + $varValue = $sessionData->$sessionVarName[$position]; } else { $varValue = $sessionData->$sessionVarName; } @@ -1189,8 +1195,9 @@ class RestContext extends BehatContext /** * @Given /^that I want to delete a resource with the key "([^"]*)" stored in session array as variable "([^"]*)"$/ + * @Given /^that I want to delete a resource with the key "([^"]*)" stored in session array as variable "([^"]*)" in position (\d+)$/ */ - public function thatIWantToDeleteAResourceWithTheKeyStoredInSessionArrayAsVariable($varName, $sessionVarName) + public function thatIWantToDeleteAResourceWithTheKeyStoredInSessionArrayAsVariable($varName, $sessionVarName, $position) { if (file_exists("session.data")) { $sessionData = json_decode(file_get_contents("session.data")); @@ -1199,6 +1206,8 @@ class RestContext extends BehatContext } if (!isset($sessionData->$sessionVarName) ) { $varValue = ''; + }elseif(!is_null($position)){ + $varValue = $sessionData->$sessionVarName[$position]; } else { $varValue = $sessionData->$sessionVarName; } @@ -1257,6 +1266,8 @@ class RestContext extends BehatContext /** * @Given /^I request "([^"]*)" with the key "([^"]*)" stored in session array as variable "([^"]*)"$/ * @Given /^I request "([^"]*)" with the key "([^"]*)" stored in session array as variable "([^"]*)" and url is "([^"]*)"$/ + * @Given /^I request "([^"]*)" with the key "([^"]*)" stored in session array as variable "([^"]*)"$/ + * @Given /^I request "([^"]*)" with the key "([^"]*)" stored in session array as variable "([^"]*)" and url is "([^"]*)"$/ */ public function iRequestWithTheKeyStoredInSessionArrayAsVariable($pageUrl, $varName, $sessionVarName, $urlType="") { @@ -1553,5 +1564,35 @@ class RestContext extends BehatContext } } + /** + * @Given /^store "([^"]*)" in session array as variable "([^"]*)" where an object has "([^"]*)" equal to "([^"]*)"$/ + */ + public function storeInSessionArrayAsVariableWhereAnObjectHasEqualsTo($varName, $sessionVarName, $objectProperty, $objectValue) + { -} + $swFound=false; + if (file_exists("session.data")) { + $sessionData = json_decode(file_get_contents("session.data")); + } else { + $sessionData = new StdClass(); + } + + $sessionData->$sessionVarName = array(); + + + foreach($this->_data as $obj){ + if((isset($obj->$objectProperty))&&($obj->$objectProperty == $objectValue)){ + $swFound=true; + $varValue = $obj->$varName; + + //$sessionData->$sessionVarName = $varValue; + $sessionData->{$sessionVarName}[] = $varValue; + file_put_contents("session.data", json_encode($sessionData)); + } + } + if (!$swFound) { + //print_r($this->_data); + throw new \Exception("JSON Response does not have '$varName' property\n\n" ); + } + } +} \ No newline at end of file