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
9e0e1162
Commit
9e0e1162
authored
May 26, 2021
by
Roque
Browse files
Options
Browse Files
Download
Plain Diff
Tests for new software product action
See merge request
!18
parents
1226c1c2
a02a5a1b
Pipeline
#15782
passed with stage
in 0 seconds
Changes
2
Pipelines
2
Show 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 @
9e0e1162
...
@@ -129,3 +129,52 @@ class TestOfficeJSScenario(testOfficeJSAppstoreMixin):
...
@@ -129,3 +129,52 @@ class TestOfficeJSScenario(testOfficeJSAppstoreMixin):
t_list
.
append
(
self
.
test_appstore_add_an_application
())
t_list
.
append
(
self
.
test_appstore_add_an_application
())
for
t
in
t_list
:
for
t
in
t_list
:
self
.
checkApplicationWithTitle
(
t
)
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 @
9e0e1162
...
@@ -100,11 +100,13 @@
...
@@ -100,11 +100,13 @@
</record>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<list>
<dictionary>
<dictionary>
<item>
<item>
...
@@ -117,7 +119,9 @@
...
@@ -117,7 +119,9 @@
</item>
</item>
</dictionary>
</dictionary>
</list>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
</ZopeData>
</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