@ProcessMakerMichelangelo @RestAPI Feature: Process supervisor Resources Requirements: a workspace with the process 85794888452ceeef3675164057928956 ("Test ( Triggers, Activity)") already loaded there are zero supervisor, dynaform and input document in the Process Supervisor of process Background: Given that I have a valid access_token Scenario Outline: Get a List of current process supervisors of a project Given I request "project//process-supervisors" 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 records Examples: | test_description | project | records | | List current unique process supervisor | 85794888452ceeef3675164057928956 | 0 | Scenario Outline: Get a specific process supervisor details of a project Given I request "project//process-supervisor/" 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" Examples: | test_description | project | pu_uid | | Get the supervisor details | 85794888452ceeef3675164057928956 | 70662784652cef0878516f7085532841 | Scenario Outline: Get a List of available process supervisor of a project Given I request "project//available-process-supervisors" 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 records Examples: | test_description | project | records | | List users and groups available to be supervisors | 85794888452ceeef3675164057928956 | 21 | Scenario Outline: Get a List of available groups process supervisor of a project Given I request "project//available-process-supervisors?obj_type=group" 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 records Examples: | test_description | project | records | | List the 23 groups available to be supervisors | 85794888452ceeef3675164057928956 | 20 | Scenario Outline: Get a List of available users elegible as process supervisor Given I request "project//available-process-supervisors?obj_type=user" 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 records Examples: | test_description | project | records | | List the unique admin user available to be supervisor | 85794888452ceeef3675164057928956 | 1 | Scenario Outline: Get a List of dynaforms assigned to a process supervisor Given I request "project//process-supervisor/dynaforms" 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 records Examples: | test_description | project | records | | List the 2 pre-assigned dynaforms #1 & #2 | 85794888452ceeef3675164057928956 | 2 | Scenario Outline: Get a specific dynaform detail assigned to a process supervisor Given I request "project//process-supervisor/dynaform/" 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" Examples: | test_description | project | pud_uid | | Get details of the first assigend dynaform | 85794888452ceeef3675164057928956 | 56779160652cef174108c76074755720 | Scenario Outline: Get a List of available dynaforms to be assigned to a process supervisor Given I request "project//process-supervisor/available-dynaforms" 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 records Examples: | test_description | project | records | | Get a list of available dynaforms to be assigned | 85794888452ceeef3675164057928956 | 1 | Scenario Outline: Get a List of assigend input-documents to a process supervisor Given I request "project//process-supervisor/input-documents" 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 records Examples: | test_description | project | records | | Get a list of pre-assigned input doucments | 85794888452ceeef3675164057928956 | 2 | Scenario Outline: Get a List of available input-documents to be assigned to a process supervisor Given I request "project//process-supervisor/available-input-documents" 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 records Examples: | test_description | project | records | | Get a list of 1 record of available input documents | 85794888452ceeef3675164057928956 | 1 | Scenario Outline: Get a specific input document assigned to a process supervisor Given I request "project//process-supervisor/input-document/" 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" Examples: | test_description | project | pui_uid | | Get details of assigend input document | 85794888452ceeef3675164057928956 | 64558052052d8a715de8936029381436 | Scenario Outline: Assign a user and a group as process supervisors Given POST this data: """ { "pu_type": "", "usr_uid": "" } """ And I request "project//process-supervisor" 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 "pu_uid" in session array as variable "pu_uid_" Examples: | test_description | project | pu_number | pu_type | usr_uid | | Assign a group as Supervisor | 85794888452ceeef3675164057928956 | 1 | GROUP_SUPERVISOR | 54731929352d56741de9d42002704749 | | Assign a user as Supervisor | 85794888452ceeef3675164057928956 | 2 | SUPERVISOR | 00000000000000000000000000000001 | Scenario Outline: Assign a dynaform to a process supervisor Given POST this data: """ { "dyn_uid": "" } """ And I request "project//process-supervisor/dynaform" 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 "pud_uid" in session array as variable "pud_uid_" Examples: | test_description | project | pud_number | dyn_uid | | Assign a dynaform # 3 for Supervisor | 85794888452ceeef3675164057928956 | 1 | 92562207752ceef36c7d874048012431 | Scenario Outline: Assign an input document to a process supervisor Given POST this data: """ { "inp_doc_uid": "" } """ And I request "project//process-supervisor/input-document" 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 "pui_uid" in session array as variable "pui_inpdoc_uid_" Examples: | test_description | project | dps_number | inp_doc_uid | | Assign an Input document for Supervisor | 85794888452ceeef3675164057928956 | 1 | 30053187052ddfa4e1fdca4001721051 | Scenario Outline: Delete a process supervisor Given that I want to delete a resource with the key "pu_uid" stored in session array as variable "pu_uid_" And I request "project//process-supervisor" 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 | pu_number | | Remove first assigned supervisor | 85794888452ceeef3675164057928956 | 1 | | Remove second assigned supervisor | 85794888452ceeef3675164057928956 | 2 | Scenario Outline: Delete a input-document process supervisor of a project Given that I want to delete a resource with the key "pui_uid" stored in session array as variable "pui_inpdoc_uid_" And I request "project/85794888452ceeef3675164057928956/process-supervisor/input-document" 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 | dps_number | | Assign an Input document for Supervisor | 85794888452ceeef3675164057928956 | 1 | Scenario Outline: Delete an dynaform to a process supervisor Given that I want to delete a resource with the key "pui_uid" stored in session array as variable "pud_uid_" And I request "project//process-supervisor/dynaform" Then the response status code should be 200 And the response charset is "UTF-8" Examples: | test_description | project | pud_number | | Delete dynaform # 3 for Supervisor | 85794888452ceeef3675164057928956 | 1 |