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
1
Merge Requests
1
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
Boxiang Sun
erp5
Commits
d7cedf12
Commit
d7cedf12
authored
Jun 22, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui_test: add test to check matrixbox cells TALES context
parent
78ae707c
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1245 additions
and
4 deletions
+1245
-4
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo%20Line/view_matrixbox_tales.xml
...lateItem/portal_types/Foo%20Line/view_matrixbox_tales.xml
+85
-0
bt5/erp5_ui_test/PathTemplateItem/portal_tests/matrixbox_zuite/testEditableCellTALES.xml
...em/portal_tests/matrixbox_zuite/testEditableCellTALES.xml
+58
-0
bt5/erp5_ui_test/PathTemplateItem/portal_tests/matrixbox_zuite/testEditableCellTALES.zpt
...em/portal_tests/matrixbox_zuite/testEditableCellTALES.zpt
+90
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBox/matrixbox_quantity.xml
...erp5_ui_test/FooLine_viewMatrixBox/matrixbox_quantity.xml
+5
-4
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBoxTALESContext.xml
..._skins/erp5_ui_test/FooLine_viewMatrixBoxTALESContext.xml
+152
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBoxTALESContext/matrixbox.xml
...5_ui_test/FooLine_viewMatrixBoxTALESContext/matrixbox.xml
+311
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBoxTALESContext/matrixbox_title.xml
...est/FooLine_viewMatrixBoxTALESContext/matrixbox_title.xml
+283
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBoxTALESContext/my_title.xml
...p5_ui_test/FooLine_viewMatrixBoxTALESContext/my_title.xml
+260
-0
bt5/erp5_ui_test/bt/template_action_path_list
bt5/erp5_ui_test/bt/template_action_path_list
+1
-0
No files found.
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo%20Line/view_matrixbox_tales.xml
0 → 100644
View file @
d7cedf12
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_view
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view_matrixbox_tales
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
4.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
MatrixBox TALES
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/FooLine_viewMatrixBoxTALESContext
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test/PathTemplateItem/portal_tests/matrixbox_zuite/testEditableCellTALES.xml
0 → 100644
View file @
d7cedf12
<?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>
testEditableCellTALES
</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_ui_test/PathTemplateItem/portal_tests/matrixbox_zuite/testEditableCellTALES.zpt
0 → 100644
View file @
d7cedf12
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test TALES context for editable cells
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test TALES context for editable cells
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/MatrixBoxZuite_CommonTemplate/macros/init"
/>
<!-- create one cell -->
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_createObjects?create_line:int=1
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Created Successfully.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/Zuite_waitForActivities
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Done.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/0/1/FooLine_viewMatrixBox
</td>
<td></td>
</tr>
<!-- create (only) one cell -->
<tr>
<td>
type
</td>
<td>
field_matrixbox_quantity_cell_0_0_0
</td>
<td>
1.0
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
Base_edit:method
</td>
<td></td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td>
Data updated.
</td>
<td></td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_0_0_0
</td>
<td>
1.0
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_0_0
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/0/1/FooLine_viewMatrixBoxTALESContext
</td>
<td></td>
</tr>
<!-- When a cell exist at these coordinate, `cell` in TALES context is the cell. -->
<tr>
<td>
assertValue
</td>
<td>
field_matrixbox_title_cell_0_0_0
</td>
<td>
cell_index: ['a', 'one'] cell_position: (0, 0, 0) cell:
<
Foo Line at
<tal:block
tal:replace=
"context/foo_module/getPath"
/>
/0/1/cell_0_0
>
</td>
</tr>
<!-- When no cell exist, `cell` in TALES context is None. -->
<tr>
<td>
assertValue
</td>
<td>
field_matrixbox_title_cell_1_0_0
</td>
<td>
cell_index: ['b', 'one'] cell_position: (1, 0, 0) cell: None
</td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBox/matrixbox_quantity.xml
View file @
d7cedf12
...
...
@@ -154,6 +154,10 @@
<key>
<string>
input_style
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
precision
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -255,10 +259,7 @@
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<tuple>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
<tuple/>
</tuple>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBoxTALESContext.xml
0 → 100644
View file @
d7cedf12
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_edit
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Display a matrix box for selenium tests
</string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list>
<string>
matrixbox
</string>
</list>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list>
<string>
matrixbox_title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
my_title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
FooLine_viewMatrixBoxTALESContext
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
Foo_view
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_view
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Foo Line
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBoxTALESContext/matrixbox.xml
0 → 100644
View file @
d7cedf12
This diff is collapsed.
Click to expand it.
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBoxTALESContext/matrixbox_title.xml
0 → 100644
View file @
d7cedf12
This diff is collapsed.
Click to expand it.
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBoxTALESContext/my_title.xml
0 → 100644
View file @
d7cedf12
This diff is collapsed.
Click to expand it.
bt5/erp5_ui_test/bt/template_action_path_list
View file @
d7cedf12
...
...
@@ -13,6 +13,7 @@ Foo Line | view
Foo Line | view_contentlist
Foo Line | view_dynamic_matrixbox
Foo Line | view_matrixbox
Foo Line | view_matrixbox_tales
Foo Module | do_nothing_action_jio
Foo Module | do_nothing_report_jio
Foo Module | empty_mass_action
...
...
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