Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
18
Rakefile
18
Rakefile
@@ -43,10 +43,12 @@ task :build => [:required] do
|
||||
|
||||
pmUIDir = targetDir + "/pmUI"
|
||||
mafeDir = targetDir + "/mafe"
|
||||
pmdynaformDir = targetDir + "/pmdynaform"
|
||||
|
||||
prepareDirs([pmUIDir, mafeDir, jsTargetDir, cssTargetDir, cssImagesTargetDir, imgTargetDir, pmUIFontsDir])
|
||||
prepareDirs([pmUIDir, mafeDir, pmdynaformDir, jsTargetDir, cssTargetDir, cssImagesTargetDir, imgTargetDir, pmUIFontsDir])
|
||||
|
||||
buildPmUi(Dir.pwd + "/vendor/colosa/pmUI", targetDir, mode)
|
||||
buildPmdynaform(Dir.pwd + "/vendor/colosa/pmDynaform", targetDir, mode)
|
||||
buildMafe(Dir.pwd + "/vendor/colosa/MichelangeloFE", targetDir, mode)
|
||||
|
||||
pmuiHash = getHash(Dir.pwd + "/vendor/colosa/pmUI")
|
||||
@@ -134,6 +136,20 @@ def buildPmUi(homeDir, targetDir, mode)
|
||||
puts "\nPMUI Build Finished".magenta
|
||||
end
|
||||
|
||||
def buildPmdynaform(homeDir, targetDir, mode)
|
||||
puts "\nBuilding PmDynaform library".green.bold
|
||||
|
||||
# Defining target directories
|
||||
pmdynaformDir = targetDir + "/pmdynaform"
|
||||
|
||||
executeInto(homeDir, [ "default"])
|
||||
|
||||
system("cp -r #{homeDir}/build #{pmdynaformDir}")
|
||||
system("cp -r #{homeDir}/libs #{pmdynaformDir}")
|
||||
|
||||
puts "\nPmDynaform Build Finished!".magenta
|
||||
end
|
||||
|
||||
def buildMafe(homeDir, targetDir, mode)
|
||||
puts "\nBuilding PM Michelangelo FE".green.bold
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
"jquery/jquery": "1.10.2",
|
||||
"underscore/underscore": "1.5.2",
|
||||
"colosa/pmUI": "dev-master",
|
||||
"colosa/MichelangeloFE": "dev-master"
|
||||
"colosa/MichelangeloFE": "dev-master",
|
||||
"colosa/pmdynaform": "dev-master"
|
||||
},
|
||||
"require-dev":{
|
||||
"guzzle/guzzle":"~3.1.1",
|
||||
|
||||
@@ -68,8 +68,8 @@ Feature: PM Group Negative Tests
|
||||
And the response status message should have the following text "already assigned"
|
||||
|
||||
|
||||
# Scenario: Delete a pm_group when have asigned user and this is assigned to a task (negative tests) "Credit Supervisors"
|
||||
# Given that I want to delete a "Group"
|
||||
# And I request "group/53254668952d56744764b08079100881"
|
||||
# Then the response status code should be 400
|
||||
# And the response status message should have the following text "cannot be deleted"
|
||||
Scenario: Delete a pm_group when have asigned user and this is assigned to a task (negative tests) "Credit Supervisors"
|
||||
Given that I want to delete a "Group"
|
||||
And I request "group/53254668952d56744764b08079100881"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "cannot be deleted"
|
||||
@@ -1,219 +1,227 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Files Manager Resources Main Tests
|
||||
Requirements:
|
||||
a workspace with the process 1265557095225ff5c688f46031700471 ("Test Michelangelo") already loaded
|
||||
there are two output documents in the process
|
||||
a workspace with the process 1265557095225ff5c688f46031700471 ("Test Michelangelo") already loaded
|
||||
there are two output documents in the process
|
||||
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
Background:
|
||||
Given that I have a valid access_token
|
||||
|
||||
|
||||
Scenario: Get a list of main process files manager
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
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 "name" property in row 0 equals "templates"
|
||||
And the "name" property in row 1 equals "public"
|
||||
Scenario: Get a list of main process files manager
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
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 "name" property in row 0 equals "templates"
|
||||
And the "name" property in row 1 equals "public"
|
||||
|
||||
Scenario: Get a list public folder of process files manager
|
||||
Scenario: Get a list public folder of process files manager
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager?path=public"
|
||||
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
|
||||
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: Get a list templates folder of process files manager
|
||||
Scenario: Get a list templates folder of process files manager
|
||||
Given I request "project/1265557095225ff5c688f46031700471/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
|
||||
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 Outline: Create files and subfolders
|
||||
Scenario Outline: Create files and subfolders
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"prf_filename": "<prf_filename>",
|
||||
"prf_path": "<prf_path>",
|
||||
"prf_content": "<prf_content>"
|
||||
}
|
||||
"""
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "<type>"
|
||||
And store "prf_uid" in session array as variable "prf_uid_<prf_number>"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_filename | prf_path | prf_content | http_code | type | prf_number |
|
||||
| into public folder | file_test_1.txt | public/ | only text | 200 | object | 0 |
|
||||
| into mailtemplates folder | file_test_2.html | templates/ | <h1>Test</h1><p>html test</p> | 200 | object | 1 |
|
||||
| into public subfolder | file_test_3 | public/public_subfolder | test | 200 | object | 2 |
|
||||
| into mailtemplates subfolder | file_test_4 | templates/templates_subfolder | test | 200 | object | 3 |
|
||||
|
||||
|
||||
Scenario: Create files and subfolders with same name in path public
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"prf_filename": "file_test_1.txt",
|
||||
"prf_path": "public/",
|
||||
"prf_content": "only text"
|
||||
}
|
||||
"""
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "already exists"
|
||||
|
||||
|
||||
Scenario: Create files and subfolders with same name in path templates
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"prf_filename": "file_test_2.html",
|
||||
"prf_path": "templates/",
|
||||
"prf_content": "<h1>Test</h1><p>html test</p>"
|
||||
}
|
||||
"""
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "already exists"
|
||||
|
||||
|
||||
Scenario Outline: Update files by updating the content
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"prf_content": "<prf_content>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "<type>"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_filename | prf_content | http_code | type | prf_number |
|
||||
| put into public folder | file_test_1.txt | only text - modified | 200 | object | 0 |
|
||||
| put into mailtemplates folder | file_test_2.html | <h1>Test</h1><p>html test</p><i>modified</i> | 200 | object | 1 |
|
||||
| put into public subfolder | file_test_3 | put test | 200 | object | 2 |
|
||||
| put into mailtemplates subfolder | file_test_4 | put test | 200 | object | 3 |
|
||||
|
||||
|
||||
Scenario Outline: Get a single Files Manager and check some properties
|
||||
Given that I want to get a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
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 that "prf_filename" is set to "<prf_filename>"
|
||||
And that "prf_path" is set to "<prf_path>"
|
||||
And that "prf_content" is set to "<prf_content>"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_filename | prf_content | http_code | type | prf_number | row | prf_path |
|
||||
| put into public folder | file_test_1.txt | only text - modified | 200 | object | 0 | 1 | public/ |
|
||||
| put into mailtemplates folder | file_test_2.html | <h1>Test</h1><p>html test</p><i>modified</i> | 200 | object | 1 | 1 | templates/ |
|
||||
| put into public subfolder | file_test_3 | put test | 200 | object | 2 | 0 | public/public_subfolder |
|
||||
| put into mailtemplates subfolder | file_test_4 | put test | 200 | object | 3 | 0 | templates/templates_subfolder |
|
||||
|
||||
|
||||
Scenario Outline: Upload files to same folders
|
||||
Given POST I want to upload the file "<file>" to path "<prf_path>". Url "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
And store "prf_uid" in session array as variable "prf_uid_<prf_number>"
|
||||
|
||||
Examples:
|
||||
| file | prf_path | prf_number |
|
||||
|/home/wendy/uploadfiles/test1.html | templates | 4 |
|
||||
|/home/wendy/uploadfiles/test2.html | templates | 5 |
|
||||
|/home/wendy/uploadfiles/test.txt | public | 6 |
|
||||
|/home/wendy/uploadfiles/TestQA.html| templates | 7 |
|
||||
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Verify if TestQA was overwrited
|
||||
Given that I want to get a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
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 that "prf_filename" is set to "<prf_filename>"
|
||||
And that "prf_content" is set to "<prf_content>"
|
||||
"""
|
||||
{
|
||||
"prf_filename": "<prf_filename>",
|
||||
"prf_path": "<prf_path>",
|
||||
"prf_content": "<prf_content>"
|
||||
}
|
||||
"""
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "<type>"
|
||||
And store "prf_uid" in session array as variable "prf_uid_<prf_number>"
|
||||
|
||||
Examples:
|
||||
| prf_ filename | prf_content | prf_number |
|
||||
| TestQA.html | Test QA - cuando se realiza la sobreescritura desde upload | 7 |
|
||||
| test_description | prf_filename | prf_path | prf_content | http_code | type | prf_number |
|
||||
| into public folder | file_test_1.txt | public/ | only text | 200 | object | 0 |
|
||||
| into mailtemplates folder | file_test_2.html | templates/ | <h1>Test</h1><p>html test</p> | 200 | object | 1 |
|
||||
| into public subfolder | file_test_3 | public/public_subfolder | test | 200 | object | 2 |
|
||||
| into mailtemplates subfolder | file_test_4 | templates/templates_subfolder | test | 200 | object | 3 |
|
||||
|
||||
|
||||
Scenario: Create files and subfolders with same name in path public
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"prf_filename": "file_test_1.txt",
|
||||
"prf_path": "public/",
|
||||
"prf_content": "only text"
|
||||
}
|
||||
"""
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "already exists"
|
||||
|
||||
|
||||
Scenario: Create files and subfolders with same name in path templates
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"prf_filename": "file_test_2.html",
|
||||
"prf_path": "templates/",
|
||||
"prf_content": "<h1>Test</h1><p>html test</p>"
|
||||
}
|
||||
"""
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "already exists"
|
||||
|
||||
|
||||
Scenario Outline: Update files by updating the content
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"prf_content": "<prf_content>"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be <http_code>
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "<type>"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_filename | prf_content | http_code | type | prf_number |
|
||||
| put into public folder | file_test_1.txt | only text - modified | 200 | object | 0 |
|
||||
| put into mailtemplates folder | file_test_2.html | <h1>Test</h1><p>html test</p><i>modified</i> | 200 | object | 1 |
|
||||
| put into public subfolder | file_test_3 | put test | 200 | object | 2 |
|
||||
| put into mailtemplates subfolder | file_test_4 | put test | 200 | object | 3 |
|
||||
|
||||
|
||||
Scenario Outline: Get a single Files Manager and check some properties
|
||||
Given that I want to get a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
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 that "prf_filename" is set to "<prf_filename>"
|
||||
And that "prf_path" is set to "<prf_path>"
|
||||
And that "prf_content" is set to "<prf_content>"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_filename | prf_content | http_code | type | prf_number | row | prf_path |
|
||||
| put into public folder | file_test_1.txt | only text - modified | 200 | object | 0 | 1 | public/ |
|
||||
| put into mailtemplates folder | file_test_2.html | <h1>Test</h1><p>html test</p><i>modified</i> | 200 | object | 1 | 1 | templates/ |
|
||||
| put into public subfolder | file_test_3 | put test | 200 | object | 2 | 0 | public/public_subfolder |
|
||||
| put into mailtemplates subfolder | file_test_4 | put test | 200 | object | 3 | 0 | templates/templates_subfolder |
|
||||
|
||||
|
||||
Scenario Outline: Upload files to same folders
|
||||
Given POST I want to upload the file "<file>" to path "<prf_path>". Url "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
And store "prf_uid" in session array as variable "prf_uid_<prf_number>"
|
||||
|
||||
Examples:
|
||||
| file | prf_path | prf_number |
|
||||
|/home/wendy/uploadfiles/test1.html | templates | 4 |
|
||||
|/home/wendy/uploadfiles/test2.html | templates | 5 |
|
||||
|/home/wendy/uploadfiles/test.txt | public | 6 |
|
||||
|/home/wendy/uploadfiles/TestQA.html| templates | 7 |
|
||||
|
||||
|
||||
Scenario Outline: Verify if TestQA was overwrited
|
||||
Given that I want to get a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
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 that "prf_filename" is set to "<prf_filename>"
|
||||
And that "prf_content" is set to "<prf_content>"
|
||||
|
||||
Examples:
|
||||
| prf_ filename | prf_content | prf_number |
|
||||
| TestQA.html | Test QA - cuando se realiza la sobreescritura desde upload | 7 |
|
||||
|
||||
|
||||
Scenario Outline: Update the overwritten file to return to their original values
|
||||
Scenario Outline: Update the overwritten file to return to their original values
|
||||
Given PUT this data:
|
||||
"""
|
||||
{
|
||||
"prf_content": "Test QA"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And that "prf_filename" is set to "TestQA.html"
|
||||
And that "prf_content" is set to "Test QA"
|
||||
"""
|
||||
{
|
||||
"prf_content": "Test QA"
|
||||
}
|
||||
"""
|
||||
And that I want to update a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And that "prf_filename" is set to "TestQA.html"
|
||||
And that "prf_content" is set to "Test QA"
|
||||
|
||||
Examples:
|
||||
| prf_ filename | prf_content | prf_number |
|
||||
| TestQA.html | Test QA - cuando se realiza la sobreescritura desde upload | 7 |
|
||||
Examples:
|
||||
| prf_ filename | prf_content | prf_number |
|
||||
| TestQA.html | Test QA - cuando se realiza la sobreescritura desde upload | 7 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: Download files
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager/prf_uid/download" with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
Then the response status code should be 200
|
||||
Scenario Outline: Download files
|
||||
Given I request "project/1265557095225ff5c688f46031700471/file-manager/prf_uid/download" with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| test_description | prf_number |
|
||||
| Download file | 0 |
|
||||
| Download file | 1 |
|
||||
| Download file | 2 |
|
||||
| Download file | 4 |
|
||||
Examples:
|
||||
| test_description | prf_number |
|
||||
| Download file | 0 |
|
||||
| Download file | 1 |
|
||||
| Download file | 2 |
|
||||
| Download file | 4 |
|
||||
|
||||
|
||||
Scenario Outline: Delete file
|
||||
Scenario Outline: Delete file
|
||||
Given that I want to delete a resource with the key "prf_uid" stored in session array as variable "prf_uid_<prf_number>"
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager"
|
||||
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_number |
|
||||
| delete public folder | 0 |
|
||||
| delete mailtemplates folder | 1 |
|
||||
| delete public subfolder | 2 |
|
||||
| delete mailtemplates subfolder | 3 |
|
||||
| delete mailtemplates subfolder | 4 |
|
||||
| delete mailtemplates subfolder | 5 |
|
||||
| delete mailtemplates subfolder | 6 |
|
||||
Examples:
|
||||
| test_description | prf_number |
|
||||
| delete public folder | 0 |
|
||||
| delete mailtemplates folder | 1 |
|
||||
| delete public subfolder | 2 |
|
||||
| delete mailtemplates subfolder | 3 |
|
||||
| delete mailtemplates subfolder | 4 |
|
||||
| delete mailtemplates subfolder | 5 |
|
||||
| delete mailtemplates subfolder | 6 |
|
||||
|
||||
|
||||
Scenario Outline: Delete folder
|
||||
Scenario Outline: Delete folder
|
||||
Given that I want to delete the folder
|
||||
And I request "project/1265557095225ff5c688f46031700471/file-manager/folder?path=<prf_path>"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
Examples:
|
||||
| test_description | prf_path |
|
||||
| delete public sub folder | templates/templates_subfolder |
|
||||
| delete templates sub folder | public/public_subfolder |
|
||||
Examples:
|
||||
| test_description | prf_path |
|
||||
| delete public sub folder | templates/templates_subfolder |
|
||||
| delete templates sub folder | public/public_subfolder |
|
||||
|
||||
|
||||
#BUG 15207, The "Upload" accepts files with other extensions
|
||||
#
|
||||
#Scenario Outline: Upload files to same folders "Project - Process Complete BPMN"
|
||||
# Given POST I want to upload the file "<file>" to path "<prf_path>". Url "project/1455892245368ebeb11c1a5001393784/file-manager"
|
||||
# And store "prf_uid" in session array as variable "prf_uid_<prf_number>"
|
||||
# And the response status message should have the following text "incorrect extension"
|
||||
#
|
||||
# Examples:
|
||||
# | file | prf_path | prf_number |
|
||||
# |/home/wendy/uploadfiles/SnagIt823.exe | templates | 1 |
|
||||
@@ -249,22 +249,22 @@ Feature: Process Permissions Resources Tests
|
||||
And the response has 1 record
|
||||
|
||||
Scenario Outline: Create a new Process permission in proyect "Process Complete BPMN"
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"op_case_status": "<op_case_status>",
|
||||
"tas_uid": "<tas_uid>",
|
||||
"op_user_relation": "<op_user_relation>",
|
||||
"usr_uid": "<usr_uid>",
|
||||
"op_task_source" : "<op_task_source>",
|
||||
"op_participate": "<op_participate>",
|
||||
"op_obj_type": "<op_obj_type>",
|
||||
"dynaforms" : "<dynaforms>",
|
||||
"inputs" : "<inputs>",
|
||||
"outputs" : "<outputs>",
|
||||
"op_action": "<op_action>"
|
||||
}
|
||||
"""
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"op_case_status": "<op_case_status>",
|
||||
"tas_uid": "<tas_uid>",
|
||||
"op_user_relation": "<op_user_relation>",
|
||||
"usr_uid": "<usr_uid>",
|
||||
"op_task_source" : "<op_task_source>",
|
||||
"op_participate": "<op_participate>",
|
||||
"op_obj_type": "<op_obj_type>",
|
||||
"dynaforms" : "<dynaforms>",
|
||||
"inputs" : "<inputs>",
|
||||
"outputs" : "<outputs>",
|
||||
"op_action": "<op_action>"
|
||||
}
|
||||
"""
|
||||
And I request "project/1455892245368ebeb11c1a5001393784/process-permission"
|
||||
Then the response status code should be 201
|
||||
And store "op_uid" in session array
|
||||
@@ -276,15 +276,17 @@ Scenario Outline: Create a new Process permission in proyect "Process Complete B
|
||||
|
||||
| op_number | op_case_status | tas_uid | op_user_relation| usr_uid | op_task_source | op_participate | op_obj_type | dynaforms | inputs | outputs | op_action |
|
||||
| 1 | COMPLETED | | 1 | 00000000000000000000000000000001 | | 0 | MSGS_HISTORY | | | | RESEND |
|
||||
| 2 | COMPLETED | | 1 | 00000000000000000000000000000001 | | 0 | MSGS_HISTORY | | | | RESEND |
|
||||
|
||||
Scenario: Get a List of current Process Permissions of a project
|
||||
Given I request "project/1455892245368ebeb11c1a5001393784/process-permissions"
|
||||
|
||||
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 2 record
|
||||
And the response has 3 record
|
||||
|
||||
Scenario Outline: Delete all Process Supervisor created previously in this script
|
||||
Given that I want to delete a resource with the key "op_uid" stored in session array as variable "op_uid_<op_number>"
|
||||
Given that I want to delete a resource with the key "op_uid" stored in session array as variable "op_uid_<op_number>"
|
||||
And I request "project/1455892245368ebeb11c1a5001393784/process-permission"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
@@ -293,11 +295,12 @@ Scenario Outline: Delete all Process Supervisor created previously in this scrip
|
||||
|
||||
Examples:
|
||||
|
||||
| op_number |
|
||||
| 1 |
|
||||
| op_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
Scenario: Get a List of current Process Permissions of a project
|
||||
Given I request "project/1455892245368ebeb11c1a5001393784/process-permissions"
|
||||
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
|
||||
@@ -238,7 +238,7 @@ class dynaformEditor extends WebResource
|
||||
var DYNAFORM_URL="' . $Parameters['URL'] . '";
|
||||
leimnud.event.add(window,"load",function(){ loadEditor(); });
|
||||
');
|
||||
$oHeadPublisher->addScriptCode(' var jsMeta;var __usernameLogged__ = "' . (isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '') . '";var SYS_LANG = "' . SYS_LANG . '";var __DYN_UID__ = "' . $this->dyn_uid . '";');
|
||||
$oHeadPublisher->addScriptCode(' var jsMeta;var __usernameLoggedDE__ = "' . (isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '') . '";var SYS_LANG = "' . SYS_LANG . '";var __DYN_UID__ = "' . $this->dyn_uid . '";');
|
||||
|
||||
$arrayParameterAux = $Parameters;
|
||||
$arrayParameterAux["DYNAFORM_NAME"] = base64_encode($arrayParameterAux["DYNAFORM_NAME"]);
|
||||
|
||||
@@ -170,6 +170,10 @@ class Dynaform extends BaseDynaform
|
||||
$this->setDynType( isset( $aData['DYN_TYPE'] ) ? $aData['DYN_TYPE'] : 'xmlform' );
|
||||
$this->setDynFilename( $aData['PRO_UID'] . PATH_SEP . $dynUid );
|
||||
|
||||
if (isset($aData["DYN_CONTENT"])) {
|
||||
$this->setDynContent($aData["DYN_CONTENT"]);
|
||||
}
|
||||
|
||||
if ($this->validate()) {
|
||||
$con->begin();
|
||||
$res = $this->save();
|
||||
|
||||
@@ -8,7 +8,8 @@ class DynaForm
|
||||
|
||||
"DYN_TITLE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "dynaFormTitle"),
|
||||
"DYN_DESCRIPTION" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "dynaFormDescription"),
|
||||
"DYN_TYPE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("xmlform", "grid"), "fieldNameAux" => "dynaFormType")
|
||||
"DYN_TYPE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("xmlform", "grid"), "fieldNameAux" => "dynaFormType"),
|
||||
"DYN_CONTENT" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "dynaFormContent")
|
||||
);
|
||||
|
||||
private $formatFieldNameInUppercase = true;
|
||||
@@ -367,10 +368,6 @@ class DynaForm
|
||||
|
||||
$dynaFormUid = $dynaForm->create($arrayData);
|
||||
|
||||
$oDynaform = \DynaformPeer::retrieveByPK( $dynaFormUid );
|
||||
$oDynaform->setDynContent( $arrayData['DYN_CONTENT'] );
|
||||
$oDynaform->save();
|
||||
|
||||
//Return
|
||||
unset($arrayData["PRO_UID"]);
|
||||
|
||||
@@ -959,7 +956,7 @@ class DynaForm
|
||||
$this->getFieldNameByFormatFieldName("DYN_TITLE") => $record["DYN_TITLE"],
|
||||
$this->getFieldNameByFormatFieldName("DYN_DESCRIPTION") => $record["DYN_DESCRIPTION"] . "",
|
||||
$this->getFieldNameByFormatFieldName("DYN_TYPE") => $record["DYN_TYPE"] . "",
|
||||
$this->getFieldNameByFormatFieldName("DYN_CONTENT") => $record["DYN_CONTENT"] . ""
|
||||
$this->getFieldNameByFormatFieldName("DYN_CONTENT") => $record["DYN_CONTENT"] . ""
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
|
||||
@@ -136,6 +136,68 @@ class InputDocument
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if the InputDocument it's assigned in other objects
|
||||
*
|
||||
* @param string $inputDocumentUid Unique id of InputDocument
|
||||
*
|
||||
* return array Return array (true if it's assigned or false otherwise and data)
|
||||
*/
|
||||
public function itsAssignedInOtherObjects($inputDocumentUid)
|
||||
{
|
||||
try {
|
||||
$flagAssigned = false;
|
||||
$arrayData = array();
|
||||
|
||||
//Step
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\StepPeer::STEP_UID);
|
||||
$criteria->add(\StepPeer::STEP_TYPE_OBJ, "INPUT_DOCUMENT", \Criteria::EQUAL);
|
||||
$criteria->add(\StepPeer::STEP_UID_OBJ, $inputDocumentUid, \Criteria::EQUAL);
|
||||
|
||||
$rsCriteria = \StepPeer::doSelectRS($criteria);
|
||||
|
||||
if ($rsCriteria->next()) {
|
||||
$flagAssigned = true;
|
||||
$arrayData[] = \G::LoadTranslation("ID_STEPS");
|
||||
}
|
||||
|
||||
//StepSupervisor
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\StepSupervisorPeer::STEP_UID);
|
||||
$criteria->add(\StepSupervisorPeer::STEP_TYPE_OBJ, "INPUT_DOCUMENT", \Criteria::EQUAL);
|
||||
$criteria->add(\StepSupervisorPeer::STEP_UID_OBJ, $inputDocumentUid, \Criteria::EQUAL);
|
||||
|
||||
$rsCriteria = \StepSupervisorPeer::doSelectRS($criteria);
|
||||
|
||||
if ($rsCriteria->next()) {
|
||||
$flagAssigned = true;
|
||||
$arrayData[] = \G::LoadTranslation("ID_CASES_MENU_ADMIN");
|
||||
}
|
||||
|
||||
//ObjectPermission
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\ObjectPermissionPeer::OP_UID);
|
||||
$criteria->add(\ObjectPermissionPeer::OP_OBJ_TYPE, "INPUT", \Criteria::EQUAL);
|
||||
$criteria->add(\ObjectPermissionPeer::OP_OBJ_UID, $inputDocumentUid, \Criteria::EQUAL);
|
||||
|
||||
$rsCriteria = \ObjectPermissionPeer::doSelectRS($criteria);
|
||||
|
||||
if ($rsCriteria->next()) {
|
||||
$flagAssigned = true;
|
||||
$arrayData[] = \G::LoadTranslation("ID_PROCESS_PERMISSIONS");
|
||||
}
|
||||
|
||||
//Return
|
||||
return array($flagAssigned, $arrayData);
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if doesn't exists the InputDocument in table INPUT_DOCUMENT
|
||||
*
|
||||
@@ -189,6 +251,27 @@ class InputDocument
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if the InputDocument it's assigned in other objects
|
||||
*
|
||||
* @param string $inputDocumentUid Unique id of InputDocument
|
||||
* @param string $fieldNameForException Field name for the exception
|
||||
*
|
||||
* return void Throw exception if the InputDocument it's assigned in other objects
|
||||
*/
|
||||
public function throwExceptionIfItsAssignedInOtherObjects($inputDocumentUid, $fieldNameForException)
|
||||
{
|
||||
try {
|
||||
list($flagAssigned, $arrayData) = $this->itsAssignedInOtherObjects($inputDocumentUid);
|
||||
|
||||
if ($flagAssigned) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_INPUT_DOCUMENT_ITS_ASSIGNED", array($fieldNameForException, $inputDocumentUid, implode(", ", $arrayData))));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create InputDocument for a Process
|
||||
*
|
||||
@@ -313,6 +396,8 @@ class InputDocument
|
||||
//Verify data
|
||||
$this->throwExceptionIfNotExistsInputDocument($inputDocumentUid, "", $this->arrayFieldNameForException["inputDocumentUid"]);
|
||||
|
||||
$this->throwExceptionIfItsAssignedInOtherObjects($inputDocumentUid, $this->arrayFieldNameForException["inputDocumentUid"]);
|
||||
|
||||
//Delete
|
||||
//StepSupervisor
|
||||
$stepSupervisor = new \StepSupervisor();
|
||||
|
||||
@@ -416,13 +416,6 @@ Ext.onReady(function(){
|
||||
text: _('ID_EDIT'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||
handler: editProcess
|
||||
},{
|
||||
id: 'edit_with_classic_editor',
|
||||
text: 'Edit with classic editor',
|
||||
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||
handler: function() {
|
||||
editProcess("classic");
|
||||
}
|
||||
}, {
|
||||
id: 'activator2',
|
||||
text: '',
|
||||
|
||||
@@ -68,9 +68,8 @@
|
||||
<a target="_blank" href="http://www.processmaker.com"><img src="/images/get_started.png" border="0" width="163" height="438"></a>
|
||||
</td>
|
||||
<td class="cell2" valign="top">
|
||||
<span class="cLow"><strong>Get Started</strong></span>
|
||||
<p><span class="cLow">Welcome to ProcessMaker!</span></p>
|
||||
<p><span class="cLow">To get started, log in using the following credentials. You can change them later:</span></p>
|
||||
<p><span class="cLow">To get started, log in using the following credentials. You can change them later:</span></p>
|
||||
<span class="cNeg">Username:</span><span class="cLow"> {name}</span><br>
|
||||
<span class="cNeg">Password:</span><span class="cLow"> The password introduced at the time of installing the application</span>
|
||||
<p><span class="cLow">We suggest you follow our 7 easy videos to automate your workflow. You can see a demo of each step at <a target="_blank" href="http://www.processmaker.com/demos/">http://www.processmaker.com/demos/</a> </span></p>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user