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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
5a87dd11
Commit
5a87dd11
authored
Jul 27, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pdm_ui_test: tests of jump from resource to transformation
parent
2b776041
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
316 additions
and
4 deletions
+316
-4
bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/testResourceJumpToTransformation.xml
...rtal_tests/pdm_zuite/testResourceJumpToTransformation.xml
+58
-0
bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/testResourceJumpToTransformation.zpt
...rtal_tests/pdm_zuite/testResourceJumpToTransformation.zpt
+119
-0
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/ERP5Site_createTransformationForPdmUiTest.py
..._pdm_ui_test/ERP5Site_createTransformationForPdmUiTest.py
+54
-0
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/ERP5Site_createTransformationForPdmUiTest.xml
...pdm_ui_test/ERP5Site_createTransformationForPdmUiTest.xml
+62
-0
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_deleteData.py
...Item/portal_skins/erp5_pdm_ui_test/PdmZuite_deleteData.py
+23
-4
No files found.
bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/testResourceJumpToTransformation.xml
0 → 100644
View file @
5a87dd11
<?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>
testResourceJumpToTransformation
</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>
Resource Jump to Transformation
</unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm_ui_test/PathTemplateItem/portal_tests/pdm_zuite/testResourceJumpToTransformation.zpt
0 → 100644
View file @
5a87dd11
<html>
<head><title
tal:content=
"template/title"
></title></head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"4"
tal:content=
"template/title"
></td></tr>
</thead>
<tbody
tal:define=
"init_method string:ERP5Site_createTransformationForPdmUiTest"
>
<tal:block
metal:use-macro=
"here/PdmZuite_CommonTemplate/macros/init"
/>
<tal:block
tal:repeat=
"resource_relative_url python: (
'product_module/erp5_pdm_ui_test_product_without_transformation',
'component_module/erp5_pdm_ui_test_component_without_transformation',)"
>
<tr>
<td>
open
</td>
<td>
${base_url}/
<tal:block
tal:replace=
"resource_relative_url"
/></td>
<td></td>
</tr>
<tr>
<td>
selectAndWait
</td>
<td>
select_jump
</td>
<td>
Related Transformation
</td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td>
No Transformation related.
</td>
<td></td>
</tr>
</tal:block>
<tr>
<td>
open
</td>
<td>
${base_url}/product_module/erp5_pdm_ui_test_product_with_one_transformation
</td>
<td></td>
</tr>
<tr>
<td>
selectAndWait
</td>
<td>
select_jump
</td>
<td>
Related Transformation
</td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td>
Transformation related to Product : erp5_pdm_ui_test_product_with_one_transformation.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/component_module/erp5_pdm_ui_test_component_with_one_transformation
</td>
<td></td>
</tr>
<tr>
<td>
selectAndWait
</td>
<td>
select_jump
</td>
<td>
Related Transformation
</td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td>
Transformation related to Component : erp5_pdm_ui_test_component_with_one_transformation.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/product_module/erp5_pdm_ui_test_product_with_two_transformations
</td>
<td></td>
</tr>
<tr>
<td>
selectAndWait
</td>
<td>
select_jump
</td>
<td>
Related Transformation
</td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td>
Documents related to Product : erp5_pdm_ui_test_product_with_two_transformations.
</td>
<td></td>
</tr>
<tr>
<td>
assertText
</td>
<td>
//span[@class="listbox-current-page-total-number"]
</td>
<td>
2 records
</td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
erp5_pdm_ui_test_transformation_1
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/component_module/erp5_pdm_ui_test_component_with_two_transformations
</td>
<td></td>
</tr>
<tr>
<td>
selectAndWait
</td>
<td>
select_jump
</td>
<td>
Related Transformation
</td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td>
Documents related to Component : erp5_pdm_ui_test_component_with_two_transformations.
</td>
<td></td>
</tr>
<tr>
<td>
assertText
</td>
<td>
//span[@class="listbox-current-page-total-number"]
</td>
<td>
2 records
</td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
erp5_pdm_ui_test_transformation_1
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/ERP5Site_createTransformationForPdmUiTest.py
0 → 100644
View file @
5a87dd11
portal
=
context
.
getPortalObject
()
# Create resources and transformations.
for
product_id
in
(
'erp5_pdm_ui_test_product_with_one_transformation'
,
'erp5_pdm_ui_test_product_with_two_transformations'
,
'erp5_pdm_ui_test_product_without_transformation'
,
):
if
getattr
(
portal
.
product_module
,
product_id
,
None
)
is
None
:
portal
.
product_module
.
newContent
(
id
=
product_id
,
portal_type
=
'Product'
)
for
component_id
in
(
'erp5_pdm_ui_test_component_with_one_transformation'
,
'erp5_pdm_ui_test_component_with_two_transformations'
,
'erp5_pdm_ui_test_component_without_transformation'
,
):
if
getattr
(
portal
.
component_module
,
component_id
,
None
)
is
None
:
portal
.
component_module
.
newContent
(
id
=
component_id
,
portal_type
=
'Component'
)
erp5_pdm_ui_test_transformation_1
=
portal
.
transformation_module
.
newContent
(
portal_type
=
'Transformation'
,
id
=
'erp5_pdm_ui_test_transformation_1'
,
resource_value
=
portal
.
product_module
.
erp5_pdm_ui_test_product_with_two_transformations
,
)
erp5_pdm_ui_test_transformation_1
.
newContent
(
portal_type
=
'Transformation Transformed Resource'
,
resource_value
=
portal
.
product_module
.
erp5_pdm_ui_test_product_with_one_transformation
,
)
erp5_pdm_ui_test_transformation_1
.
newContent
(
portal_type
=
'Transformation Transformed Resource'
,
resource_value
=
portal
.
component_module
.
erp5_pdm_ui_test_component_with_one_transformation
,
)
erp5_pdm_ui_test_transformation_1
.
newContent
(
portal_type
=
'Transformation Transformed Resource'
,
resource_value
=
portal
.
component_module
.
erp5_pdm_ui_test_component_with_two_transformations
,
)
erp5_pdm_ui_test_transformation_2
=
portal
.
transformation_module
.
newContent
(
portal_type
=
'Transformation'
,
id
=
'erp5_pdm_ui_test_transformation_2'
,
resource_value
=
portal
.
component_module
.
erp5_pdm_ui_test_component_with_two_transformations
,
)
erp5_pdm_ui_test_transformation_2
.
newContent
(
portal_type
=
'Transformation Transformed Resource'
,
resource_value
=
portal
.
product_module
.
erp5_pdm_ui_test_product_with_two_transformations
,
)
portal
.
transformation_module
.
newContent
(
portal_type
=
'Transformation'
,
id
=
'erp5_pdm_ui_test_transformation_3'
,
)
return
"Delivery Created."
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/ERP5Site_createTransformationForPdmUiTest.xml
0 → 100644
View file @
5a87dd11
<?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_createTransformationForPdmUiTest
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_pdm_ui_test/SkinTemplateItem/portal_skins/erp5_pdm_ui_test/PdmZuite_deleteData.py
View file @
5a87dd11
...
...
@@ -10,10 +10,20 @@ destination_site_id = "erp5_pdm_ui_test_destination_site"
delivery_id
=
"erp5_pdm_ui_test_delivery"
# Delete resources
if
getattr
(
portal
.
product_module
,
'erp5_pdm_ui_test_product'
,
None
)
is
not
None
:
portal
.
product_module
.
manage_delObjects
([
'erp5_pdm_ui_test_product'
])
if
getattr
(
portal
.
component_module
,
'erp5_pdm_ui_test_component'
,
None
)
is
not
None
:
portal
.
component_module
.
manage_delObjects
([
'erp5_pdm_ui_test_component'
])
for
product_id
in
(
'erp5_pdm_ui_test_product'
,
'erp5_pdm_ui_test_product_with_two_transformations'
,
'erp5_pdm_ui_test_product_without_transformation'
,
):
if
getattr
(
portal
.
product_module
,
product_id
,
None
)
is
not
None
:
portal
.
product_module
.
manage_delObjects
([
product_id
])
for
component_id
in
(
'erp5_pdm_ui_test_component'
,
'erp5_pdm_ui_test_component_with_two_transformations'
,
'erp5_pdm_ui_test_component_without_transformation'
,
):
if
getattr
(
portal
.
component_module
,
component_id
,
None
)
is
not
None
:
portal
.
component_module
.
manage_delObjects
([
component_id
])
# Delete nodes
module
=
portal
.
getDefaultModule
(
node_portal_type
)
...
...
@@ -53,4 +63,13 @@ for supply_portal_type in ('Purchase Supply', 'Sale Supply', 'Internal Supply',
if
getattr
(
module
,
supply_id
,
None
)
is
not
None
:
module
.
manage_delObjects
([
supply_id
])
for
transformation_id
in
(
'erp5_pdm_ui_test_transformation_1'
,
'erp5_pdm_ui_test_transformation_2'
,
'erp5_pdm_ui_test_transformation_3'
,
):
if
getattr
(
portal
.
transformation_module
,
transformation_id
,
None
)
is
not
None
:
portal
.
transformation_module
.
manage_delObjects
([
transformation_id
])
return
"Deleted Successfully."
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