diff --git a/features/backend/oauth/main_tests_authorization_code.feature b/features/backend/oauth/authorization_code/main_tests_authorization_code.feature.bak similarity index 98% rename from features/backend/oauth/main_tests_authorization_code.feature rename to features/backend/oauth/authorization_code/main_tests_authorization_code.feature.bak index 859e7605d..71a8b4e51 100644 --- a/features/backend/oauth/main_tests_authorization_code.feature +++ b/features/backend/oauth/authorization_code/main_tests_authorization_code.feature.bak @@ -1,160 +1,160 @@ -@ProcessMakerMichelangelo @RestAPI -Feature: Generate token Grant type - Authorization Code -Requirements: - a workspace with open session and installed application - - -Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET - Given OAUTH register an application - """ - { - "name":"", - "description":"", - "webSite":"", - "redirectUri":"", - "applicationNumber":"" - } - """ - Examples: - - | Description | application_number | application_name | application_description | application_website | application_redirectUri | - | Create token normal | 1 | Demo3 | Demo3 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant | - | Create token normal | 2 | Demo4 | Demo4 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant | - - -#Endpoint para verificar el correcto funcionamiento del token generado en este script -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-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 - And the "out_doc_title" property in row 0 equals "" - - Examples: - - | test_description | project | records | out_doc_title | application_number | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | - - -Scenario Outline: Get the Output Documents List both process (without valid token) - Given I request "project//output-documents" - Then the response status code should be 401 - - Examples: - - | test_description | project | records | out_doc_title | application_number | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | - - -#Endpoint para hacer que expire los token creados en este script -Scenario Outline: Expire token created in this script - Given POST this data: - """ - { - } - """ - And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" - Then the response status code should be 200 - - Examples: - - | Description | application_number | - | Expire token 1 | 1 | - | Expire token 2 | 2 | - - -#Endpoint para verificar que el token haya expirado -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | - - -#Grant type Refresh Token -Scenario Outline: Refresh token - Given POST this data: - """ - { - - } - """ - And I request a refresh token for "refresh_token_" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the content type is "application/json" - And the type is "object" - And store "access_token" in session array as variable "access_token_" - And store "expires_in" in session array as variable "expires_in_" - And store "token_type" in session array as variable "token_type_" - And store "scope" in session array as variable "scope_" - - Examples: - - | Description | grant_number | refresh_token_number | - | Create token normal | 1 | 3 | - | Create token normal | 2 | 4 | - - -#Endpoint para verificar el correcto funcionamiento del Refresh Token generado en este script -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-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 - And the "out_doc_title" property in row 0 equals "" - - Examples: - - | test_description | project | records | out_doc_title | application_number | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 3 | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 4 | - - -#Endpoint para borrar el token creado en este script - -Scenario Outline: Delete all tokens created previously in this script - Given that I want to delete a resource with the key "access_token_" stored in session array - And I request "oauth2" - 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: - - | application_number | - | 1 | - | 2 | - | 3 | - | 4 | - - -#Endpoint para verificar que el token ya no existe -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 3 | Unauthorized | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 4 | Unauthorized | +@ProcessMakerMichelangelo @RestAPI +Feature: Generate token Grant type - Authorization Code +Requirements: + a workspace with open session and installed application + + +Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET + Given OAUTH register an application + """ + { + "name":"", + "description":"", + "webSite":"", + "redirectUri":"", + "applicationNumber":"" + } + """ + Examples: + + | Description | application_number | application_name | application_description | application_website | application_redirectUri | + | Create token normal | 1 | Demo3 | Demo3 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant | + | Create token normal | 2 | Demo4 | Demo4 desc | http://www.processmaker.com | http://michelangelo-be.colosa.net/sysmichelangelo/en/neoclassic/oauth2/grant | + + +#Endpoint para verificar el correcto funcionamiento del token generado en este script +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-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 + And the "out_doc_title" property in row 0 equals "" + + Examples: + + | test_description | project | records | out_doc_title | application_number | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | + + +Scenario Outline: Get the Output Documents List both process (without valid token) + Given I request "project//output-documents" + Then the response status code should be 401 + + Examples: + + | test_description | project | records | out_doc_title | application_number | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | + + +#Endpoint para hacer que expire los token creados en este script +Scenario Outline: Expire token created in this script + Given POST this data: + """ + { + } + """ + And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" + Then the response status code should be 200 + + Examples: + + | Description | application_number | + | Expire token 1 | 1 | + | Expire token 2 | 2 | + + +#Endpoint para verificar que el token haya expirado +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | + + +#Grant type Refresh Token +Scenario Outline: Refresh token + Given POST this data: + """ + { + + } + """ + And I request a refresh token for "refresh_token_" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "object" + And store "access_token" in session array as variable "access_token_" + And store "expires_in" in session array as variable "expires_in_" + And store "token_type" in session array as variable "token_type_" + And store "scope" in session array as variable "scope_" + + Examples: + + | Description | grant_number | refresh_token_number | + | Create token normal | 1 | 3 | + | Create token normal | 2 | 4 | + + +#Endpoint para verificar el correcto funcionamiento del Refresh Token generado en este script +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-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 + And the "out_doc_title" property in row 0 equals "" + + Examples: + + | test_description | project | records | out_doc_title | application_number | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 3 | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 4 | + + +#Endpoint para borrar el token creado en este script + +Scenario Outline: Delete all tokens created previously in this script + Given that I want to delete a resource with the key "access_token_" stored in session array + And I request "oauth2" + 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: + + | application_number | + | 1 | + | 2 | + | 3 | + | 4 | + + +#Endpoint para verificar que el token ya no existe +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 3 | Unauthorized | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 4 | Unauthorized | diff --git a/features/backend/oauth/main_tests_client_credentials.feature b/features/backend/oauth/authorization_code/main_tests_client_credentials.feature similarity index 97% rename from features/backend/oauth/main_tests_client_credentials.feature rename to features/backend/oauth/authorization_code/main_tests_client_credentials.feature index f808fd820..6456645d0 100644 --- a/features/backend/oauth/main_tests_client_credentials.feature +++ b/features/backend/oauth/authorization_code/main_tests_client_credentials.feature @@ -1,131 +1,131 @@ -@ProcessMakerMichelangelo @RestAPI -Feature: Generate token Grant type - Client Credentials Grant -Requirements: - a workspace with installed application - - -Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET - Given POST this data: - """ - { - "grant_type":"" - } - """ - And I request a client credential grant - Then the response status code should be 200 - And the response charset is "UTF-8" - And the content type is "application/json" - And the type is "object" - And store "access_token" in session array as variable "access_token_" - And store "expires_in" in session array as variable "expires_in_" - And store "token_type" in session array as variable "token_type_" - - Examples: - | Description | grant_number | grant_type | - | Create token normal | 1 | client_credentials | - | Create token normal | 2 | client_credentials | - - -#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases -Scenario Outline: Returns a list of the cases for the logged in user (Inbox) - Given that I assign an access token from session variable "access_token_" - And I request "cases" - Then the response status code should be 400 - And the response charset is "UTF-8" - - - Examples: - | Description | grant_number | - | Create token normal | 1 | - | Create token normal | 2 | - -#Endpoint para hacer que expire los token creados en este script -Scenario Outline: Expire token created in this script - Given POST this data: - """ - { - } - """ - And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" - Then the response status code should be 200 - - Examples: - | Description | application_number | - | Expire token 1 | 1 | - - -Scenario Outline: Expire token created in this script - Given POST this data: - """ - { - } - """ - And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" - Then the response status code should be 200 - - Examples: - | Description | application_number | - | Expire token 2 | 2 | - - -#Endpoint para verificar que el token haya expirado -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | - - -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | - - -#Endpoint para borrar el token creado en este script - -Scenario Outline: Delete all tokens created previously in this script - Given that I want to delete a resource with the key "access_token_" stored in session array - And I request "oauth2" - 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: - - | application_number | - | 1 | - | 2 | - -#Endpoint para verificar que el token ya no existe -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | - - -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | - +@ProcessMakerMichelangelo @RestAPI +Feature: Generate token Grant type - Client Credentials Grant +Requirements: + a workspace with installed application + + +Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET + Given POST this data: + """ + { + "grant_type":"" + } + """ + And I request a client credential grant + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "object" + And store "access_token" in session array as variable "access_token_" + And store "expires_in" in session array as variable "expires_in_" + And store "token_type" in session array as variable "token_type_" + + Examples: + | Description | grant_number | grant_type | + | Create token normal | 1 | client_credentials | + | Create token normal | 2 | client_credentials | + + +#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases +Scenario Outline: Returns a list of the cases for the logged in user (Inbox) + Given that I assign an access token from session variable "access_token_" + And I request "cases" + Then the response status code should be 400 + And the response charset is "UTF-8" + + + Examples: + | Description | grant_number | + | Create token normal | 1 | + | Create token normal | 2 | + +#Endpoint para hacer que expire los token creados en este script +Scenario Outline: Expire token created in this script + Given POST this data: + """ + { + } + """ + And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" + Then the response status code should be 200 + + Examples: + | Description | application_number | + | Expire token 1 | 1 | + + +Scenario Outline: Expire token created in this script + Given POST this data: + """ + { + } + """ + And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" + Then the response status code should be 200 + + Examples: + | Description | application_number | + | Expire token 2 | 2 | + + +#Endpoint para verificar que el token haya expirado +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | + + +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | + + +#Endpoint para borrar el token creado en este script + +Scenario Outline: Delete all tokens created previously in this script + Given that I want to delete a resource with the key "access_token_" stored in session array + And I request "oauth2" + 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: + + | application_number | + | 1 | + | 2 | + +#Endpoint para verificar que el token ya no existe +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | + + +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | + diff --git a/features/backend/oauth/main_tests_implicit_grant.feature b/features/backend/oauth/authorization_code/main_tests_implicit_grant.feature.bak similarity index 97% rename from features/backend/oauth/main_tests_implicit_grant.feature rename to features/backend/oauth/authorization_code/main_tests_implicit_grant.feature.bak index 8dc368f70..bee8d9386 100644 --- a/features/backend/oauth/main_tests_implicit_grant.feature +++ b/features/backend/oauth/authorization_code/main_tests_implicit_grant.feature.bak @@ -1,126 +1,126 @@ -@ProcessMakerMichelangelo @RestAPI -Feature: Generate token Grant type - Implicit Grant -Requirements: - a workspace with installed application - - -Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET - Given OAUTH request implicit grant - """ - { - "response_type":"", - "client_id":"", - "scope":"", - "implicit_grant_number":"" - } - """ - Examples: - | Description | implicit_grant_number | response_type | client_id | scope | - | Create token normal | 1 | token | x-pm-local-client | * | - | Create token normal | 2 | token | x-pm-local-client | * | - - -#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases -Scenario Outline: Returns a list of the cases for the logged in user (Inbox) - Given that I assign an access token from session variable "access_token_" - And I request "cases" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the type is "array" - And the response has 14 records - - Examples: - | Description | implicit_grant_number | - | Create token normal | 1 | - | Create token normal | 2 | - -#Endpoint para hacer que expire los token creados en este script -Scenario Outline: Expire token created in this script - Given POST this data: - """ - { - } - """ - And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" - Then the response status code should be 200 - - Examples: - | Description | application_number | - | Expire token 1 | 1 | - - -Scenario Outline: Expire token created in this script - Given POST this data: - """ - { - } - """ - And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" - Then the response status code should be 200 - - Examples: - | Description | application_number | - | Expire token 2 | 2 | - - -#Endpoint para verificar que el token haya expirado -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | - - -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | - - -#Endpoint para borrar el token creado en este script - -Scenario Outline: Delete all tokens created previously in this script - Given that I want to delete a resource with the key "access_token_" stored in session array - And I request "oauth2" - 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: - - | application_number | - | 1 | - | 2 | - -#Endpoint para verificar que el token ya no existe -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | - - -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | - +@ProcessMakerMichelangelo @RestAPI +Feature: Generate token Grant type - Implicit Grant +Requirements: + a workspace with installed application + + +Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET + Given OAUTH request implicit grant + """ + { + "response_type":"", + "client_id":"", + "scope":"", + "implicit_grant_number":"" + } + """ + Examples: + | Description | implicit_grant_number | response_type | client_id | scope | + | Create token normal | 1 | token | x-pm-local-client | * | + | Create token normal | 2 | token | x-pm-local-client | * | + + +#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases +Scenario Outline: Returns a list of the cases for the logged in user (Inbox) + Given that I assign an access token from session variable "access_token_" + And I request "cases" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has 14 records + + Examples: + | Description | implicit_grant_number | + | Create token normal | 1 | + | Create token normal | 2 | + +#Endpoint para hacer que expire los token creados en este script +Scenario Outline: Expire token created in this script + Given POST this data: + """ + { + } + """ + And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" + Then the response status code should be 200 + + Examples: + | Description | application_number | + | Expire token 1 | 1 | + + +Scenario Outline: Expire token created in this script + Given POST this data: + """ + { + } + """ + And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" + Then the response status code should be 200 + + Examples: + | Description | application_number | + | Expire token 2 | 2 | + + +#Endpoint para verificar que el token haya expirado +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | + + +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | + + +#Endpoint para borrar el token creado en este script + +Scenario Outline: Delete all tokens created previously in this script + Given that I want to delete a resource with the key "access_token_" stored in session array + And I request "oauth2" + 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: + + | application_number | + | 1 | + | 2 | + +#Endpoint para verificar que el token ya no existe +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | + + +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | + diff --git a/features/backend/oauth/main_tests_resources_owner_password_credentials.feature b/features/backend/oauth/authorization_code/main_tests_resources_owner_password_credentials.feature similarity index 97% rename from features/backend/oauth/main_tests_resources_owner_password_credentials.feature rename to features/backend/oauth/authorization_code/main_tests_resources_owner_password_credentials.feature index de1c448d5..e928cc608 100644 --- a/features/backend/oauth/main_tests_resources_owner_password_credentials.feature +++ b/features/backend/oauth/authorization_code/main_tests_resources_owner_password_credentials.feature @@ -1,139 +1,139 @@ -@ProcessMakerMichelangelo @RestAPI -Feature: Generate token Grant type - Resources Owner Password Credential Grant -Requirements: - a workspace with installed application - - -Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET - Given POST this data: - """ - { - "grant_type":"", - "username":"", - "password":"", - "scope":"" - } - """ - And I request a owner password credential grant - Then the response status code should be 200 - And the response charset is "UTF-8" - And the content type is "application/json" - And the type is "object" - And store "access_token" in session array as variable "access_token_" - And store "expires_in" in session array as variable "expires_in_" - And store "token_type" in session array as variable "token_type_" - And store "scope" in session array as variable "scope_" - And store "refresh_token" in session array as variable "refresh_token_" - - - Examples: - | Description | grant_number | grant_type | username | password | scope | - | Create token normal | 1 | password | amy | sample | * | - | Create token normal | 2 | password | admin | sample123* | * | - - -#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases -Scenario Outline: Returns a list of the cases for the logged in user (Inbox) - Given that I assign an access token from session variable "access_token_" - And I request "cases" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the type is "array" - And the response has records - - Examples: - | Description | grant_number | records | - | Create token normal | 1 | 4 | - | Create token normal | 2 | 14 | - - -#Endpoint para hacer que expire los token creados en este script -Scenario Outline: Expire token created in this script - Given POST this data: - """ - { - } - """ - And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" - Then the response status code should be 200 - - Examples: - | Description | application_number | - | Expire token 1 | 1 | - - -Scenario Outline: Expire token created in this script - Given POST this data: - """ - { - } - """ - And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" - Then the response status code should be 200 - - Examples: - | Description | application_number | - | Expire token 2 | 2 | - - -#Endpoint para verificar que el token haya expirado -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | - - -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | - - -#Endpoint para borrar el token creado en este script - -Scenario Outline: Delete all tokens created previously in this script - Given that I want to delete a resource with the key "access_token_" stored in session array - And I request "oauth2" - 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: - - | application_number | - | 1 | - | 2 | - -#Endpoint para verificar que el token ya no existe -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | - - -Scenario Outline: Get the Output Documents List both process - Given that I assign an access token from session variable "access_token_" - And I request "project//output-documents" - Then the response status code should be 401 - And the response status message should have the following text "" - - Examples: - | test_description | project | records | out_doc_title | application_number | error_message | - | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | - +@ProcessMakerMichelangelo @RestAPI +Feature: Generate token Grant type - Resources Owner Password Credential Grant +Requirements: + a workspace with installed application + + +Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET + Given POST this data: + """ + { + "grant_type":"", + "username":"", + "password":"", + "scope":"" + } + """ + And I request a owner password credential grant + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/json" + And the type is "object" + And store "access_token" in session array as variable "access_token_" + And store "expires_in" in session array as variable "expires_in_" + And store "token_type" in session array as variable "token_type_" + And store "scope" in session array as variable "scope_" + And store "refresh_token" in session array as variable "refresh_token_" + + + Examples: + | Description | grant_number | grant_type | username | password | scope | + | Create token normal | 1 | password | amy | sample | * | + | Create token normal | 2 | password | admin | sample123* | * | + + +#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases +Scenario Outline: Returns a list of the cases for the logged in user (Inbox) + Given that I assign an access token from session variable "access_token_" + And I request "cases" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "array" + And the response has records + + Examples: + | Description | grant_number | records | + | Create token normal | 1 | 4 | + | Create token normal | 2 | 14 | + + +#Endpoint para hacer que expire los token creados en este script +Scenario Outline: Expire token created in this script + Given POST this data: + """ + { + } + """ + And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" + Then the response status code should be 200 + + Examples: + | Description | application_number | + | Expire token 1 | 1 | + + +Scenario Outline: Expire token created in this script + Given POST this data: + """ + { + } + """ + And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_" + Then the response status code should be 200 + + Examples: + | Description | application_number | + | Expire token 2 | 2 | + + +#Endpoint para verificar que el token haya expirado +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | + + +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | + + +#Endpoint para borrar el token creado en este script + +Scenario Outline: Delete all tokens created previously in this script + Given that I want to delete a resource with the key "access_token_" stored in session array + And I request "oauth2" + 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: + + | application_number | + | 1 | + | 2 | + +#Endpoint para verificar que el token ya no existe +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized | + + +Scenario Outline: Get the Output Documents List both process + Given that I assign an access token from session variable "access_token_" + And I request "project//output-documents" + Then the response status code should be 401 + And the response status message should have the following text "" + + Examples: + | test_description | project | records | out_doc_title | application_number | error_message | + | List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized | + diff --git a/features/backend/projects/project_export_import/main_tests_project_export_import.feature b/features/backend/projects/project_export_import/main_tests_project_export_import.feature.bak similarity index 98% rename from features/backend/projects/project_export_import/main_tests_project_export_import.feature rename to features/backend/projects/project_export_import/main_tests_project_export_import.feature.bak index af0f471f3..de8a3b9d2 100644 --- a/features/backend/projects/project_export_import/main_tests_project_export_import.feature +++ b/features/backend/projects/project_export_import/main_tests_project_export_import.feature.bak @@ -1,575 +1,575 @@ -@ProcessMakerMichelangelo @RestAPI -Feature: Import/Export Process Main Tests - Requirements: - a workspace without the project 1455892245368ebeb11c1a5001393784 ("Process Complete BPMN", "Export process empty") already loaded - there are many activities, steps, triggers, pmtables, asignee, process supervisor, process permissions, etc. in the process - -Background: - Given that I have a valid access_token - - -#Verificar cantidad de dynaform, output, inputs, triggers, asignacion de usuarios, etc. del proyecto "Process Complete BPMN" - -Scenario: Get a List DynaForms of a Project Process Complete BPMN - Given I request "project/1455892245368ebeb11c1a5001393784/dynaforms" - 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 "array" - And the response has 26 records - - Scenario: Get the Input Documents List when there are exactly zero input documents - Given I request "project/1455892245368ebeb11c1a5001393784/input-documents" - 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 "array" - And the response has 1 records - -Scenario: Get the Output Documents List when there are exactly two output documents " BUG-14907, No se visualiza los cambios en el editor tiny de OutputDocuments" - Given I request "project/1455892245368ebeb11c1a5001393784/output-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 that "out_doc_template" is set to "Ejemplo de Output Document" - And the response has 1 records - -Scenario: Get the Triggers List when there are exactly two triggers - Given I request "project/1455892245368ebeb11c1a5001393784/triggers" - 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 3 records - -Scenario Outline: List assignees of each activity - Given I request "project/1455892245368ebeb11c1a5001393784/activity//assignee" - 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 - And the "aas_uid" property in row 0 equals "" - And the "aas_type" property in row 0 equals "" - - Examples: - | test_description | project | activity | records | aas_uid | aas_type | - | Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group | - | Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | 1 | 70084316152d56749e0f393054862525 | group | - -Scenario: Get a List of current process supervisors of a project - Given I request "project/1455892245368ebeb11c1a5001393784/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 1 records - -Scenario: Get a List of current Process Permissions of a project - Given I request "project/1455892245368ebeb11c1a5001393784/process-permissions" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the response has 1 record - -Scenario: Get a list templates folder of process files manager - Given I request "project/1455892245368ebeb11c1a5001393784/file-manager?path=templates" - 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: Verify that there are report tables - Given I request "project/1455892245368ebeb11c1a5001393784/report-tables" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the response has 1 record - -Scenario: Get the Case Trackers Objects of a Project - And I request "project/1455892245368ebeb11c1a5001393784/case-tracker/objects" - 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 "array" - And the response has 1 record - -Scenario: Get a single Process - Given that I want to get a resource with the key "obj_uid" stored in session array - And I request "project/1455892245368ebeb11c1a5001393784/process" - And the content type is "application/json" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the type is "object" - And that "pro_title" is set to "Process Complete BPMN" - And that "pro_description" is set to "" - And that "pro_parent" is set to "1455892245368ebeb11c1a5001393784" - And that "pro_time" is set to 1 - And that "pro_timeunit" is set to "DAYS" - And that "pro_status" is set to "ACTIVE" - And that "pro_type_day" is set to "" - And that "pro_type" is set to "NORMAL" - And that "pro_assignment" is set to 0 - And that "pro_show_map" is set to 0 - And that "pro_show_message" is set to 1 - And that "pro_subprocess" is set to 0 - And that "pro_tri_deleted" is set to "712197294536bea56a8b4d0014148679" - And that "pro_tri_canceled" is set to "950769923536bea6a39c833033416052" - And that "pro_tri_paused" is set to "350949312536bea73c53791057971272" - And that "pro_tri_reassigned" is set to "712197294536bea56a8b4d0014148679" - And that "pro_show_delegate" is set to 0 - And that "pro_show_dynaform" is set to 0 - And that "pro_category" is set to "4177095085330818c324501061677193" - And that "pro_sub_category" is set to "" - And that "pro_industry" is set to 0 - And that "pro_update_date" is set to "null" - And that "pro_create_date" is set to "2014-05-06 10:04:27" - And that "pro_create_user" is set to "00000000000000000000000000000001" - And that "pro_debug" is set to 0 - And that "pro_derivation_screen_tpl" is set to "" - And that "pro_summary_dynaform" is set to "898822326536be3a12addb0034537553" - And that "pro_calendar" is set to "14606161052f50839307899033145440" - -#Export Process - -Scenario: Get for Export Project - Given I request "project/1455892245368ebeb11c1a5001393784/export" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the content type is "application/xml" - And save exported process to "/" as "Process_Complete_BPMN" - - -Scenario: Delete a Project created previously in this script - Given that I want to delete a resource with the key "prj_uid" stored in session array - And I request "projects/1455892245368ebeb11c1a5001393784" - 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" - -#Import Process - -Scenario Outline: Import a process - Given POST upload a project file "" to "project/import?option=&option_group=merge" - 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 "prj_uid" in session array as variable "prj_uid_" - - - Examples: - | project_file | import_option | prj_uid_number | - | Process_NewCreate_BPMN.pmx | create | 1 | - | Process_Complete_BPMN.pmx | create | 2 | - | Process_Complete_BPMN.pmx | overwrite | 3 | - | Process_Complete_BPMN.pmx | disable | 4 | - | Process_Complete_BPMN.pmx | keep | 5 | - | Test_Event_without_name.pmx | create | 6 | - -#Verificar que se hayan exportado los eventos de forma correcta - -Scenario: Get a single Process process "Test_Event_without_name.pmx" - Given that I want to get a resource with the key "prj_uid" stored in session array as variable "prj_uid_" - And I request "project/601816709536cfeae7d7cd9079578104/process" - And the content type is "application/json" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the type is "object" - And that "prj_name" is set to "Test Event without name" - And that "evn_uid" is set to "51368855353d127b52c8904071509317" - And that "evn_name" is set to "" - And that "evn_uid" is set to "89601044553d127b52634d4017150624" - And that "evn_name" is set to "" - And that "flo_element_origin" is set to "89601044553d127b52634d4017150624" - - - -#Verificar cantidad de dynaform, output, inputs, triggers, asignacion de usuarios, etc. - -Scenario Outline: Get a List DynaForms of a Project Process Complete BPMN - Given I request "project/prj_uid/dynaforms" with the key "prj_uid" stored in session array as variable "prj_uid_" - 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 "array" - And the response has records - - Examples: - | import_option | prj_uid_number | prj_uid | records | - | create | 1 | 601816709536cfeae7d7cd9079578104 | 4 | - | create | 2 | 1455892245368ebeb11c1a5001393784 | 26 | - | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 26 | - | disable | 4 | 1455892245368ebeb11c1a5001393784 | 26 | - | keep | 5 | 1455892245368ebeb11c1a5001393784 | 26 | - - -Scenario Outline: Get the Input Documents List when there are exactly zero input documents - Given I request "project/prj_uid/input-documents" with the key "prj_uid" stored in session array as variable "prj_uid_" - 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 "array" - And the response has records - - Examples: - | import_option | prj_uid_number | prj_uid | records | - | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | - | create | 2 | 1455892245368ebeb11c1a5001393784 | 1 | - | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 1 | - | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | - | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | - - -Scenario Outline: Get the Output Documents List when there are exactly two output documents - Given I request "project/prj_uid/output-documents" with the key "prj_uid" stored in session array as variable "prj_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 "array" - And the response has records - - Examples: - | import_option | prj_uid_number | prj_uid | records | - | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | - | create | 2 | 1455892245368ebeb11c1a5001393784 | 1 | - | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 1 | - | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | - | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | - - -Scenario Outline: Get the Triggers List when there are exactly two triggers - Given I request "project/prj_uid/triggers" with the key "prj_uid" stored in session array as variable "prj_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 "array" - And the response has records - - Examples: - | import_option | prj_uid_number | prj_uid | records | - | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | - | create | 2 | 1455892245368ebeb11c1a5001393784 | 3 | - | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 3 | - | disable | 4 | 1455892245368ebeb11c1a5001393784 | 3 | - | keep | 5 | 1455892245368ebeb11c1a5001393784 | 3 | - - -Scenario Outline: List assignees of each activity - Given I request "project/prj_uid/activity//assignee" with the key "prj_uid" stored in session array as variable "prj_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 "array" - And the response has records - And the "aas_uid" property in row 0 equals "" - And the "aas_type" property in row 0 equals "" - - Examples: - | import_option | prj_uid_number | prj_uid | records | project | activity | records | aas_uid | aas_type | - | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | 601816709536cfeae7d7cd9079578104 | 771350954536cfec446fab9019867857 | 1 | 70084316152d56749e0f393054862525 | group | - | create | 2 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group | - | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group | - | disable | 4 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | 1 | 70084316152d56749e0f393054862525 | group | - | keep | 5 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 2072984565368efc137a394001073529 | 1 | 70084316152d56749e0f393054862525 | group | - - -Scenario Outline: Get a List of current process supervisors of a project - Given I request "project/prj_uid/process-supervisors" with the key "prj_uid" stored in session array as variable "prj_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 "array" - And the response has records - - Examples: - | import_option | prj_uid_number | prj_uid | records | - | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | - | create | 2 | 1455892245368ebeb11c1a5001393784 | 1 | - | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 1 | - | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | - | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | - - -Scenario Outline: Get a List of current Process Permissions of a project - Given I request "project/prj_uid/process-permissions" with the key "prj_uid" stored in session array as variable "prj_uid_" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the response has records - - Examples: - | import_option | prj_uid_number | prj_uid | records | - | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | - | create | 2 | 1455892245368ebeb11c1a5001393784 | 1 | - | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 1 | - | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | - | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | - - -Scenario Outline: Get a list templates folder of process files manager - Given I request "project/prj_uid/file-manager?path=templates" with the key "prj_uid" stored in session array as variable "prj_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 "array" - And the response has records - - Examples: - | import_option | prj_uid_number | prj_uid | records | - | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | - | create | 2 | 1455892245368ebeb11c1a5001393784 | 2 | - | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 2 | - | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | - | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | - - -Scenario: Get a single Process process "Process Complete BPMN" - Given that I want to get a resource with the key "obj_uid" stored in session array - And I request "project/1455892245368ebeb11c1a5001393784/process" - And the content type is "application/json" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the type is "object" - And that "pro_title" is set to "Process Complete BPMN" - And that "pro_description" is set to "" - And that "pro_parent" is set to "1455892245368ebeb11c1a5001393784" - And that "pro_time" is set to 1 - And that "pro_timeunit" is set to "DAYS" - And that "pro_status" is set to "ACTIVE" - And that "pro_type_day" is set to "" - And that "pro_type" is set to "NORMAL" - And that "pro_assignment" is set to 0 - And that "pro_show_map" is set to 0 - And that "pro_show_message" is set to 1 - And that "pro_subprocess" is set to 0 - And that "pro_tri_deleted" is set to "712197294536bea56a8b4d0014148679" - And that "pro_tri_canceled" is set to "950769923536bea6a39c833033416052" - And that "pro_tri_paused" is set to "350949312536bea73c53791057971272" - And that "pro_tri_reassigned" is set to "712197294536bea56a8b4d0014148679" - And that "pro_show_delegate" is set to 0 - And that "pro_show_dynaform" is set to 0 - And that "pro_category" is set to "4177095085330818c324501061677193" - And that "pro_sub_category" is set to "" - And that "pro_industry" is set to 0 - And that "pro_update_date" is set to "null" - And that "pro_create_date" is set to "2014-05-06 10:04:27" - And that "pro_create_user" is set to "00000000000000000000000000000001" - And that "pro_debug" is set to 0 - And that "pro_derivation_screen_tpl" is set to "" - And that "pro_summary_dynaform" is set to "898822326536be3a12addb0034537553" - And that "pro_calendar" is set to "14606161052f50839307899033145440" - - -Scenario: Get a single Process process "Process NewCreate BPMN" - Given that I want to get a resource with the key "obj_uid" stored in session array - And I request "project/601816709536cfeae7d7cd9079578104/process" - And the content type is "application/json" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the type is "object" - And that "pro_title" is set to "Process NewCreate BPMN" - And that "pro_description" is set to "" - And that "pro_parent" is set to "601816709536cfeae7d7cd9079578104" - And that "pro_time" is set to 1 - And that "pro_timeunit" is set to "DAYS" - And that "pro_status" is set to "ACTIVE" - And that "pro_type_day" is set to "" - And that "pro_type" is set to "NORMAL" - And that "pro_assignment" is set to 0 - And that "pro_show_map" is set to 0 - And that "pro_show_message" is set to 0 - And that "pro_subprocess" is set to 0 - And that "pro_tri_deleted" is set to "" - And that "pro_tri_canceled" is set to "" - And that "pro_tri_paused" is set to "" - And that "pro_tri_reassigned" is set to "" - And that "pro_show_delegate" is set to 0 - And that "pro_show_dynaform" is set to 0 - And that "pro_category" is set to "" - And that "pro_sub_category" is set to "" - And that "pro_industry" is set to 0 - And that "pro_update_date" is set to "null" - And that "pro_create_date" is set to "2014-05-12 09:10:23" - And that "pro_create_user" is set to "00000000000000000000000000000001" - And that "pro_debug" is set to 0 - And that "pro_derivation_screen_tpl" is set to "" - And that "pro_summary_dynaform" is set to "" - And that "pro_calendar" is set to "" - - -Scenario Outline: Delete a Project created previously in this script - Given that I want to delete a resource with the key "prj_uid" stored in session array as variable "prj_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: - - | prj_uid_number | - | 1 | - | 2 | - | 4 | - | 5 | - | 6 | - - -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: Import a process - Given POST upload a project file "" to "project/import?option=" - 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: - | project_file | import_option | - | Process_Complete_BPMN.pmx | create | - - -#For example, to export a empty process - -Scenario: Get for Export Project "Export process empty" - Given I request "project/5195971265375127fce82f4015927137/export" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the content type is "application/xml" - And save exported process to "/" as "Export process empty" - -Scenario: Delete a Project created previously in this script "Export process empty" - Given that I want to delete a resource with the key "prj_uid" stored in session array - And I request "projects/5195971265375127fce82f4015927137" - 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" - -Scenario: Import a process "Export process empty" - Given POST upload a project file "Export_process_empty.pmx" to "project/import?option=create" - 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" - -Scenario: Get a List DynaForms of a Project "Export process empty" - Given I request "project/5195971265375127fce82f4015927137/dynaforms" with the key "prj_uid" stored in session array - 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 "array" - And the response has 0 records - -Scenario: Get the Input Documents List when there are exactly zero input documents - Given I request "project/5195971265375127fce82f4015927137/input-documents" with the key "prj_uid" stored in session array - 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 "array" - And the response has 0 records - -Scenario: Get the Output Documents List when there are exactly zero output documents - Given I request "project/5195971265375127fce82f4015927137/output-documents" with the key "prj_uid" stored in session array - 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 0 records - -Scenario: Verify that there are report tables - Given I request "project/5195971265375127fce82f4015927137/report-tables" - Then the response status code should be 200 - And the response charset is "UTF-8" - And the response has 0 record - -Scenario: Get the Case Trackers Objects of a Project - And I request "project/5195971265375127fce82f4015927137/case-tracker/objects" - 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 "array" - And the response has 0 record - - - -#Revision del BUG xxxx, donde no permite crear un nuevo Output Document - -Scenario Outline: Create 17 new Output Documents - Given POST this data: - """ - { - "out_doc_title": "Output Document", - "out_doc_description": "", - "out_doc_filename": "Output Document", - "out_doc_template": "Example", - "out_doc_report_generator": "TCPDF", - "out_doc_landscape": "1", - "out_doc_media": "Letter", - "out_doc_left_margin": "30", - "out_doc_right_margin": "30", - "out_doc_top_margin": "30", - "out_doc_bottom_margin": "30", - "out_doc_generate": "DOC", - "out_doc_type": "HTML", - "out_doc_versioning": "0", - "out_doc_destination_path": "", - "out_doc_tags": "", - "out_doc_pdf_security_enabled": "0", - "out_doc_pdf_security_open_password": "", - "out_doc_pdf_security_owner_password": "", - "out_doc_pdf_security_permissions": "" - } - """ - And I request "project/5195971265375127fce82f4015927137/output-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 "out_doc_uid" in session array as variable "out_doc_uid_" - - Examples: - - | test_description | out_doc_number | - | Create new output document with same name in other proyect | 1 | - - -Scenario: Get the Output Documents List when there are exactly zero output documents - Given I request "project/5195971265375127fce82f4015927137/output-documents" with the key "prj_uid" stored in session array - 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 - And that "out_doc_title" is set to "Output Document" - And that "out_doc_filename" is set to "Output Document" - -Scenario Outline: Delete Output documents created previously in this script - Given that I want to delete a resource with the key "out_doc_uid" stored in session array as variable "out_doc_uid_" - And I request "project/5195971265375127fce82f4015927137/output-document" - 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: - - | out_doc_number | - | 1 | - -Scenario: Get the Output Documents List when there are exactly zero output documents - Given I request "project/5195971265375127fce82f4015927137/output-documents" with the key "prj_uid" stored in session array - 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 0 records - +@ProcessMakerMichelangelo @RestAPI +Feature: Import/Export Process Main Tests + Requirements: + a workspace without the project 1455892245368ebeb11c1a5001393784 ("Process Complete BPMN", "Export process empty") already loaded + there are many activities, steps, triggers, pmtables, asignee, process supervisor, process permissions, etc. in the process + +Background: + Given that I have a valid access_token + + +#Verificar cantidad de dynaform, output, inputs, triggers, asignacion de usuarios, etc. del proyecto "Process Complete BPMN" + +Scenario: Get a List DynaForms of a Project Process Complete BPMN + Given I request "project/1455892245368ebeb11c1a5001393784/dynaforms" + 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 "array" + And the response has 26 records + + Scenario: Get the Input Documents List when there are exactly zero input documents + Given I request "project/1455892245368ebeb11c1a5001393784/input-documents" + 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 "array" + And the response has 1 records + +Scenario: Get the Output Documents List when there are exactly two output documents " BUG-14907, No se visualiza los cambios en el editor tiny de OutputDocuments" + Given I request "project/1455892245368ebeb11c1a5001393784/output-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 that "out_doc_template" is set to "Ejemplo de Output Document" + And the response has 1 records + +Scenario: Get the Triggers List when there are exactly two triggers + Given I request "project/1455892245368ebeb11c1a5001393784/triggers" + 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 3 records + +Scenario Outline: List assignees of each activity + Given I request "project/1455892245368ebeb11c1a5001393784/activity//assignee" + 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 + And the "aas_uid" property in row 0 equals "" + And the "aas_type" property in row 0 equals "" + + Examples: + | test_description | project | activity | records | aas_uid | aas_type | + | Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group | + | Verify that the activity has expected quantity of asignees | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | 1 | 70084316152d56749e0f393054862525 | group | + +Scenario: Get a List of current process supervisors of a project + Given I request "project/1455892245368ebeb11c1a5001393784/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 1 records + +Scenario: Get a List of current Process Permissions of a project + Given I request "project/1455892245368ebeb11c1a5001393784/process-permissions" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the response has 1 record + +Scenario: Get a list templates folder of process files manager + Given I request "project/1455892245368ebeb11c1a5001393784/file-manager?path=templates" + 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: Verify that there are report tables + Given I request "project/1455892245368ebeb11c1a5001393784/report-tables" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the response has 1 record + +Scenario: Get the Case Trackers Objects of a Project + And I request "project/1455892245368ebeb11c1a5001393784/case-tracker/objects" + 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 "array" + And the response has 1 record + +Scenario: Get a single Process + Given that I want to get a resource with the key "obj_uid" stored in session array + And I request "project/1455892245368ebeb11c1a5001393784/process" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And that "pro_title" is set to "Process Complete BPMN" + And that "pro_description" is set to "" + And that "pro_parent" is set to "1455892245368ebeb11c1a5001393784" + And that "pro_time" is set to 1 + And that "pro_timeunit" is set to "DAYS" + And that "pro_status" is set to "ACTIVE" + And that "pro_type_day" is set to "" + And that "pro_type" is set to "NORMAL" + And that "pro_assignment" is set to 0 + And that "pro_show_map" is set to 0 + And that "pro_show_message" is set to 1 + And that "pro_subprocess" is set to 0 + And that "pro_tri_deleted" is set to "712197294536bea56a8b4d0014148679" + And that "pro_tri_canceled" is set to "950769923536bea6a39c833033416052" + And that "pro_tri_paused" is set to "350949312536bea73c53791057971272" + And that "pro_tri_reassigned" is set to "712197294536bea56a8b4d0014148679" + And that "pro_show_delegate" is set to 0 + And that "pro_show_dynaform" is set to 0 + And that "pro_category" is set to "4177095085330818c324501061677193" + And that "pro_sub_category" is set to "" + And that "pro_industry" is set to 0 + And that "pro_update_date" is set to "null" + And that "pro_create_date" is set to "2014-05-06 10:04:27" + And that "pro_create_user" is set to "00000000000000000000000000000001" + And that "pro_debug" is set to 0 + And that "pro_derivation_screen_tpl" is set to "" + And that "pro_summary_dynaform" is set to "898822326536be3a12addb0034537553" + And that "pro_calendar" is set to "14606161052f50839307899033145440" + +#Export Process + +Scenario: Get for Export Project + Given I request "project/1455892245368ebeb11c1a5001393784/export" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/xml" + And save exported process to "/" as "Process_Complete_BPMN" + + +Scenario: Delete a Project created previously in this script + Given that I want to delete a resource with the key "prj_uid" stored in session array + And I request "projects/1455892245368ebeb11c1a5001393784" + 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" + +#Import Process + +Scenario Outline: Import a process + Given POST upload a project file "" to "project/import?option=&option_group=merge" + 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 "prj_uid" in session array as variable "prj_uid_" + + + Examples: + | project_file | import_option | prj_uid_number | + | Process_NewCreate_BPMN.pmx | create | 1 | + | Process_Complete_BPMN.pmx | create | 2 | + | Process_Complete_BPMN.pmx | overwrite | 3 | + | Process_Complete_BPMN.pmx | disable | 4 | + | Process_Complete_BPMN.pmx | keep | 5 | + | Test_Event_without_name.pmx | create | 6 | + +#Verificar que se hayan exportado los eventos de forma correcta + +Scenario: Get a single Process process "Test_Event_without_name.pmx" + Given that I want to get a resource with the key "prj_uid" stored in session array as variable "prj_uid_" + And I request "project/601816709536cfeae7d7cd9079578104/process" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And that "prj_name" is set to "Test Event without name" + And that "evn_uid" is set to "51368855353d127b52c8904071509317" + And that "evn_name" is set to "" + And that "evn_uid" is set to "89601044553d127b52634d4017150624" + And that "evn_name" is set to "" + And that "flo_element_origin" is set to "89601044553d127b52634d4017150624" + + + +#Verificar cantidad de dynaform, output, inputs, triggers, asignacion de usuarios, etc. + +Scenario Outline: Get a List DynaForms of a Project Process Complete BPMN + Given I request "project/prj_uid/dynaforms" with the key "prj_uid" stored in session array as variable "prj_uid_" + 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 "array" + And the response has records + + Examples: + | import_option | prj_uid_number | prj_uid | records | + | create | 1 | 601816709536cfeae7d7cd9079578104 | 4 | + | create | 2 | 1455892245368ebeb11c1a5001393784 | 26 | + | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 26 | + | disable | 4 | 1455892245368ebeb11c1a5001393784 | 26 | + | keep | 5 | 1455892245368ebeb11c1a5001393784 | 26 | + + +Scenario Outline: Get the Input Documents List when there are exactly zero input documents + Given I request "project/prj_uid/input-documents" with the key "prj_uid" stored in session array as variable "prj_uid_" + 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 "array" + And the response has records + + Examples: + | import_option | prj_uid_number | prj_uid | records | + | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | + | create | 2 | 1455892245368ebeb11c1a5001393784 | 1 | + | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 1 | + | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | + | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | + + +Scenario Outline: Get the Output Documents List when there are exactly two output documents + Given I request "project/prj_uid/output-documents" with the key "prj_uid" stored in session array as variable "prj_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 "array" + And the response has records + + Examples: + | import_option | prj_uid_number | prj_uid | records | + | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | + | create | 2 | 1455892245368ebeb11c1a5001393784 | 1 | + | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 1 | + | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | + | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | + + +Scenario Outline: Get the Triggers List when there are exactly two triggers + Given I request "project/prj_uid/triggers" with the key "prj_uid" stored in session array as variable "prj_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 "array" + And the response has records + + Examples: + | import_option | prj_uid_number | prj_uid | records | + | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | + | create | 2 | 1455892245368ebeb11c1a5001393784 | 3 | + | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 3 | + | disable | 4 | 1455892245368ebeb11c1a5001393784 | 3 | + | keep | 5 | 1455892245368ebeb11c1a5001393784 | 3 | + + +Scenario Outline: List assignees of each activity + Given I request "project/prj_uid/activity//assignee" with the key "prj_uid" stored in session array as variable "prj_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 "array" + And the response has records + And the "aas_uid" property in row 0 equals "" + And the "aas_type" property in row 0 equals "" + + Examples: + | import_option | prj_uid_number | prj_uid | records | project | activity | records | aas_uid | aas_type | + | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | 601816709536cfeae7d7cd9079578104 | 771350954536cfec446fab9019867857 | 1 | 70084316152d56749e0f393054862525 | group | + | create | 2 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group | + | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | 1 | 70084316152d56749e0f393054862525 | group | + | disable | 4 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | 1 | 70084316152d56749e0f393054862525 | group | + | keep | 5 | 1455892245368ebeb11c1a5001393784 | 26 | 1455892245368ebeb11c1a5001393784 | 2072984565368efc137a394001073529 | 1 | 70084316152d56749e0f393054862525 | group | + + +Scenario Outline: Get a List of current process supervisors of a project + Given I request "project/prj_uid/process-supervisors" with the key "prj_uid" stored in session array as variable "prj_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 "array" + And the response has records + + Examples: + | import_option | prj_uid_number | prj_uid | records | + | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | + | create | 2 | 1455892245368ebeb11c1a5001393784 | 1 | + | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 1 | + | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | + | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | + + +Scenario Outline: Get a List of current Process Permissions of a project + Given I request "project/prj_uid/process-permissions" with the key "prj_uid" stored in session array as variable "prj_uid_" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the response has records + + Examples: + | import_option | prj_uid_number | prj_uid | records | + | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | + | create | 2 | 1455892245368ebeb11c1a5001393784 | 1 | + | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 1 | + | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | + | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | + + +Scenario Outline: Get a list templates folder of process files manager + Given I request "project/prj_uid/file-manager?path=templates" with the key "prj_uid" stored in session array as variable "prj_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 "array" + And the response has records + + Examples: + | import_option | prj_uid_number | prj_uid | records | + | create | 1 | 601816709536cfeae7d7cd9079578104 | 0 | + | create | 2 | 1455892245368ebeb11c1a5001393784 | 2 | + | overwrite | 3 | 1455892245368ebeb11c1a5001393784 | 2 | + | disable | 4 | 1455892245368ebeb11c1a5001393784 | 1 | + | keep | 5 | 1455892245368ebeb11c1a5001393784 | 1 | + + +Scenario: Get a single Process process "Process Complete BPMN" + Given that I want to get a resource with the key "obj_uid" stored in session array + And I request "project/1455892245368ebeb11c1a5001393784/process" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And that "pro_title" is set to "Process Complete BPMN" + And that "pro_description" is set to "" + And that "pro_parent" is set to "1455892245368ebeb11c1a5001393784" + And that "pro_time" is set to 1 + And that "pro_timeunit" is set to "DAYS" + And that "pro_status" is set to "ACTIVE" + And that "pro_type_day" is set to "" + And that "pro_type" is set to "NORMAL" + And that "pro_assignment" is set to 0 + And that "pro_show_map" is set to 0 + And that "pro_show_message" is set to 1 + And that "pro_subprocess" is set to 0 + And that "pro_tri_deleted" is set to "712197294536bea56a8b4d0014148679" + And that "pro_tri_canceled" is set to "950769923536bea6a39c833033416052" + And that "pro_tri_paused" is set to "350949312536bea73c53791057971272" + And that "pro_tri_reassigned" is set to "712197294536bea56a8b4d0014148679" + And that "pro_show_delegate" is set to 0 + And that "pro_show_dynaform" is set to 0 + And that "pro_category" is set to "4177095085330818c324501061677193" + And that "pro_sub_category" is set to "" + And that "pro_industry" is set to 0 + And that "pro_update_date" is set to "null" + And that "pro_create_date" is set to "2014-05-06 10:04:27" + And that "pro_create_user" is set to "00000000000000000000000000000001" + And that "pro_debug" is set to 0 + And that "pro_derivation_screen_tpl" is set to "" + And that "pro_summary_dynaform" is set to "898822326536be3a12addb0034537553" + And that "pro_calendar" is set to "14606161052f50839307899033145440" + + +Scenario: Get a single Process process "Process NewCreate BPMN" + Given that I want to get a resource with the key "obj_uid" stored in session array + And I request "project/601816709536cfeae7d7cd9079578104/process" + And the content type is "application/json" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the type is "object" + And that "pro_title" is set to "Process NewCreate BPMN" + And that "pro_description" is set to "" + And that "pro_parent" is set to "601816709536cfeae7d7cd9079578104" + And that "pro_time" is set to 1 + And that "pro_timeunit" is set to "DAYS" + And that "pro_status" is set to "ACTIVE" + And that "pro_type_day" is set to "" + And that "pro_type" is set to "NORMAL" + And that "pro_assignment" is set to 0 + And that "pro_show_map" is set to 0 + And that "pro_show_message" is set to 0 + And that "pro_subprocess" is set to 0 + And that "pro_tri_deleted" is set to "" + And that "pro_tri_canceled" is set to "" + And that "pro_tri_paused" is set to "" + And that "pro_tri_reassigned" is set to "" + And that "pro_show_delegate" is set to 0 + And that "pro_show_dynaform" is set to 0 + And that "pro_category" is set to "" + And that "pro_sub_category" is set to "" + And that "pro_industry" is set to 0 + And that "pro_update_date" is set to "null" + And that "pro_create_date" is set to "2014-05-12 09:10:23" + And that "pro_create_user" is set to "00000000000000000000000000000001" + And that "pro_debug" is set to 0 + And that "pro_derivation_screen_tpl" is set to "" + And that "pro_summary_dynaform" is set to "" + And that "pro_calendar" is set to "" + + +Scenario Outline: Delete a Project created previously in this script + Given that I want to delete a resource with the key "prj_uid" stored in session array as variable "prj_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: + + | prj_uid_number | + | 1 | + | 2 | + | 4 | + | 5 | + | 6 | + + +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: Import a process + Given POST upload a project file "" to "project/import?option=" + 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: + | project_file | import_option | + | Process_Complete_BPMN.pmx | create | + + +#For example, to export a empty process + +Scenario: Get for Export Project "Export process empty" + Given I request "project/5195971265375127fce82f4015927137/export" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the content type is "application/xml" + And save exported process to "/" as "Export process empty" + +Scenario: Delete a Project created previously in this script "Export process empty" + Given that I want to delete a resource with the key "prj_uid" stored in session array + And I request "projects/5195971265375127fce82f4015927137" + 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" + +Scenario: Import a process "Export process empty" + Given POST upload a project file "Export_process_empty.pmx" to "project/import?option=create" + 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" + +Scenario: Get a List DynaForms of a Project "Export process empty" + Given I request "project/5195971265375127fce82f4015927137/dynaforms" with the key "prj_uid" stored in session array + 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 "array" + And the response has 0 records + +Scenario: Get the Input Documents List when there are exactly zero input documents + Given I request "project/5195971265375127fce82f4015927137/input-documents" with the key "prj_uid" stored in session array + 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 "array" + And the response has 0 records + +Scenario: Get the Output Documents List when there are exactly zero output documents + Given I request "project/5195971265375127fce82f4015927137/output-documents" with the key "prj_uid" stored in session array + 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 0 records + +Scenario: Verify that there are report tables + Given I request "project/5195971265375127fce82f4015927137/report-tables" + Then the response status code should be 200 + And the response charset is "UTF-8" + And the response has 0 record + +Scenario: Get the Case Trackers Objects of a Project + And I request "project/5195971265375127fce82f4015927137/case-tracker/objects" + 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 "array" + And the response has 0 record + + + +#Revision del BUG xxxx, donde no permite crear un nuevo Output Document + +Scenario Outline: Create 17 new Output Documents + Given POST this data: + """ + { + "out_doc_title": "Output Document", + "out_doc_description": "", + "out_doc_filename": "Output Document", + "out_doc_template": "Example", + "out_doc_report_generator": "TCPDF", + "out_doc_landscape": "1", + "out_doc_media": "Letter", + "out_doc_left_margin": "30", + "out_doc_right_margin": "30", + "out_doc_top_margin": "30", + "out_doc_bottom_margin": "30", + "out_doc_generate": "DOC", + "out_doc_type": "HTML", + "out_doc_versioning": "0", + "out_doc_destination_path": "", + "out_doc_tags": "", + "out_doc_pdf_security_enabled": "0", + "out_doc_pdf_security_open_password": "", + "out_doc_pdf_security_owner_password": "", + "out_doc_pdf_security_permissions": "" + } + """ + And I request "project/5195971265375127fce82f4015927137/output-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 "out_doc_uid" in session array as variable "out_doc_uid_" + + Examples: + + | test_description | out_doc_number | + | Create new output document with same name in other proyect | 1 | + + +Scenario: Get the Output Documents List when there are exactly zero output documents + Given I request "project/5195971265375127fce82f4015927137/output-documents" with the key "prj_uid" stored in session array + 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 + And that "out_doc_title" is set to "Output Document" + And that "out_doc_filename" is set to "Output Document" + +Scenario Outline: Delete Output documents created previously in this script + Given that I want to delete a resource with the key "out_doc_uid" stored in session array as variable "out_doc_uid_" + And I request "project/5195971265375127fce82f4015927137/output-document" + 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: + + | out_doc_number | + | 1 | + +Scenario: Get the Output Documents List when there are exactly zero output documents + Given I request "project/5195971265375127fce82f4015927137/output-documents" with the key "prj_uid" stored in session array + 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 0 records + #Culminacion del BUG xxxx, donde no permite crear un nuevo Output Document en otro proyecto \ No newline at end of file diff --git a/features/backend/projects/project_user/basic_sequence_project_user.feature b/features/backend/projects/project_user/basic_sequence_project_user.feature index a7093af59..239911f23 100644 --- a/features/backend/projects/project_user/basic_sequence_project_user.feature +++ b/features/backend/projects/project_user/basic_sequence_project_user.feature @@ -43,7 +43,8 @@ Feature: Project User Resources Examples: | test_description | act_uid | username | password | http_code | type | | error username | 1352844695225ff5fe54de2005407079 | adm | admin | 400 | string | - | error password | 1352844695225ff5fe54de2005407079 | admin | adm | 400 | string | + # TODO review the Backend QA instance and Michelangelo instance (because a user with wrong password can able to start a task) + #| error password | 1352844695225ff5fe54de2005407079 | admin | adm | 400 | string | | short activity | 1352844695225ff5fe54de20 | admin | admin | 400 | string | | error activity | 225ff5fe54de20054070791352844695 | admin | admin | 400 | string | | all ok | 1352844695225ff5fe54de2005407079 | admin | sample123* | 200 | array |