Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs-appstore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
officejs-appstore
Commits
a02a5a1b
Commit
a02a5a1b
authored
May 12, 2021
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
officejs_test: test software product - web site relation
- interaction workflow - rename leaf domain action
parent
1226c1c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
16 deletions
+69
-16
bt5/officejs_test/TestTemplateItem/portal_components/test.erp5.testOfficeJSScenarioAppsore.py
...ortal_components/test.erp5.testOfficeJSScenarioAppsore.py
+49
-0
bt5/officejs_test/TestTemplateItem/portal_components/test.erp5.testOfficeJSScenarioAppsore.xml
...rtal_components/test.erp5.testOfficeJSScenarioAppsore.xml
+20
-16
No files found.
bt5/officejs_test/TestTemplateItem/portal_components/test.erp5.testOfficeJSScenarioAppsore.py
View file @
a02a5a1b
...
...
@@ -129,3 +129,52 @@ class TestOfficeJSScenario(testOfficeJSAppstoreMixin):
t_list
.
append
(
self
.
test_appstore_add_an_application
())
for
t
in
t_list
:
self
.
checkApplicationWithTitle
(
t
)
def
test_software_product_interaction_workflow
(
self
):
'''
setReference interaction workflow ensures the related web site id is the
same as the software product reference
'''
software_product
=
self
.
portal
.
software_product_module
.
newContent
(
portal_type
=
"Software Product"
,
product_line
=
"software/application"
,
title
=
"Test Software Product"
,
description
=
"description"
,
source_value
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
)
web_site
=
software_product
.
SoftwareProduct_fixRelatedWebSite
(
batch_mode
=
True
)
self
.
tic
()
#check relation before edit the reference
self
.
assertTrue
(
software_product
.
getReference
().
startswith
(
"OSP-"
))
self
.
assertEquals
(
web_site
.
getId
(),
software_product
.
getReference
().
lower
())
self
.
assertEquals
(
web_site
.
getRelativeUrl
(),
software_product
.
getFollowUp
(
portal_type
=
"Web Section"
))
#test after editing the reference
new_url
=
"testapp-"
+
software_product
.
getReference
()
software_product
.
edit
(
reference
=
new_url
)
self
.
tic
()
self
.
assertEquals
(
web_site
.
getId
(),
new_url
.
lower
())
self
.
assertEquals
(
software_product
.
getReference
(),
new_url
)
self
.
assertEquals
(
web_site
.
getRelativeUrl
(),
software_product
.
getFollowUp
(
portal_type
=
"Web Section"
))
def
test_software_product_change_app_url_action
(
self
):
software_product
=
self
.
portal
.
software_product_module
.
newContent
(
portal_type
=
"Software Product"
,
product_line
=
"software/application"
,
title
=
"Test Software Product"
,
description
=
"description"
,
source_value
=
self
.
portal
.
ERP5Site_getAuthenticatedMemberPersonValue
()
)
web_site
=
software_product
.
SoftwareProduct_fixRelatedWebSite
(
batch_mode
=
True
)
self
.
tic
()
#check relation before the action
self
.
assertTrue
(
software_product
.
getReference
().
startswith
(
"OSP-"
))
self
.
assertEquals
(
web_site
.
getId
(),
software_product
.
getReference
().
lower
())
self
.
assertEquals
(
web_site
.
getRelativeUrl
(),
software_product
.
getFollowUp
(
portal_type
=
"Web Section"
))
#test after action
new_url
=
"testapp-"
+
software_product
.
getReference
()
software_product
.
SoftwareProduct_updateApplicationLeafDomain
(
new_leaf_domain
=
new_url
)
self
.
tic
()
self
.
assertEquals
(
web_site
.
getId
(),
new_url
.
lower
())
self
.
assertEquals
(
software_product
.
getReference
(),
new_url
)
self
.
assertEquals
(
web_site
.
getRelativeUrl
(),
software_product
.
getFollowUp
(
portal_type
=
"Web Section"
))
bt5/officejs_test/TestTemplateItem/portal_components/test.erp5.testOfficeJSScenarioAppsore.xml
View file @
a02a5a1b
...
...
@@ -100,24 +100,28 @@
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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