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
Léo-Paul Géneau
erp5
Commits
bb0a8ddf
Commit
bb0a8ddf
authored
Jun 08, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trade_ui_test: tests for "Suppliers", "Clients", "Organisations" and "Persons" Proxy Listbox Ids
parent
3db46412
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
229 additions
and
1 deletion
+229
-1
bt5/erp5_trade_ui_test/PathTemplateItem/portal_tests/trade_zuite/testRelationFieldProxyListboxId.xml
...tal_tests/trade_zuite/testRelationFieldProxyListboxId.xml
+58
-0
bt5/erp5_trade_ui_test/PathTemplateItem/portal_tests/trade_zuite/testRelationFieldProxyListboxId.zpt
...tal_tests/trade_zuite/testRelationFieldProxyListboxId.zpt
+137
-0
bt5/erp5_trade_ui_test/SkinTemplateItem/portal_skins/erp5_trade_ui_test/Zuite_deleteDataForTradeZuite.py
...skins/erp5_trade_ui_test/Zuite_deleteDataForTradeZuite.py
+4
-0
bt5/erp5_trade_ui_test/SkinTemplateItem/portal_skins/erp5_trade_ui_test/Zuite_resetForTradeZuite.py
...rtal_skins/erp5_trade_ui_test/Zuite_resetForTradeZuite.py
+30
-1
No files found.
bt5/erp5_trade_ui_test/PathTemplateItem/portal_tests/trade_zuite/testRelationFieldProxyListboxId.xml
0 → 100644
View file @
bb0a8ddf
<?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>
testRelationFieldProxyListboxId
</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/testRelationFieldProxyListboxId.zpt
0 → 100644
View file @
bb0a8ddf
<html>
<head><title>
Test Proxy Listbox Ids on relation fields.
</title></head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"4"
>
Test Proxy Listbox Ids on relation fields.
</td></tr>
</thead>
<tbody
tal:define=
"init_method string:Zuite_createSaleOrderForTradeZuite;"
>
<!-- Setup {{{ -->
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForTradeZuite/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/sale_order_module/erp5_trade_ui_test_sale_order_1
</td>
<td></td>
</tr>
<!-- }}} -->
<tr>
<td>
clickAndWait
</td>
<td>
//input[@name="field_my_source_title"]/../input[@alt="update..."]
</td>
<td></td>
</tr>
<tr>
<td>
assertSelected
</td>
<td>
select_dialog
</td>
<td>
All
</td>
</tr>
<tr>
<td>
assertTextNotPresent
</td>
<td>
Site Error
</td>
<td></td>
</tr>
<tr>
<td>
verifyPortalStatusMessage
</td>
<td>
Please select one object.
</td>
<td></td>
</tr>
<tr>
<td>
assertTextNotPresent
</td>
<td>
Site Error
</td>
<td></td>
</tr>
<tal:block
tal:repeat=
"node_title python: ('Organisation supplier', 'Organisation client', 'Person supplier', 'Person client')"
>
<tr>
<td>
assertElementPresent
</td>
<td>
//table[contains(@class, "listbox")]//tr/td[2]/a[text() = "
<tal:block
tal:replace=
"node_title"
/>
"]
</td>
<td></td>
</tr>
</tal:block>
<tr>
<td>
selectAndWait
</td>
<td>
select_dialog
</td>
<td>
Suppliers
</td>
</tr>
<tal:block
tal:repeat=
"node_title python: ('Organisation supplier', 'Person supplier', )"
>
<tr>
<td>
assertElementPresent
</td>
<td>
//table[contains(@class, "listbox")]//tr/td[2]/a[text() = "
<tal:block
tal:replace=
"node_title"
/>
"]
</td>
<td></td>
</tr>
</tal:block>
<tal:block
tal:repeat=
"node_title python: ('Organisation client', 'Person client')"
>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//table[contains(@class, "listbox")]//tr/td[2]/a[text() = "
<tal:block
tal:replace=
"node_title"
/>
"]
</td>
<td></td>
</tr>
</tal:block>
<tr>
<td>
selectAndWait
</td>
<td>
select_dialog
</td>
<td>
Clients
</td>
</tr>
<tal:block
tal:repeat=
"node_title python: ('Organisation client', 'Person client')"
>
<tr>
<td>
assertElementPresent
</td>
<td>
//table[contains(@class, "listbox")]//tr/td[2]/a[text() = "
<tal:block
tal:replace=
"node_title"
/>
"]
</td>
<td></td>
</tr>
</tal:block>
<tal:block
tal:repeat=
"node_title python: ('Organisation supplier', 'Person supplier', )"
>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//table[contains(@class, "listbox")]//tr/td[2]/a[text() = "
<tal:block
tal:replace=
"node_title"
/>
"]
</td>
<td></td>
</tr>
</tal:block>
<tr>
<td>
selectAndWait
</td>
<td>
select_dialog
</td>
<td>
Organisations
</td>
</tr>
<tal:block
tal:repeat=
"node_title python: ('Organisation supplier', 'Organisation client', )"
>
<tr>
<td>
assertElementPresent
</td>
<td>
//table[contains(@class, "listbox")]//tr/td[2]/a[text() = "
<tal:block
tal:replace=
"node_title"
/>
"]
</td>
<td></td>
</tr>
</tal:block>
<tal:block
tal:repeat=
"node_title python: ('Person supplier', 'Person client')"
>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//table[contains(@class, "listbox")]//tr/td[2]/a[text() = "
<tal:block
tal:replace=
"node_title"
/>
"]
</td>
<td></td>
</tr>
</tal:block>
<tr>
<td>
selectAndWait
</td>
<td>
select_dialog
</td>
<td>
Persons
</td>
</tr>
<tal:block
tal:repeat=
"node_title python: ('Person supplier', 'Person client')"
>
<tr>
<td>
assertElementPresent
</td>
<td>
//table[contains(@class, "listbox")]//tr/td[2]/a[text() = "
<tal:block
tal:replace=
"node_title"
/>
"]
</td>
<td></td>
</tr>
</tal:block>
<tal:block
tal:repeat=
"node_title python: ('Organisation supplier', 'Organisation client', )"
>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//table[contains(@class, "listbox")]//tr/td[2]/a[text() = "
<tal:block
tal:replace=
"node_title"
/>
"]
</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_deleteDataForTradeZuite.py
View file @
bb0a8ddf
...
@@ -4,6 +4,10 @@ object_value_list = [
...
@@ -4,6 +4,10 @@ object_value_list = [
getattr
(
portal
.
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_1'
,
None
),
getattr
(
portal
.
organisation_module
,
'erp5_trade_ui_test_organisation_2'
,
None
),
getattr
(
portal
.
organisation_module
,
'erp5_trade_ui_test_organisation_2'
,
None
),
getattr
(
portal
.
organisation_module
,
'test_trade_ui_test_supplier'
,
None
),
getattr
(
portal
.
organisation_module
,
'test_trade_ui_test_client'
,
None
),
getattr
(
portal
.
person_module
,
'test_trade_ui_test_supplier'
,
None
),
getattr
(
portal
.
person_module
,
'test_trade_ui_test_client'
,
None
),
]
+
[
]
+
[
getattr
(
portal
.
getDefaultModule
(
portal_type
),
"erp5_trade_ui_test_trade_condition"
+
suffix
,
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
portal_type
in
(
"Internal Trade Condition"
,
"Purchase Trade Condition"
,
"Sale Trade Condition"
)
...
...
bt5/erp5_trade_ui_test/SkinTemplateItem/portal_skins/erp5_trade_ui_test/Zuite_resetForTradeZuite.py
View file @
bb0a8ddf
portal
=
context
.
getPortalObject
()
# Reset selections
# Reset selections
selection_tool
=
context
.
getPortalObject
()
.
portal_selections
selection_tool
=
portal
.
portal_selections
selection_tool
.
setSelectionFor
(
'sale_order_selection'
,
None
)
selection_tool
.
setSelectionFor
(
'sale_order_selection'
,
None
)
# Create role categories
role_base_category
=
portal
.
restrictedTraverse
(
'portal_categories/role'
)
for
role_id
,
role_title
in
(
(
'client'
,
'Client'
),
(
'supplier'
,
'Supplier'
)):
if
role_base_category
.
get
(
role_id
)
is
None
:
role_base_category
.
newContent
(
portal_type
=
'Category'
,
id
=
role_id
,
title
=
role_title
)
# Set system preferences
preference
=
portal
.
portal_preferences
.
getActiveSystemPreference
()
preference
.
setPreferredClientRoleList
([
'role/client'
])
preference
.
setPreferredSupplierRoleList
([
'role/supplier'
])
# Create some nodes
for
portal_type
in
(
'Person'
,
'Organisation'
):
for
role
in
(
'client'
,
'supplier'
):
portal
.
getDefaultModule
(
portal_type
).
newContent
(
id
=
'test_trade_ui_test_'
+
role
,
portal_type
=
portal_type
,
title
=
'%s %s'
%
(
portal_type
,
role
),
role_value
=
role_base_category
[
role
],
).
validate
()
return
"Reset Successfully."
return
"Reset 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