Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
erp5
Commits
a1bfdf1b
Commit
a1bfdf1b
authored
Oct 01, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Support Request App Worklists
/reviewed-on
nexedi/erp5!760
parents
ca119f9c
29795b08
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
596 additions
and
85 deletions
+596
-85
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.html
.../web_page_module/gadget_supportrequest_homepage_html.html
+1
-1
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.xml
...m/web_page_module/gadget_supportrequest_homepage_html.xml
+2
-2
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_worklist_js.js
...web_page_module/gadget_supportrequest_page_worklist_js.js
+6
-6
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_worklist_js.xml
...eb_page_module/gadget_supportrequest_page_worklist_js.xml
+2
-2
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/ERP5Site_getTicketWorkflowWorklistInfoDict.py
...ort_request/ERP5Site_getTicketWorkflowWorklistInfoDict.py
+46
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/ERP5Site_getTicketWorkflowWorklistInfoDict.xml
...rt_request/ERP5Site_getTicketWorkflowWorklistInfoDict.xml
+70
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_createSupportRequest.py
...port_request/SupportRequestModule_createSupportRequest.py
+14
-34
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getWorklistAsJson.py
...support_request/SupportRequestModule_getWorklistAsJson.py
+16
-26
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testWorklist.xml
..._tests/officejs_support_request_ui_zuite/testWorklist.xml
+58
-0
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testWorklist.zpt
..._tests/officejs_support_request_ui_zuite/testWorklist.zpt
+90
-0
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/zzz_logout_test.xml
...sts/officejs_support_request_ui_zuite/zzz_logout_test.xml
+26
-0
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/zzz_logout_test/testLogin.xml
...js_support_request_ui_zuite/zzz_logout_test/testLogin.xml
+0
-0
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/zzz_logout_test/testLogin.zpt
...js_support_request_ui_zuite/zzz_logout_test/testLogin.zpt
+0
-0
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/support_request_module/erp5_officejs_support_request_ui_test_support_reuqest_002.xml
..._officejs_support_request_ui_test_support_reuqest_002.xml
+6
-4
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/support_request_module/erp5_officejs_support_request_ui_test_support_reuqest_003.xml
..._officejs_support_request_ui_test_support_reuqest_003.xml
+8
-4
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/support_request_module/erp5_officejs_support_request_ui_test_support_reuqest_004.xml
..._officejs_support_request_ui_test_support_reuqest_004.xml
+6
-6
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/ERP5Site_cleanupSupportRequestUITestDataSet.py
...quest_test/ERP5Site_cleanupSupportRequestUITestDataSet.py
+26
-0
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/ERP5Site_cleanupSupportRequestUITestDataSet.xml
...uest_test/ERP5Site_cleanupSupportRequestUITestDataSet.xml
+62
-0
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/ERP5Site_createSupportRequestUITestDataSet.py
...equest_test/ERP5Site_createSupportRequestUITestDataSet.py
+16
-0
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/ERP5Site_createSupportRequestUITestDataSet.xml
...quest_test/ERP5Site_createSupportRequestUITestDataSet.xml
+62
-0
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/Zuite_SupportRequestUITemplate.xml
...s_support_request_test/Zuite_SupportRequestUITemplate.xml
+58
-0
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/Zuite_SupportRequestUITemplate.zpt
...s_support_request_test/Zuite_SupportRequestUITemplate.zpt
+21
-0
No files found.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.html
View file @
a1bfdf1b
...
...
@@ -42,7 +42,7 @@
</div>
<div
data-gadget-url=
"gadget_erp5_page_form.html"
data-gadget-scope=
"last"
></div>
<h1
data-i18n=
"
Support Requests"
class=
"ui-title ui-override-theme worklist-title"
>
Support Requests WorkList
</h1>
<h1
data-i18n=
"
[value]Support Request WorkLists"
class=
"ui-title ui-override-theme worklist-title"
>
Support Request WorkLists
</h1>
<div
data-gadget-url=
"gadget_supportrequest_page_worklist.html"
data-gadget-scope=
"worklist"
></div>
</body>
</html>
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.xml
View file @
a1bfdf1b
...
...
@@ -252,8 +252,8 @@
</tuple>
<state>
<tuple>
<float>
15
06095040.88
</float>
<string>
UTC
</string>
<float>
15
37518325.21
</float>
<string>
GMT+9
</string>
</tuple>
</state>
</object>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_worklist_js.js
View file @
a1bfdf1b
/*global window, rJS, RSVP, Handlebars */
/*global window, rJS, RSVP, Handlebars
, Query
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
,
Query
)
{
"
use strict
"
;
/////////////////////////////////////////////////////////////////
...
...
@@ -39,8 +39,8 @@
.
push
(
function
(
hateoas_url
)
{
return
gadget
.
jio_getAttachment
(
'
support_request_module
'
,
hateoas_url
+
'
support_request_module
'
+
"
/SupportRequestModule_getWorklistAsJson
"
hateoas_url
+
'
support_request_module
'
+
'
/SupportRequestModule_getWorklistAsJson
'
);
})
.
push
(
function
(
result
)
{
...
...
@@ -55,7 +55,7 @@
}
display_options
=
{
jio_key
:
"
support_request_module
"
,
extended_search
:
result
[
i
].
query_string
,
extended_search
:
Query
.
objectToSearchText
(
result
[
i
].
query
)
,
page
:
'
form
'
,
view
:
'
view
'
};
...
...
@@ -83,4 +83,4 @@
});
});
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
}(
window
,
rJS
,
RSVP
,
Handlebars
,
Query
));
\ No newline at end of file
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_worklist_js.xml
View file @
a1bfdf1b
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
962.
26499.5927.24507
</string>
</value>
<value>
<string>
962.
13948.13888.3242
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1506
651141.01
</float>
<float>
1506
505200.17
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/ERP5Site_getTicketWorkflowWorklistInfoDict.py
0 → 100644
View file @
a1bfdf1b
"""Returns the worklists queries for ticket workflow, as a mapping where the key is the worklist ID and the value a JIO query.
This script has proxy role, as only manager can access workflow configuration.
"""
from
Products.ERP5Type.Message
import
translateString
portal
=
context
.
getPortalObject
()
query_dict
=
{}
workflow
=
portal
.
portal_workflow
.
ticket_workflow
workflow_state_var
=
workflow
.
variables
.
getStateVar
()
for
worklist
in
workflow
.
worklists
.
objectValues
():
query_list
=
[{
'type'
:
'complex'
,
'operator'
:
'OR'
,
'query_list'
:
[
{
'key'
:
'local_roles'
,
'type'
:
'simple'
,
'value'
:
role
,
}
for
role
in
worklist
.
getGuard
().
getRolesText
().
split
(
"; "
)]
}]
for
key
in
worklist
.
getVarMatchKeys
():
value
=
worklist
.
getVarMatch
(
key
)
if
key
==
workflow_state_var
:
# instead of having {'validation_state': 'draft'}, we want to have
# {'translated_validation_state_title': 'Brouillon'}
# so that it looks good in the module view.
key
=
'translated_%s_title'
%
key
state_title
=
workflow
[
'states'
].
restrictedTraverse
(
value
).
title_or_id
()
value
=
unicode
(
translateString
(
'%s [state in %s]'
%
(
state_title
,
workflow
.
getId
()),
default
=
unicode
(
translateString
(
state_title
))))
query_list
.
append
({
'key'
:
key
,
'value'
:
value
,
'type'
:
'simple'
,
})
query_dict
[
worklist
.
getId
()]
=
{
'type'
:
'complex'
,
'query_list'
:
query_list
}
return
query_dict
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/ERP5Site_getTicketWorkflowWorklistInfoDict.xml
0 → 100644
View file @
a1bfdf1b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_getTicketWorkflowWorklistInfoDict
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_createSupportRequest.py
View file @
a1bfdf1b
from
Products.ERP5Type.ImmediateReindexContextManager
import
ImmediateReindexContextManager
portal
=
context
.
getPortalObject
()
logged_in_user_value
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
now
=
DateTime
()
# default_field_your_resource,field_your_title, description, field_your_project, default_field_your_project, form_id, field_your_resource, dialog_id, resource, title, file, project, dialog_method, field_my_description, field_your_file=None
project_list
=
portal
.
portal_catalog
(
portal_type
=
"Project"
,
id
=
project
)
# with id keyword, this function will return a sequence data type which contains one element.
project_object
=
project_list
[
0
].
getObject
()
project_object
=
portal
.
project_module
[
project
]
with
ImmediateReindexContextManager
()
as
immediate_reindex_context_manager
:
support_request
=
portal
.
support_request_module
.
newContent
(
immediate_reindex
=
immediate_reindex_context_manager
,
portal_type
=
'Support Request'
,
title
=
title
,
resource
=
"service_module/"
+
resource
,
)
# - Reference = automatically generated - already implemented
# - Requester = current user person
# - Start date = now
# - State = submitted
# - Billing Supplier = Project related Billing Supplier
# - Location = Project related Location
# - Supervisor = Project related Supervisor
support_request
=
portal
.
support_request_module
.
newContent
(
support_request
=
portal
.
support_request_module
.
newContent
(
portal_type
=
'Support Request'
,
title
=
title
,
resource
=
"service_module/"
+
resource
,
...
...
@@ -34,10 +15,9 @@ with ImmediateReindexContextManager() as immediate_reindex_context_manager:
source_project_value
=
project_object
,
destination_value
=
project_object
.
getDestinationValue
(),
start_date
=
now
,
)
)
support_request
.
submit
()
support_request
.
submit
()
if
description
is
not
None
or
file
is
not
None
:
portal
.
post_module
.
PostModule_createHTMLPostForSupportRequest
(
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getWorklistAsJson.py
View file @
a1bfdf1b
# return worklists from ticket workflow in JSON format
from
Products.ERP5Type.Message
import
translateString
import
json
portal
=
context
.
getPortalObject
()
count_list
=
[]
state_dict
=
{
"submitted"
:
"Support Request to Open"
,
"draft"
:
"Support Request to Submit"
,
"validated"
:
"Support Request to Close"
,
"suspended"
:
"Suspended Support Requests"
}
# XXX hardcoded, these lines below reflect portal_workflow/ticket_workflow worklists
count_list
.
append
({
'query_string'
:
'portal_type:"Support Request" AND simulation_state:"draft" AND local_roles:"Owner"'
,
'action_name'
:
state_dict
[
"draft"
],
'action_count'
:
portal
.
support_request_module
.
countFolder
(
portal_type
=
"Support Request"
,
simulation_state
=
"draft"
,
local_roles
=
"Owner"
)[
0
][
0
]})
count_list
.
append
({
'query_string'
:
'portal_type:"Support Request" AND simulation_state:"submitted" AND local_roles:"Assignor"'
,
'action_name'
:
state_dict
[
"submitted"
],
'action_count'
:
portal
.
support_request_module
.
countFolder
(
portal_type
=
"Support Request"
,
simulation_state
=
"submitted"
,
local_roles
=
"Assignor"
)[
0
][
0
]})
count_list
.
append
({
'query_string'
:
'portal_type:"Support Request" AND simulation_state:"validated" AND local_roles:("Assignee" OR "Assignor")'
,
'action_name'
:
state_dict
[
"validated"
],
'action_count'
:
portal
.
support_request_module
.
countFolder
(
portal_type
=
"Support Request"
,
simulation_state
=
"validated"
,
local_roles
=
(
"Assignee"
,
"Assignor"
))[
0
][
0
]})
count_list
.
append
({
'query_string'
:
'portal_type:"Support Request" AND simulation_state:"suspended" AND local_roles:("Assignee" OR "Assignor")'
,
'action_name'
:
state_dict
[
"suspended"
],
'action_count'
:
portal
.
support_request_module
.
countFolder
(
portal_type
=
"Support Request"
,
simulation_state
=
"suspended"
,
local_roles
=
(
"Assignee"
,
"Assignor"
))[
0
][
0
]})
worklist_query_dict
=
portal
.
ERP5Site_getTicketWorkflowWorklistInfoDict
()
# Query portal actions to get the worklist count and
# extend this information with the query from our helper script.
worklist_action_list
=
[
{
'action_name'
:
unicode
(
translateString
(
action
[
'name'
].
rsplit
(
' ('
,
1
)[
0
])),
# Action name include the count, but we display it separatly.
'action_count'
:
action
[
'count'
],
'query'
:
worklist_query_dict
[
action
[
'worklist_id'
]],
}
for
action
in
portal
.
portal_actions
.
listFilteredActionsFor
(
context
)[
'global'
]
if
action
[
'category'
]
==
'global'
and
action
.
get
(
'workflow_id'
)
==
'ticket_workflow'
]
return
json
.
dumps
(
count
_list
)
return
json
.
dumps
(
worklist_action
_list
)
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testWorklist.xml
0 → 100644
View file @
a1bfdf1b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testWorklist
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode>
Worklists on support request front page
</unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testWorklist.zpt
0 → 100644
View file @
a1bfdf1b
<html>
<head>
<title
tal:content=
"template/title"
>
Worklists on support request front page
</title>
<meta
http-equiv=
"content-type"
content=
"text/html;charset=utf-8"
>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Worklists on support request front page
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/Zuite_SupportRequestUITemplate/macros/cleanup_module"
/>
<tal:block
metal:use-macro=
"here/Zuite_SupportRequestUITemplate/macros/create_data"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/erp5_officejs_support_request_ui/
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//h1[@data-i18n="[value]Support Request WorkLists"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//section[@class="document_list"]//li[1]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//section[@class="document_list"]//li/a[contains(text(), "Support Requests to Open")]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<!-- document count -->
<td>
//section[@class="document_list"]//li/a[contains(text(), "Support Requests to Open")]/span[text() = "1"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//section[@class="document_list"]//li/a[contains(text(), "Support Requests to Close")]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//section[@class="document_list"]//li/a[contains(text(), "Support Requests to Close")]/span[text() = "1"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//section[@class="document_list"]//li/a[contains(text(), "Suspended Support Requests")]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//section[@class="document_list"]//li/a[contains(text(), "Suspended Support Requests")]/span[text() = "1"]
</td>
<td></td>
</tr>
<!-- clicking on one worklist open the module -->
<tr>
<td>
click
</td>
<td>
//section[@class="document_list"]//li/a[contains(text(), "Suspended Support Requests")]/span[text() = "1"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//h1/a[@data-i18n="Support Request Module"]
</td>
<td></td>
</tr>
<!-- The module is filtered according to worklist definition, so it shows one document -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//h1[@data-i18n="Support Requests"]//span[text() = "(1)"]
</td>
<td></td>
</tr>
<!-- Query editor buttons are also present -->
<tr>
<td>
waitForElementPresent
</td>
<td>
div.search_parsed_value > button:nth-of-type(3)
</td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/zzz_logout_test.xml
0 → 100644
View file @
a1bfdf1b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Zuite"
module=
"Products.Zelenium.zuite"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
zzz_logout_test
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Tests which logs out the default manager user, put in this folder so that they run at the end)
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testLogin.xml
→
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/
zzz_logout_test/
testLogin.xml
View file @
a1bfdf1b
File moved
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testLogin.zpt
→
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/
zzz_logout_test/
testLogin.zpt
View file @
a1bfdf1b
File moved
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/support_request_module/erp5_officejs_support_request_ui_test_support_reuqest_002.xml
View file @
a1bfdf1b
...
...
@@ -21,6 +21,7 @@
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
...
...
@@ -30,6 +31,7 @@
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
...
...
@@ -246,11 +248,11 @@
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
su
bmit
</string>
</value>
<value>
<string>
su
spend
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
jc
</string>
</value>
<value>
<string>
ERP5TypeTestCase
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -258,7 +260,7 @@
</item>
<item>
<key>
<string>
simulation_state
</string>
</key>
<value>
<string>
su
bmitt
ed
</string>
</value>
<value>
<string>
su
spend
ed
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
...
...
@@ -272,7 +274,7 @@
</tuple>
<state>
<tuple>
<float>
15
03318144.34
</float>
<float>
15
36287646.96
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/support_request_module/erp5_officejs_support_request_ui_test_support_reuqest_003.xml
View file @
a1bfdf1b
...
...
@@ -12,6 +12,7 @@
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
...
...
@@ -21,6 +22,7 @@
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
...
...
@@ -30,6 +32,7 @@
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
...
...
@@ -41,6 +44,7 @@
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
...
...
@@ -246,11 +250,11 @@
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
submit
</string>
</value>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
dt
</string>
</value>
<value>
<string>
ERP5TypeTestCase
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -258,7 +262,7 @@
</item>
<item>
<key>
<string>
simulation_state
</string>
</key>
<value>
<string>
submit
ted
</string>
</value>
<value>
<string>
valida
ted
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
...
...
@@ -272,7 +276,7 @@
</tuple>
<state>
<tuple>
<float>
15
03068817.9
8
</float>
<float>
15
36287429.3
8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/support_request_module/erp5_officejs_support_request_ui_test_support_reuqest_004.xml
View file @
a1bfdf1b
...
...
@@ -12,6 +12,7 @@
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
...
...
@@ -21,7 +22,6 @@
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
...
...
@@ -30,7 +30,6 @@
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
...
...
@@ -41,6 +40,7 @@
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
...
...
@@ -212,11 +212,11 @@
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
submit
</string>
</value>
<value>
<string>
invalidate
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
dt
</string>
</value>
<value>
<string>
ERP5TypeTestCase
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -224,7 +224,7 @@
</item>
<item>
<key>
<string>
simulation_state
</string>
</key>
<value>
<string>
submit
ted
</string>
</value>
<value>
<string>
invalida
ted
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
...
...
@@ -238,7 +238,7 @@
</tuple>
<state>
<tuple>
<float>
15
03418768.34
</float>
<float>
15
36287473.89
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/ERP5Site_cleanupSupportRequestUITestDataSet.py
0 → 100644
View file @
a1bfdf1b
"""Cleanup the data from support request module.
So that test are isolated.
"""
from
Products.ZSQLCatalog.SQLCatalog
import
Query
,
NegatedQuery
portal
=
context
.
getPortalObject
()
test_project_set
=
set
((
portal
.
project_module
.
erp5_officejs_support_request_ui_test_project_001
,
portal
.
project_module
.
erp5_officejs_support_request_ui_test_project_002
))
to_delete_list
=
[]
for
brain
in
portal
.
portal_catalog
(
portal_type
=
"Support Request"
,
simulation_state
=
NegatedQuery
(
Query
(
simulation_state
=
(
"cancelled"
,)))):
support_request
=
brain
.
getObject
()
if
support_request
.
getId
().
startswith
(
'erp5_officejs_support_request_ui_test_'
):
continue
# business template data
assert
support_request
.
getSourceProjectValue
()
in
test_project_set
,
\
"Support request %s have unexpected project."
%
support_request
.
absolute_url
()
to_delete_list
.
append
(
support_request
.
getId
())
portal
.
support_request_module
.
manage_delObjects
(
to_delete_list
)
# Clear worklist cache
portal
.
portal_caches
.
clearAllCache
()
return
"Done."
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/ERP5Site_cleanupSupportRequestUITestDataSet.xml
0 → 100644
View file @
a1bfdf1b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_cleanupSupportRequestUITestDataSet
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/ERP5Site_createSupportRequestUITestDataSet.py
0 → 100644
View file @
a1bfdf1b
"""Create some data for support request UI test.
Logged in user needs to be Assignee / Assignor on the support requests
included in business template.
"""
portal
=
context
.
getPortalObject
()
for
support_request
in
portal
.
support_request_module
.
contentValues
():
if
support_request
.
getId
().
startswith
(
'erp5_officejs_support_request_ui_test'
):
support_request
.
manage_addLocalRoles
(
portal
.
portal_membership
.
getAuthenticatedMember
().
getId
(),
[
'Assignee'
,
'Assignor'
])
support_request
.
reindexObject
()
portal
.
portal_caches
.
clearAllCache
()
return
"Done."
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/ERP5Site_createSupportRequestUITestDataSet.xml
0 → 100644
View file @
a1bfdf1b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_createSupportRequestUITestDataSet
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/Zuite_SupportRequestUITemplate.xml
0 → 100644
View file @
a1bfdf1b
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Zuite_SupportRequestUITemplate
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui_test/SkinTemplateItem/portal_skins/erp5_officejs_support_request_test/Zuite_SupportRequestUITemplate.zpt
0 → 100644
View file @
a1bfdf1b
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="cleanup_module">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr><td>openAndWait</td>
<td>${base_url}/ERP5Site_cleanupSupportRequestUITestDataSet</td><td></td></tr>
<tr><td>assertTextPresent</td>
<td>Done.</td><td></td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
</tal:block>
<tal:block metal:define-macro="create_data">
<tr><td>openAndWait</td>
<td>${base_url}/ERP5Site_createSupportRequestUITestDataSet</td><td></td></tr>
<tr><td>assertTextPresent</td>
<td>Done.</td><td></td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
</tal:block>
</tal:block>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment