From 7bb53e337bfb8d73a04e820a7e0031ce37fec962 Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Mon, 27 Jan 2014 12:19:33 -0400 Subject: [PATCH] Behat negative process permissions y validacion en assignee --- .../assignee/negative_tests_assignee.feature | 2 +- .../negative_tests_permissions.feature | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/features/backend/assignee/negative_tests_assignee.feature b/features/backend/assignee/negative_tests_assignee.feature index 85ee35fdc..07ae06702 100644 --- a/features/backend/assignee/negative_tests_assignee.feature +++ b/features/backend/assignee/negative_tests_assignee.feature @@ -57,7 +57,7 @@ Scenario Outline: Assign a user or group to an activity (Field validation) | high number for start | a | 1000 | 1 | 0 | 200 | array | | high number for start | a | 1000 | 0 | 0 | 200 | array | | empty result | xyz | 0 | 0 | 0 | 200 | array | - | empty string | | 0 | 10000 | 3 | 200 | array | + | empty string | | 0 | 10000 | 4 | 200 | array | | empty string | | 1 | 2 | 2 | 200 | array | | invalid start | a | b | c | 0 | 400 | string| | invalid limit | a | 0 | c | 0 | 400 | string| diff --git a/features/backend/process_permissions/negative_tests_permissions.feature b/features/backend/process_permissions/negative_tests_permissions.feature index e69de29bb..461ebdec0 100644 --- a/features/backend/process_permissions/negative_tests_permissions.feature +++ b/features/backend/process_permissions/negative_tests_permissions.feature @@ -0,0 +1,44 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Process Permissions Negative tests + + Background: + Given that I have a valid access_token + + Scenario Outline: Create a new Process Permission with bad parameters (negative tests) + Given POST this data: + """ + { + "op_case_status": "", + "tas_uid": "", + "op_user_relation": "", + "usr_uid": "", + "op_task_source" : "", + "op_participate": "", + "op_obj_type": "", + "dynaforms" : "", + "inputs" : "", + "outputs" : "", + "op_action": "" + } + """ + And I request "project/67021149152e27240dc54d2095572343/process-permission" + Then the response status code should be + And the response status message should have the following text "" + + + Examples: + + | test_description | op_case_status | tas_uid | op_user_relation| usr_uid | op_task_source | op_participate | op_obj_type | dynaforms | inputs | outputs | op_action | error_code | error_message | + | Invalid urs_uid | ALL | | 1 | 00000002256780000000000000000001 | 36792129552e27247a483f6069605623 | 1 | ANY | | | | VIEW | 400 | urs_uid | + | Invalid op_user_relation | ALL | | 5 | 25286582752d56713231082039265791 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859555852e280acd84654094971976 | | | BLOCK | 400 | op_user_relation | + | Invalid op_user_relation | ALL | | 0 | 25286582752d56713231082039265791 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859555852e280acd84654094971976 | | | BLOCK | 400 | op_user_relation | + | Invalid op_case_status | LISTALL | | 2 | 54731929352d56741de9d42002704749 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 52547398752e28118ab06a3068272571 | | BLOCK | 400 | op_case_status | + | Invalid op_participate | ALL | | 1 | 32444503652d5671778fd20059078570 | 36792129552e27247a483f6069605623 | 3 | OUTPUT | | | 56569355852e28145a16ec7038754814 | BLOCK | 400 | op_participate | + | Invalid op_obj_type | ALL | | 1 | 16333273052d567284e6766029512960 | 36792129552e27247a483f6069605623 | 0 | TRIGGERS | | | | BLOCK | 400 | op_obj_type | + | Invalid tas _uid | ALL | 12345678909876543210000000000000 | 1 | 34289569752d5673d310e82094574281 | 36792129552e27247a483f6069605623 | 0 | MSGS_HISTORY | | | | BLOCK | 400 | tas _uid | + | Invalid op_task_source | DRAFT | 55416900252e272492318b9024750146 | 1 | 00000000000000000000000000000001 | 36792129552000000000000069605623 | 1 | ANY | | | | VIEW | 400 | op_task_source | + | Inavlid uid Dynaforms | DRAFT | 55416900252e272492318b9024750146 | 1 | 11206717452d5673913aa69053050085 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859000000000000084654094971976 | | | BLOCK | 400 | uid Dynaforms | + | Inavlid uid Inputs | ALL | | 1 | 34289569752d5673d310e82094574281 | 36792129552e27247a483f6069605623 | 0 | INPUT | | 35345345346999999999999888888888 | | BLOCK | 400 | uid Inputs | + | Inavlid uid Outputs | DRAFT | 55416900252e272492318b9024750146 | 1 | 00000000000000000000000000000001 | 36792129552e27247a483f6069605623 | 1 | OUTPUT | | | 22424242424242442424242424242424 | VIEW | 400 | uid Outputs | + | Invalid op_user_relation | | | | | | | | | | | | 400 | | + | Invalid op_action | ALL | | 5 | 25286582752d56713231082039265791 | 36792129552e27247a483f6069605623 | 1 | DYNAFORM | 86859555852e280acd84654094971976 | | | | 400 | op_user_relation | \ No newline at end of file