Feature Web Entry culminado, y mejoras al feature project user
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: DataBase Connections
|
||||
|
||||
Scenario: List all the database connections (result 0 database connections)
|
||||
Given that I have a valid access_token
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connections"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 0 record
|
||||
|
||||
|
||||
Scenario: Create a new database connection
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"dbs_type": "mysql",
|
||||
"dbs_server": "192.168.11.71",
|
||||
"dbs_database_name": "rb_cochalo",
|
||||
"dbs_username": "root",
|
||||
"dbs_password": "atopml2005",
|
||||
"dbs_port": 3306,
|
||||
"dbs_encode": "utf8",
|
||||
"dbs_description": "conection correcta"
|
||||
}
|
||||
"""
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
||||
Then the response status code should be 201
|
||||
And store "dbs_uid" in session array
|
||||
|
||||
@3: TEST FOR GET DATABASE CONNECTIONS /----------------------------------------------------------------------
|
||||
Scenario: List all the database connections (result 1 database connection)
|
||||
Given that I have a valid access_token
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connections"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 1 record
|
||||
|
||||
@4: TEST FOR PUT DATABASE CONNECTION /-----------------------------------------------------------------------
|
||||
Scenario: Update a database connection
|
||||
Given that I have a valid access_token
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"dbs_type": "mysql",
|
||||
"dbs_server": "192.168.11.71",
|
||||
"dbs_database_name": "wf_cochalo",
|
||||
"dbs_username": "root",
|
||||
"dbs_password": "atopml2005",
|
||||
"dbs_port": 3306,
|
||||
"dbs_encode": "utf8",
|
||||
"dbs_description": "conection correcta a workflow"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "dbs_uid" stored in session array
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
Scenario: Get a database connection (with change in "dbs_description" and "dbs_database_name")
|
||||
Given that I have a valid access_token
|
||||
And that I want to get a resource with the key "dbs_uid" stored in session array
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "dbs_description" is set to "conection correcta a workflow"
|
||||
And that "dbs_database_name" is set to "wf_cochalo"
|
||||
|
||||
|
||||
Scenario: Delete a database connection
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "dbs_uid" stored in session array
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
@7: TEST FOR GET DATABASE CONNECTIONS /----------------------------------------------------------------------
|
||||
Scenario: List all the database connections (result 0 database connections)
|
||||
Given that I have a valid access_token
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connections"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 0 record
|
||||
@@ -0,0 +1,87 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: DataBase Connections
|
||||
|
||||
Scenario: List all the database connections (result 0 database connections)
|
||||
Given that I have a valid access_token
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connections"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 0 record
|
||||
|
||||
|
||||
Scenario: Create a new database connection
|
||||
Given that I have a valid access_token
|
||||
And POST this data:
|
||||
"""
|
||||
{
|
||||
"dbs_type": "mysql",
|
||||
"dbs_server": "192.168.11.71",
|
||||
"dbs_database_name": "rb_cochalo",
|
||||
"dbs_username": "root",
|
||||
"dbs_password": "atopml2005",
|
||||
"dbs_port": 3306,
|
||||
"dbs_encode": "utf8",
|
||||
"dbs_description": "conection correcta"
|
||||
}
|
||||
"""
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
||||
Then the response status code should be 201
|
||||
And store "dbs_uid" in session array
|
||||
|
||||
@3: TEST FOR GET DATABASE CONNECTIONS /----------------------------------------------------------------------
|
||||
Scenario: List all the database connections (result 1 database connection)
|
||||
Given that I have a valid access_token
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connections"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 1 record
|
||||
|
||||
@4: TEST FOR PUT DATABASE CONNECTION /-----------------------------------------------------------------------
|
||||
Scenario: Update a database connection
|
||||
Given that I have a valid access_token
|
||||
And PUT this data:
|
||||
"""
|
||||
{
|
||||
"dbs_type": "mysql",
|
||||
"dbs_server": "192.168.11.71",
|
||||
"dbs_database_name": "wf_cochalo",
|
||||
"dbs_username": "root",
|
||||
"dbs_password": "atopml2005",
|
||||
"dbs_port": 3306,
|
||||
"dbs_encode": "utf8",
|
||||
"dbs_description": "conection correcta a workflow"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "dbs_uid" stored in session array
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
|
||||
Scenario: Get a database connection (with change in "dbs_description" and "dbs_database_name")
|
||||
Given that I have a valid access_token
|
||||
And that I want to get a resource with the key "dbs_uid" stored in session array
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
And that "dbs_description" is set to "conection correcta a workflow"
|
||||
And that "dbs_database_name" is set to "wf_cochalo"
|
||||
|
||||
|
||||
Scenario: Delete a database connection
|
||||
Given that I have a valid access_token
|
||||
And that I want to delete a resource with the key "dbs_uid" stored in session array
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
@7: TEST FOR GET DATABASE CONNECTIONS /----------------------------------------------------------------------
|
||||
Scenario: List all the database connections (result 0 database connections)
|
||||
Given that I have a valid access_token
|
||||
And I request "project/74737540052e1641ab88249082085472/database-connections"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the response has 0 record
|
||||
@@ -15,16 +15,16 @@ Feature: Project User Resources Main Tests
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 52 records
|
||||
And the response has 6 records
|
||||
|
||||
|
||||
Scenario: Get a list of starting task of a project when there are exactly 3 tasks
|
||||
Scenario: Get a list of starting task of a project when there are exactly 2 tasks
|
||||
Given I request "project/1265557095225ff5c688f46031700471/starting-tasks"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 3 records
|
||||
And the response has 2 records
|
||||
|
||||
|
||||
Scenario Outline: Get a list of start task of a specific user
|
||||
@@ -38,8 +38,8 @@ Feature: Project User Resources Main Tests
|
||||
|
||||
| test_description | usr_uid |
|
||||
| Verify that this user admin tasks | 00000000000000000000000000000001 |
|
||||
| Verify that this user adam tasks | 44811996752d567110634a1013636964 |
|
||||
| Verify that this user magda tasks | 36116269152d56733b20e86062657385 |
|
||||
| Verify that this user adam tasks | 16333273052d567284e6766029512960 |
|
||||
| Verify that this user magda tasks | 90909671452d56718417612014706933 |
|
||||
|
||||
|
||||
Scenario Outline: Verify if a user can start a task
|
||||
@@ -61,7 +61,6 @@ Feature: Project User Resources Main Tests
|
||||
|
||||
| test_description | act_uid | username | password |
|
||||
| Properties of user admin - task 1 | 1352844695225ff5fe54de2005407079 | admin | admin |
|
||||
| Properties of user adam - task 1 | 1352844695225ff5fe54de2005407079 | adam | sample |
|
||||
| Properties of user admin - task 2 | 1546168275225ff617b6a34046164891 | admin | admin |
|
||||
| Properties of user erick - task 2 | 1546168275225ff617b6a34046164891 | erick | sample |
|
||||
| Properties of user admin - task 4 | 46941969352af5be2ab3f39001216717 | admin | admin |
|
||||
| Properties of user owen - task 1 | 1352844695225ff5fe54de2005407079 | owen | sample |
|
||||
| Properties of user admin - task 1 | 1352844695225ff5fe54de2005407079 | alyssa | sample |
|
||||
| Properties of user owen - task 2 | 46941969352af5be2ab3f39001216717 | admin | admin |
|
||||
|
||||
@@ -30,7 +30,7 @@ Scenario Outline: Verify if a user can start a task with bad parameters (negativ
|
||||
|
||||
| test_description | project | act_uid | username | password | error_code | error_message |
|
||||
| Invalid act_uid | 1265557095225ff5c688f46031700471 | 00000000009999f5fe54de2005407079 | admin | admin | 400 | act_uid |
|
||||
| Invalid username | 1265557095225ff5c688f46031700471 | 1546168275225ff617b6a34046164891 | ain | admin | 400 | username |
|
||||
| Invalid username | 1265557095225ff5c688f46031700471 | 1546168275225ff617b6a34046164891 | ain | admin | 400 | User |
|
||||
| Invalid password | 1265557095225ff5c688f46031700471 | 1546168275225ff617b6a34046164891 | erick | sle | 400 | password |
|
||||
| Field requered project | | 46941969352af5be2ab3f39001216717 | admin | admin | 400 | prj_uid |
|
||||
| Field requered act_uid | 1265557095225ff5c688f46031700471 | | admin | admin | 400 | act_uid |
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Web Entry
|
||||
Feature: Web Entry Main Tests
|
||||
Requirements:
|
||||
Default user "admin" with password "admin"
|
||||
a workspace with the process 28733629952e66a362c4f63066393844 ("Sample Project #5 (Web Entry)") already loaded
|
||||
there are zero web entry in the process
|
||||
Default user "admin" with password "admin"
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee?filter=john&start=0&limit=50
|
||||
# List assignees of an activity
|
||||
Scenario Outline: List assignees of an activity
|
||||
#ASSIGNEE USER OF AN ACTIVITY
|
||||
|
||||
Scenario Outline: List assignees of an activity
|
||||
Given I request "project/28733629952e66a362c4f63066393844/activity/<tas_uid>/assignee"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
@@ -22,8 +24,7 @@ Feature: Web Entry
|
||||
| 56118778152e66babcc2103002009439 | Task 2 |
|
||||
| 18096002352e66bc1643af8048493068 | Task 3 |
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee
|
||||
# Assign a user or group to an activity
|
||||
|
||||
Scenario Outline: Assign a user or group to an activity
|
||||
Given POST this data:
|
||||
"""
|
||||
@@ -46,9 +47,7 @@ Feature: Web Entry
|
||||
|
||||
#WEB ENTRY
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/web-entries
|
||||
# Get list Web Entries of a Project
|
||||
Scenario: Get list Web Entries of a Project
|
||||
Scenario: Get list Web Entries of a Project when there are exactly zero web entries
|
||||
And I request "project/28733629952e66a362c4f63066393844/web-entries"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
@@ -56,9 +55,7 @@ Feature: Web Entry
|
||||
And the type is "array"
|
||||
And the json data is an empty array
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/web-entry
|
||||
# Create a new Web Entry for a project
|
||||
# Create a new Web Entry using the method: PHP pages with Web Services
|
||||
|
||||
Scenario Outline: Create a new Web Entry using the method: PHP pages with Web Services
|
||||
Given POST this data:
|
||||
"""
|
||||
@@ -78,15 +75,25 @@ Feature: Web Entry
|
||||
And the type is "object"
|
||||
And the response has a "url" property
|
||||
And the "url" property type is "string"
|
||||
And store "url" in session array as variable "url_<url_number>"
|
||||
|
||||
Examples:
|
||||
| tas_uid | tas_title | dyn_uid | dyn_title |
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 |DynaForm Demo1 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 |DynaForm Demo2 |
|
||||
| tas_uid | tas_title | dyn_uid | dyn_title | url_number |
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 | DynaForm Demo1 | 1 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 | DynaForm Demo2 | 2 |
|
||||
|
||||
|
||||
Scenario Outline: Test webentry URL
|
||||
Given I request "url" with the key "url" stored in session array as variable "url_<url_number>" and url is "absolute"
|
||||
And the content type is "text/html"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
|
||||
| url_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#POST /api/1.0/{workspace}/project/{prj_uid}/web-entry
|
||||
# Create a new Web Entry for a project
|
||||
# Create a new Web Entry using the method: Single HTML
|
||||
Scenario Outline: Create a new Web Entry using the method: Single HTML
|
||||
Given POST this data:
|
||||
"""
|
||||
@@ -106,11 +113,10 @@ Feature: Web Entry
|
||||
And the "html" property type is "string"
|
||||
|
||||
Examples:
|
||||
| tas_uid | tas_title | dyn_uid | dyn_title |
|
||||
| 18096002352e66bc1643af8048493068 | Task 3 | 37977455352e66b892babe6071295002 |DynaForm Demo3 |
|
||||
| tas_uid | tas_title | dyn_uid | dyn_title |
|
||||
| 18096002352e66bc1643af8048493068 | Task 3 | 37977455352e66b892babe6071295002 | DynaForm Demo3 |
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/web-entries
|
||||
# Get list Web Entries of a Project
|
||||
|
||||
Scenario Outline: Get list Web Entries of a Project
|
||||
And I request "project/28733629952e66a362c4f63066393844/web-entries"
|
||||
And the content type is "application/json"
|
||||
@@ -127,8 +133,7 @@ Feature: Web Entry
|
||||
| 0 | 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 |DynaForm Demo1 |
|
||||
| 1 | 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 |DynaForm Demo2 |
|
||||
|
||||
#GET GET /api/1.0/{workspace}/project/{prj_uid}/web-entry/{tas_uid}/{dyn_uid}
|
||||
# Get a single Web Entry of a Project
|
||||
|
||||
Scenario Outline: Get a single Web Entry of a Project
|
||||
Given that I want to get a resource with the key "obj_uid" stored in session array
|
||||
And I request "project/28733629952e66a362c4f63066393844/web-entry/<tas_uid>/<dyn_uid>"
|
||||
@@ -146,62 +151,7 @@ Feature: Web Entry
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 |DynaForm Demo1 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 |DynaForm Demo2 |
|
||||
|
||||
#DELETE /api/1.0/{workspace}/project/{prj_uid}/web-entry/{tas_uid}/{dyn_uid}
|
||||
# Delete a Web Entry of a Project
|
||||
Scenario Outline: Delete a Web Entry of a Project
|
||||
Given that I want to delete a resource with the key "obj_uid" stored in session array
|
||||
And I request "project/28733629952e66a362c4f63066393844/web-entry/<tas_uid>/<dyn_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 "object"
|
||||
|
||||
Examples:
|
||||
| tas_uid | tas_title | dyn_uid | dyn_title |
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 |DynaForm Demo1 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 |DynaForm Demo2 |
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/web-entries
|
||||
# Get list Web Entries of a Project
|
||||
Scenario: Get list Web Entries of a Project
|
||||
And I request "project/28733629952e66a362c4f63066393844/web-entries"
|
||||
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 json data is an empty array
|
||||
|
||||
#WEB ENTRY - END
|
||||
|
||||
#DELETE /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid}
|
||||
# Remove an assignee of an activity
|
||||
Scenario Outline: Remove an assignee of an activity
|
||||
Given that I want to delete a resource with the key "obj_uid" stored in session array
|
||||
And I request "project/28733629952e66a362c4f63066393844/activity/<tas_uid>/assignee/<aas_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 "object"
|
||||
|
||||
Examples:
|
||||
| tas_uid | tas_title | aas_uid |
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 | 00000000000000000000000000000001 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 | 00000000000000000000000000000001 |
|
||||
| 18096002352e66bc1643af8048493068 | Task 3 | 00000000000000000000000000000001 |
|
||||
|
||||
#GET /api/1.0/{workspace}/project/{prj_uid}/activity/{act_uid}/assignee?filter=john&start=0&limit=50
|
||||
# List assignees of an activity
|
||||
Scenario Outline: List assignees of an activity
|
||||
Given I request "project/28733629952e66a362c4f63066393844/activity/<tas_uid>/assignee"
|
||||
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 json data is an empty array
|
||||
|
||||
Examples:
|
||||
| tas_uid | tas_title |
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 |
|
||||
| 18096002352e66bc1643af8048493068 | Task 3 |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Webentry Negative Tests
|
||||
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
Scenario Outline: Create a new Web Entry using the method: PHP pages with Web Services with bad parameters (negative tests)
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"tas_uid": "<tas_uid>",
|
||||
"dyn_uid": "<dyn_uid>",
|
||||
"method": "<method>",
|
||||
"input_document_access": 1,
|
||||
"usr_username": "<usr_username>",
|
||||
"usr_password": "<usr_password>"
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/web-entry"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | tas_uid | tas_title | dyn_uid | dyn_title | method | usr_username | usr_password | error_code | error_message |
|
||||
| Invalid method | 28733629952e66a362c4f63066393844 | 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 | DynaForm Demo1 | JS | admin | admin | 400 | method |
|
||||
| Invalid usr_username | 28733629952e66a362c4f63066393844 | 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 | DynaForm Demo2 | HTML | aaron | admin | 400 | users |
|
||||
| Invalid usr_password | 28733629952e66a362c4f63066393844 | 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 | DynaForm Demo1 | WS | admin | sample | 400 | password |
|
||||
| Field required prj_uid | | 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 | DynaForm Demo2 | HTML | admin | admin | 400 | prj_uid |
|
||||
| Field required tas_uid | 28733629952e66a362c4f63066393844 | | Task 1 | 60308801852e66b7181ae21045247174 | DynaForm Demo1 | WS | admin | admin | 400 | tas_uid |
|
||||
| Field required dyn_uid | 28733629952e66a362c4f63066393844 | 56118778152e66babcc2103002009439 | Task 2 | | DynaForm Demo2 | HTML | admin | admin | 400 | dyn_uid |
|
||||
| Field required method | 28733629952e66a362c4f63066393844 | 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 | DynaForm Demo1 | | admin | admin | 400 | method |
|
||||
|
||||
|
||||
Scenario Outline: Create a new Web Entry using the method: Single HTML
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"tas_uid": "<tas_uid>",
|
||||
"dyn_uid": "<dyn_uid>",
|
||||
"method": "<method>",
|
||||
"input_document_access": 1
|
||||
}
|
||||
"""
|
||||
And I request "project/<project>/web-entry"
|
||||
Then the response status code should be <error_code>
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
|
||||
| test_description | project | tas_uid | tas_title | dyn_uid | dyn_title | method | error_code | error_message |
|
||||
| Invalid method | 28733629952e66a362c4f63066393844 | 18096002352e66bc1643af8048493068 | Task 1 | 37977455352e66b892babe6071295002 | DynaForm Demo1 | JS | 400 | method |
|
||||
| Invalid usr_username | 28733629952e66a362c4f63066393844 | 18096002352e66bc1643af8048493068 | Task 2 | 37977455352e66b892babe6071295002 | DynaForm Demo2 | HTML | 400 | users |
|
||||
| Invalid usr_password | 28733629952e66a362c4f63066393844 | 18096002352e66bc1643af8048493068 | Task 1 | 37977455352e66b892babe6071295002 | DynaForm Demo1 | WS | 400 | usr_username |
|
||||
| Field required prj_uid | | 18096002352e66bc1643af8048493068 | Task 2 | 37977455352e66b892babe6071295002 | DynaForm Demo2 | HTML | 400 | prj_uid |
|
||||
| Field required tas_uid | 28733629952e66a362c4f63066393844 | | Task 1 | 37977455352e66b892babe6071295002 | DynaForm Demo1 | WS | 400 | tas_uid |
|
||||
| Field required dyn_uid | 28733629952e66a362c4f63066393844 | 18096002352e66bc1643af8048493068 | Task 2 | | DynaForm Demo2 | HTML | 400 | dyn_uid |
|
||||
| Field required method | 28733629952e66a362c4f63066393844 | 18096002352e66bc1643af8048493068 | Task 1 | 37977455352e66b892babe6071295002 | DynaForm Demo1 | | 400 | method |
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Web Entry - Remove Assignee and Web Entries
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario Outline: Remove an assignee of an activity
|
||||
Given that I want to delete a resource with the key "obj_uid" stored in session array
|
||||
And I request "project/28733629952e66a362c4f63066393844/activity/<tas_uid>/assignee/<aas_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 "object"
|
||||
|
||||
Examples:
|
||||
| tas_uid | tas_title | aas_uid |
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 | 00000000000000000000000000000001 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 | 00000000000000000000000000000001 |
|
||||
| 18096002352e66bc1643af8048493068 | Task 3 | 00000000000000000000000000000001 |
|
||||
|
||||
|
||||
Scenario Outline: Delete a Web Entry of a Project
|
||||
Given that I want to delete a resource with the key "obj_uid" stored in session array
|
||||
And I request "project/28733629952e66a362c4f63066393844/web-entry/<tas_uid>/<dyn_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 "object"
|
||||
|
||||
Examples:
|
||||
| tas_uid | tas_title | dyn_uid | dyn_title |
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 | 60308801852e66b7181ae21045247174 |DynaForm Demo1 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 | 99869771852e66b7dc4b858088901665 |DynaForm Demo2 |
|
||||
|
||||
Scenario Outline: List assignees of an activity
|
||||
Given I request "project/28733629952e66a362c4f63066393844/activity/<tas_uid>/assignee"
|
||||
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 json data is an empty array
|
||||
|
||||
Examples:
|
||||
| tas_uid | tas_title |
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 |
|
||||
| 18096002352e66bc1643af8048493068 | Task 3 |
|
||||
|
||||
Scenario Outline: List assignees of an activity
|
||||
Given I request "project/28733629952e66a362c4f63066393844/activity/<tas_uid>/assignee"
|
||||
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 json data is an empty array
|
||||
|
||||
Examples:
|
||||
| tas_uid | tas_title |
|
||||
| 44199549652e66ba533bb06088252754 | Task 1 |
|
||||
| 56118778152e66babcc2103002009439 | Task 2 |
|
||||
| 18096002352e66bc1643af8048493068 | Task 3 |
|
||||
|
||||
|
||||
Scenario: Get list Web Entries of a Project
|
||||
And I request "project/28733629952e66a362c4f63066393844/web-entries"
|
||||
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 json data is an empty array
|
||||
@@ -331,7 +331,7 @@ class RestContext extends BehatContext
|
||||
/**
|
||||
* @When /^I request "([^"]*)"$/
|
||||
*/
|
||||
public function iRequest($pageUrl)
|
||||
public function iRequest($pageUrl, $urlType="")
|
||||
{
|
||||
$this->_startTime = microtime(true);
|
||||
$baseUrl = $this->getParameter('base_url');
|
||||
@@ -339,7 +339,12 @@ class RestContext extends BehatContext
|
||||
$this->_headers['Authorization'] = 'Bearer ' . $this->access_token;
|
||||
}
|
||||
|
||||
$this->_requestUrl = $baseUrl . $pageUrl;
|
||||
|
||||
if($urlType=="absolute"){
|
||||
$this->_requestUrl = $pageUrl;
|
||||
}else{
|
||||
$this->_requestUrl = $baseUrl . $pageUrl;
|
||||
}
|
||||
$url = false !== strpos($pageUrl, '{')
|
||||
? array($this->_requestUrl, (array)$this->_restObject)
|
||||
: $this->_requestUrl;
|
||||
@@ -1215,8 +1220,9 @@ class RestContext extends BehatContext
|
||||
|
||||
/**
|
||||
* @Given /^I request "([^"]*)" with the key "([^"]*)" stored in session array as variable "([^"]*)"$/
|
||||
* @Given /^I request "([^"]*)" with the key "([^"]*)" stored in session array as variable "([^"]*)" and url is "([^"]*)"$/
|
||||
*/
|
||||
public function iRequestWithTheKeyStoredInSessionArrayAsVariable($pageUrl, $varName, $sessionVarName)
|
||||
public function iRequestWithTheKeyStoredInSessionArrayAsVariable($pageUrl, $varName, $sessionVarName, $urlType="")
|
||||
{
|
||||
if (file_exists("session.data")) {
|
||||
$sessionData = json_decode(file_get_contents("session.data"));
|
||||
@@ -1236,7 +1242,7 @@ class RestContext extends BehatContext
|
||||
$this->printDebug("URL: $pageUrl\n$varName = $varValue\n");
|
||||
|
||||
|
||||
$this->iRequest($pageUrl);
|
||||
$this->iRequest($pageUrl, $urlType);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user