diff --git a/features/backend/pm_user/project_user.feature b/features/backend/project_user/basic_sequence_project_user.feature similarity index 100% rename from features/backend/pm_user/project_user.feature rename to features/backend/project_user/basic_sequence_project_user.feature diff --git a/features/backend/project_user/main_tests_project_user.feature b/features/backend/project_user/main_tests_project_user.feature new file mode 100644 index 000000000..5df65f7b5 --- /dev/null +++ b/features/backend/project_user/main_tests_project_user.feature @@ -0,0 +1,67 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Project User Resources Main Tests + Requirements: + a workspace with the process 1265557095225ff5c688f46031700471 ("Test Michelangelo") already loaded + there are two output documents in the process + + + Background: + Given that I have a valid access_token + + + Scenario: Get a list of users of a project when there are exactly 52 users + Given I request "project/1265557095225ff5c688f46031700471/users" + 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 52 records + + + Scenario: Get a list of starting task of a project when there are exactly 9 users + Given I request "project/1265557095225ff5c688f46031700471/starting-tasks" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + And the response has 9 records + + + Scenario Outline: Get a list of start task of a specific user + Given I request "project/1265557095225ff5c688f46031700471/user//starting-tasks" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "array" + + Examples: + + | test_description | usr_uid | + | Verify that this user admin tasks | 00000000000000000000000000000001 | + | Verify that this user adam tasks | 44811996752d567110634a1013636964 | + | Verify that this user magda tasks | 36116269152d56733b20e86062657385 | + + + Scenario Outline: Verify if a user can start a task + Given POST this data: + """ + { + "act_uid": "", + "username": "", + "password": "" + } + """ + And I request "project/1265557095225ff5c688f46031700471/ws/user/can-start-task" + 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" + + Examples: + + | test_description | act_uid | username | password | + | Properties of user admin - task 1 | 1352844695225ff5fe54de2005407079 | admin | admin | + | Properties of user adam - task 1 | 1352844695225ff5fe54de2005407079 | adam | sample | + | Properties of user admin - task 2 | 1546168275225ff617b6a34046164891 | admin | admin | + | Properties of user erick - task 2 | 1546168275225ff617b6a34046164891 | erick | sample | + | Properties of user admin - task 4 | 46941969352af5be2ab3f39001216717 | admin | admin | diff --git a/features/backend/project_user/negative_tests_project_user.feature b/features/backend/project_user/negative_tests_project_user.feature new file mode 100644 index 000000000..00ee03617 --- /dev/null +++ b/features/backend/project_user/negative_tests_project_user.feature @@ -0,0 +1,36 @@ +@ProcessMakerMichelangelo @RestAPI +Feature: Project User Resources Negative Tests + + + Background: + Given that I have a valid access_token + + Scenario: Get a list of start task of a specific user + Given I request "project/1265557095225ff5c688f46031700471/user/23348978752d567259ea6f3004731611/starting-tasks" + Then the response status code should be 400 + And the response charset is "UTF-8" + And the content type is "application/json" + + +Scenario Outline: Verify if a user can start a task with bad parameters (negative tests) + Given POST this data: + """ + { + "act_uid": "", + "username": "", + "password": "" + } + """ + And I request "project//ws/user/can-start-task" + Then the response status code should be + And the response status message should have the following text "" + + + Examples: + + | test_description | project | act_uid | username | password | error_code | error_message | + | Invalid act_uid | 1265557095225ff5c688f46031700471 | 00000000009999f5fe54de2005407079 | admin | admin | 400 | act_uid | + | Invalid username | 1265557095225ff5c688f46031700471 | 1546168275225ff617b6a34046164891 | ain | admin | 400 | username | + | Invalid password | 1265557095225ff5c688f46031700471 | 1546168275225ff617b6a34046164891 | erick | sle | 400 | password | + | Field requered project | | 46941969352af5be2ab3f39001216717 | admin | admin | 400 | prj_uid | + | Field requered act_uid | 1265557095225ff5c688f46031700471 | | admin | admin | 400 | act_uid | diff --git a/features/backend/web_entry/basic_sequence.feature b/features/backend/web_entry/basic_sequence_web_entry.feature similarity index 100% rename from features/backend/web_entry/basic_sequence.feature rename to features/backend/web_entry/basic_sequence_web_entry.feature diff --git a/features/backend/web_entry/main_tests_web_entry.feature b/features/backend/web_entry/main_tests_web_entry.feature new file mode 100644 index 000000000..e69de29bb