Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
bdd4d9b4
Commit
bdd4d9b4
authored
Jun 03, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trade_ui_test: test Organisation's "jump to trade condition"
parent
8fae56be
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
242 additions
and
2 deletions
+242
-2
bt5/erp5_trade_ui_test/PathTemplateItem/portal_tests/trade_zuite/testOrganisationJumpToTradeCondition.xml
...ests/trade_zuite/testOrganisationJumpToTradeCondition.xml
+58
-0
bt5/erp5_trade_ui_test/PathTemplateItem/portal_tests/trade_zuite/testOrganisationJumpToTradeCondition.zpt
...ests/trade_zuite/testOrganisationJumpToTradeCondition.zpt
+77
-0
bt5/erp5_trade_ui_test/SkinTemplateItem/portal_skins/erp5_trade_ui_test/Zuite_createOrganisationAndTradeConditionsForTradeZuite.py
...uite_createOrganisationAndTradeConditionsForTradeZuite.py
+40
-0
bt5/erp5_trade_ui_test/SkinTemplateItem/portal_skins/erp5_trade_ui_test/Zuite_createOrganisationAndTradeConditionsForTradeZuite.xml
...ite_createOrganisationAndTradeConditionsForTradeZuite.xml
+62
-0
bt5/erp5_trade_ui_test/SkinTemplateItem/portal_skins/erp5_trade_ui_test/Zuite_deleteDataForTradeZuite.py
...skins/erp5_trade_ui_test/Zuite_deleteDataForTradeZuite.py
+5
-2
No files found.
bt5/erp5_trade_ui_test/PathTemplateItem/portal_tests/trade_zuite/testOrganisationJumpToTradeCondition.xml
0 → 100644
View file @
bdd4d9b4
<?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>
testOrganisationJumpToTradeCondition
</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_trade_ui_test/PathTemplateItem/portal_tests/trade_zuite/testOrganisationJumpToTradeCondition.zpt
0 → 100644
View file @
bdd4d9b4
<html>
<head><title>
Test Organisation jump to trade condition
</title></head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"4"
>
Test Organisation jump to trade condition
</td></tr>
</thead>
<tbody
tal:define=
"init_method string:Zuite_createOrganisationAndTradeConditionsForTradeZuite;"
>
<!-- Setup {{{ -->
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForTradeZuite/macros/init"
/>
<!-- }}} -->
<tal:block
tal:repeat=
"trade_condition_portal_type python: ('Sale Trade Condition', 'Purchase Trade Condition', 'Internal Trade Condition', )"
>
<tr>
<td>
open
</td>
<td>
${base_url}/organisation_module/erp5_trade_ui_test_organisation_1
</td>
<td></td>
</tr>
<tr>
<td>
selectAndWait
</td>
<td>
select_jump
</td>
<td
tal:content=
"trade_condition_portal_type"
></td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td>
Documents related to Organisation : erp5_trade_ui_test_organisation_1_title.
</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_trade_ui_test_trade_condition_1
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
erp5_trade_ui_test_trade_condition_2
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/organisation_module/erp5_trade_ui_test_organisation_2
</td>
<td></td>
</tr>
<tr>
<td>
selectAndWait
</td>
<td>
select_jump
</td>
<td
tal:content=
"trade_condition_portal_type"
></td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td><tal:block
tal:replace=
"trade_condition_portal_type"
/>
related to Organisation : erp5_trade_ui_test_organisation_2_title.
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
erp5_trade_ui_test_trade_condition_1
</td>
<td></td>
</tr>
<tr>
<td>
assertTextNotPresent
</td>
<td>
erp5_trade_ui_test_trade_condition_2
</td>
<td></td>
</tr>
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_trade_ui_test/SkinTemplateItem/portal_skins/erp5_trade_ui_test/Zuite_createOrganisationAndTradeConditionsForTradeZuite.py
0 → 100644
View file @
bdd4d9b4
portal
=
context
.
getPortalObject
()
# Create organisations
erp5_trade_ui_test_organisation_1
=
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
,
id
=
'erp5_trade_ui_test_organisation_1'
,
title
=
'erp5_trade_ui_test_organisation_1_title'
,
)
erp5_trade_ui_test_organisation_2
=
portal
.
organisation_module
.
newContent
(
portal_type
=
'Organisation'
,
id
=
'erp5_trade_ui_test_organisation_2'
,
title
=
'erp5_trade_ui_test_organisation_2_title'
,
)
# Create trade conditions
# for all type of trade condition, erp5_trade_ui_test_organisation_1 has 2 related supplies
# and erp5_trade_ui_test_organisation_2 has 1
for
trade_condition_portal_type
in
(
'Purchase Trade Condition'
,
'Sale Trade Condition'
,
'Internal Trade Condition'
,
):
module
=
portal
.
getDefaultModule
(
trade_condition_portal_type
)
module
.
newContent
(
portal_type
=
trade_condition_portal_type
,
id
=
'erp5_trade_ui_test_trade_condition_1'
,
source_value
=
erp5_trade_ui_test_organisation_1
,
destination_value
=
erp5_trade_ui_test_organisation_2
,
)
module
.
newContent
(
portal_type
=
trade_condition_portal_type
,
id
=
'erp5_trade_ui_test_trade_condition_2'
,
source_section_value
=
erp5_trade_ui_test_organisation_1
,
)
# an unrelated trade_condition that should not be displayed
module
.
newContent
(
portal_type
=
trade_condition_portal_type
,
id
=
'erp5_trade_ui_test_trade_condition_3'
,
)
return
"Data Created."
bt5/erp5_trade_ui_test/SkinTemplateItem/portal_skins/erp5_trade_ui_test/Zuite_createOrganisationAndTradeConditionsForTradeZuite.xml
0 → 100644
View file @
bdd4d9b4
<?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>
Zuite_createOrganisationAndTradeConditionsForTradeZuite
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade_ui_test/SkinTemplateItem/portal_skins/erp5_trade_ui_test/Zuite_deleteDataForTradeZuite.py
View file @
bdd4d9b4
portal
=
context
.
getPortalObject
()
object_value_list
=
[
getattr
(
context
.
sale_order_module
,
'erp5_trade_ui_test_sale_order_1'
,
None
)
getattr
(
portal
.
sale_order_module
,
'erp5_trade_ui_test_sale_order_1'
,
None
),
getattr
(
portal
.
organisation_module
,
'erp5_trade_ui_test_organisation_1'
,
None
),
getattr
(
portal
.
organisation_module
,
'erp5_trade_ui_test_organisation_2'
,
None
),
]
+
[
getattr
(
portal
.
getDefaultModule
(
portal_type
),
"erp5_trade_ui_test_trade_condition"
,
None
)
getattr
(
portal
.
getDefaultModule
(
portal_type
),
"erp5_trade_ui_test_trade_condition"
+
suffix
,
None
)
for
portal_type
in
(
"Internal Trade Condition"
,
"Purchase Trade Condition"
,
"Sale Trade Condition"
)
for
suffix
in
(
''
,
'_1'
,
'_2'
,
'_3'
)
]
for
object_value
in
object_value_list
:
...
...
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