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
Alexander Emmerich
erp5
Commits
0d6e0c25
Commit
0d6e0c25
authored
Aug 29, 2017
by
Tomáš Peterka
Committed by
Tomáš Peterka
Sep 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[renderjs_ui] MatrixBox tests
parent
dba89161
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1318 additions
and
9 deletions
+1318
-9
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo%20Line/view_dynamic_matrixbox.xml
...teItem/portal_types/Foo%20Line/view_dynamic_matrixbox.xml
+85
-0
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo%20Line/view_matrixbox.xml
...onTemplateItem/portal_types/Foo%20Line/view_matrixbox.xml
+85
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewDynamicMatrixBox/matrixbox_quantity.xml
..._test/FooLine_viewDynamicMatrixBox/matrixbox_quantity.xml
+26
-6
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBox/matrixbox_quantity.xml
...erp5_ui_test/FooLine_viewMatrixBox/matrixbox_quantity.xml
+21
-2
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Validator_positiveNumber.py
...tem/portal_skins/erp5_ui_test/Validator_positiveNumber.py
+7
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Validator_positiveNumber.xml
...em/portal_skins/erp5_ui_test/Validator_positiveNumber.xml
+66
-0
bt5/erp5_ui_test/bt/template_action_path_list
bt5/erp5_ui_test/bt/template_action_path_list
+3
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite.xml
...TemplateItem/portal_tests/renderjs_ui_matrixbox_zuite.xml
+26
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testColumnTitle.xml
...tal_tests/renderjs_ui_matrixbox_zuite/testColumnTitle.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testColumnTitle.zpt
...tal_tests/renderjs_ui_matrixbox_zuite/testColumnTitle.zpt
+61
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testCreateCell.xml
...rtal_tests/renderjs_ui_matrixbox_zuite/testCreateCell.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testCreateCell.zpt
...rtal_tests/renderjs_ui_matrixbox_zuite/testCreateCell.zpt
+167
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testDynamicColumnTitle.xml
...ts/renderjs_ui_matrixbox_zuite/testDynamicColumnTitle.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testDynamicColumnTitle.zpt
...ts/renderjs_ui_matrixbox_zuite/testDynamicColumnTitle.zpt
+64
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testDynamicCreateCell.xml
...sts/renderjs_ui_matrixbox_zuite/testDynamicCreateCell.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testDynamicCreateCell.zpt
...sts/renderjs_ui_matrixbox_zuite/testDynamicCreateCell.zpt
+171
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testValidationOnEditableCell.xml
...derjs_ui_matrixbox_zuite/testValidationOnEditableCell.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testValidationOnEditableCell.zpt
...derjs_ui_matrixbox_zuite/testValidationOnEditableCell.zpt
+93
-0
bt5/erp5_web_renderjs_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalRJSMatrixbox.py
...portal_components/test.erp5.testFunctionalRJSMatrixbox.py
+47
-0
bt5/erp5_web_renderjs_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalRJSMatrixbox.xml
...ortal_components/test.erp5.testFunctionalRJSMatrixbox.xml
+102
-0
bt5/erp5_web_renderjs_ui_test/bt/template_path_list
bt5/erp5_web_renderjs_ui_test/bt/template_path_list
+2
-0
bt5/erp5_web_renderjs_ui_test/bt/template_test_id_list
bt5/erp5_web_renderjs_ui_test/bt/template_test_id_list
+2
-1
No files found.
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo%20Line/view_dynamic_matrixbox.xml
0 → 100644
View file @
0d6e0c25
<?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_dynamic_matrixbox
</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>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Dynamic MatrixBox
</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_viewDynamicMatrixBox
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo%20Line/view_matrixbox.xml
0 → 100644
View file @
0d6e0c25
<?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
</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>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
MatrixBox
</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_viewMatrixBox
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewDynamicMatrixBox/matrixbox_quantity.xml
View file @
0d6e0c25
...
...
@@ -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>
...
...
@@ -211,7 +215,9 @@
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
...
...
@@ -225,9 +231,13 @@
<key>
<string>
input_style
</string>
</key>
<value>
<string>
-1 234.5
</string>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string>
text
</string>
</value>
</item>
<item>
<key>
<string>
precision
</string>
</key>
<value>
<
string></string
>
</value>
<value>
<
int>
1
</int
>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
...
...
@@ -249,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>
...
...
@@ -263,4 +270,17 @@
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
Validator_positiveNumber
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooLine_viewMatrixBox/matrixbox_quantity.xml
View file @
0d6e0c25
...
...
@@ -211,7 +211,9 @@
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
...
...
@@ -225,9 +227,13 @@
<key>
<string>
input_style
</string>
</key>
<value>
<string>
-1 234.5
</string>
</value>
</item>
<item>
<key>
<string>
input_type
</string>
</key>
<value>
<string>
text
</string>
</value>
</item>
<item>
<key>
<string>
precision
</string>
</key>
<value>
<
string></string
>
</value>
<value>
<
int>
1
</int
>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
...
...
@@ -263,4 +269,17 @@
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
Validator_positiveNumber
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Validator_positiveNumber.py
0 → 100644
View file @
0d6e0c25
if
value
:
try
:
return
float
(
value
)
>
0
except
ValueError
:
# conversion error - not a number
return
True
return
True
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Validator_positiveNumber.xml
0 → 100644
View file @
0d6e0c25
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Python Script"
module=
"erp5.portal_type"
/>
</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>
value, REQUEST
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Validator_positiveNumber
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Python Script
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test/bt/template_action_path_list
View file @
0d6e0c25
...
...
@@ -5,6 +5,9 @@ Bar | view
Bar | view_datetime_field
Foo Bar Module | view
Foo Line | view
Foo Line | view_contentlist
Foo Line | view_dynamic_matrixbox
Foo Line | view_matrixbox
Foo Module | do_nothing_report_jio
Foo Module | list
Foo Module | list_ui
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite.xml
0 → 100644
View file @
0d6e0c25
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Zuite"
module=
"Products.Zelenium.zuite"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
renderjs_ui_matrixbox_zuite
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testColumnTitle.xml
0 → 100644
View file @
0d6e0c25
<?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>
testColumnTitle
</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_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testColumnTitle.zpt
0 → 100644
View file @
0d6e0c25
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<!-- Test MatrixBox functionality to
- render correct header
- render correct column names
-->
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test MatrixBox Column Title
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test MatrixBox Column Title
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/MatrixBoxZuite_CommonTemplate/macros/init"
/>
<!-- Shortcut for full renderjs url -->
<tr><td>
store
</td>
<td>
${base_url}/web_site_module/renderjs_runner
</td>
<td>
renderjs_url
</td></tr>
<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>
${renderjs_url}/#/foo_module/0/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="MatrixBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="MatrixBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="field_matrixbox"]//tbody/tr/th
</td><td></td></tr>
<!-- Verify presence of header and column texts -->
<tr><td>
verifyText
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//thead/tr/th[2]
</td>
<td>
One
</td></tr>
<tr><td>
verifyText
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//thead/tr/th[3]
</td>
<td>
Two
</td></tr>
<tr><td>
verifyText
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//tbody/tr[1]/th
</td>
<td>
A
</td></tr>
<tr><td>
verifyText
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//tbody/tr[2]/th
</td>
<td>
B
</td></tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testCreateCell.xml
0 → 100644
View file @
0d6e0c25
<?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>
testCreateCell
</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_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testCreateCell.zpt
0 → 100644
View file @
0d6e0c25
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<!-- Test MatrixBox functionality to
- create one embedded Cell Line
- create second embedded Cell Line
-->
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test MatrixBox Column Title
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test MatrixBox Column Title
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/MatrixBoxZuite_CommonTemplate/macros/init"
/>
<!-- Shortcut for full renderjs url and matrixbox gadget -->
<tr><td>
store
</td>
<td>
${base_url}/web_site_module/renderjs_runner
</td>
<td>
renderjs_url
</td></tr>
<tr><td>
store
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table
</td>
<td>
listbox_table
</td></tr>
<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>
${renderjs_url}/#/foo_module/0/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="MatrixBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="MatrixBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//input[@name="field_matrixbox_quantity_cell_0_0_0"]
</td><td></td></tr>
<tr><td>
type
</td>
<td>
field_matrixbox_quantity_cell_0_0_0
</td>
<td>
1.0
</td></tr>
<tr><td>
click
</td>
<td>
//button[@data-i18n="Save"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr><td>
waitForTextPresent
</td>
<td>
Data updated.
</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_0_1_0
</td>
<td></td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_0_0
</td>
<td></td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_1_0
</td>
<td></td></tr>
<!-- Test that exactly one record was created using general-purpose ListBox -->
<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>
${renderjs_url}/#/foo_module/0/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="ListBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="ListBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
${listbox_table}/tbody/tr
</td><td></td></tr>
<tr><td>
verifyElementNotPresent
</td>
<td>
${listbox_table}/tbody/tr[2]
</td><td></td></tr>
<tr><td>
goBack
</td><td></td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="MatrixBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="MatrixBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//input[@name="field_matrixbox_quantity_cell_0_1_0"]
</td><td></td></tr>
<tr><td>
type
</td>
<td>
field_matrixbox_quantity_cell_0_1_0
</td>
<td>
2.0
</td></tr>
<tr><td>
click
</td>
<td>
//button[@data-i18n="Save"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr><td>
waitForTextPresent
</td>
<td>
Data updated.
</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_0_1_0
</td>
<td>
2.0
</td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_0_0
</td>
<td></td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_1_0
</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>
${renderjs_url}/#/foo_module/0/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="ListBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="ListBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
${listbox_table}/tbody/tr
</td><td></td></tr>
<tr><td>
verifyElementPresent
</td>
<td>
${listbox_table}/tbody/tr[2]
</td><td></td></tr>
<tr><td>
verifyElementNotPresent
</td>
<td>
${listbox_table}/tbody/tr[3]
</td><td></td></tr>
<tr><td>
assertTextPresent
</td>
<td>
2 Records
</td><td></td></tr>
<!-- Matrix box editable fields can use the cell coordinates as "cell_index" in their TALES-->
<tr><td>
open
</td>
<td>
${base_url}/foo_module/0/1/cell_0_0/getTitle
</td><td></td></tr>
<tr><td>
verifyTextPresent
</td>
<td>
a,one
</td><td></td></tr>
<tr><td>
open
</td>
<td>
${base_url}/foo_module/0/1/cell_0_1/getTitle
</td><td></td></tr>
<tr><td>
verifyTextPresent
</td>
<td>
a,two
</td><td></td></tr>
<!-- Matrix box global properties fields can be used to edit all cells with the
same values. The field must be in the 'bottom' group for this to work.
Kato: I don't understand this part of the test - just copy&pasted from the old test.
-->
<tr><td>
open
</td>
<td>
${base_url}/foo_module/0/1/cell_0_0/getFooCategoryTitleList
</td><td></td></tr>
<tr><td>
verifyTextPresent
</td>
<td>
['a', 'b']
</td><td></td></tr>
<tr><td>
open
</td>
<td>
${base_url}/foo_module/0/1/cell_0_1/getFooCategoryTitleList
</td><td></td></tr>
<tr><td>
verifyTextPresent
</td>
<td>
['a', 'b']
</td><td></td></tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testDynamicColumnTitle.xml
0 → 100644
View file @
0d6e0c25
<?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>
testDynamicColumnTitle
</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_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testDynamicColumnTitle.zpt
0 → 100644
View file @
0d6e0c25
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<!-- Test verify that Dynamic MatrixBox has
- correct header
- correct row titles
-->
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test Dynamic MatrixBox Column Title
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test Dynamic MatrixBox Column Title
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/MatrixBoxZuite_CommonTemplate/macros/init"
/>
<!-- Shortcut for full renderjs url -->
<tr><td>
store
</td>
<td>
${base_url}/web_site_module/renderjs_runner
</td>
<td>
renderjs_url
</td></tr>
<tr><td>
store
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//table
</td>
<td>
matrixbox_table
</td></tr>
<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>
${renderjs_url}/#/foo_module/0/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Dynamic MatrixBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Dynamic MatrixBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
${matrixbox_table}/tbody/tr/th
</td><td></td></tr>
<tr><td>
verifyText
</td>
<td>
${matrixbox_table}/thead/tr/th[2]
</td>
<td>
Three
</td></tr>
<tr><td>
verifyText
</td>
<td>
${matrixbox_table}/thead/tr/th[3]
</td>
<td>
Four
</td></tr>
<tr><td>
verifyText
</td>
<td>
${matrixbox_table}/tbody/tr[1]/th
</td>
<td>
C
</td></tr>
<tr><td>
verifyText
</td>
<td>
${matrixbox_table}/tbody/tr[2]/th
</td>
<td>
D
</td></tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testDynamicCreateCell.xml
0 → 100644
View file @
0d6e0c25
<?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>
testDynamicCreateCell
</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_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testDynamicCreateCell.zpt
0 → 100644
View file @
0d6e0c25
<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 Dynamic MatrixBox Cell Creation
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test Dynamic MatrixBox Cell Creation
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/MatrixBoxZuite_CommonTemplate/macros/init"
/>
<!-- Shortcut for full renderjs url -->
<tr><td>
store
</td>
<td>
${base_url}/web_site_module/renderjs_runner
</td>
<td>
renderjs_url
</td></tr>
<tr><td>
store
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//table
</td>
<td>
matrixbox_table
</td></tr>
<tr><td>
store
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table
</td>
<td>
listbox_table
</td></tr>
<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>
${renderjs_url}/#/foo_module/0/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Dynamic MatrixBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Dynamic MatrixBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
${matrixbox_table}//input[@name="field_matrixbox_quantity_cell_0_0_0"]
</td><td></td></tr>
<tr><td>
type
</td>
<td>
field_matrixbox_quantity_cell_0_0_0
</td>
<td>
1.0
</td></tr>
<tr><td>
click
</td>
<td>
//button[@data-i18n="Save"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr><td>
waitForTextPresent
</td>
<td>
Data updated.
</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_0_1_0
</td>
<td></td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_0_0
</td>
<td></td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_1_0
</td>
<td></td></tr>
<!-- Test that exactly one record was created using general-purpose ListBox -->
<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>
${renderjs_url}/#/foo_module/0/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="ListBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="ListBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
${listbox_table}/tbody/tr
</td><td></td></tr>
<tr><td>
verifyElementNotPresent
</td>
<td>
${listbox_table}/tbody/tr[2]
</td><td></td></tr>
<tr><td>
goBack
</td><td></td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Dynamic MatrixBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Dynamic MatrixBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//input[@name="field_matrixbox_quantity_cell_0_1_0"]
</td><td></td></tr>
<tr><td>
type
</td>
<td>
field_matrixbox_quantity_cell_0_1_0
</td>
<td>
2.0
</td></tr>
<tr><td>
click
</td>
<td>
//button[@data-i18n="Save"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr><td>
waitForTextPresent
</td>
<td>
Data updated.
</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_0_1_0
</td>
<td>
2.0
</td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_0_0
</td>
<td></td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_1_0
</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>
${renderjs_url}/#/foo_module/0/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="ListBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="ListBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
${listbox_table}/tbody/tr
</td><td></td></tr>
<tr><td>
verifyElementPresent
</td>
<td>
${listbox_table}/tbody/tr[2]
</td><td></td></tr>
<tr><td>
verifyElementNotPresent
</td>
<td>
${listbox_table}/tbody/tr[3]
</td><td></td></tr>
<tr><td>
assertTextPresent
</td>
<td>
2 Records
</td><td></td></tr>
<!-- Matrix box editable fields can use the cell coordinates as "cell_index" in their TALES-->
<tr><td>
open
</td>
<td>
${base_url}/foo_module/0/1/cell_0_0/getTitle
</td><td></td></tr>
<tr><td>
verifyTextPresent
</td>
<td>
c,four
</td><td></td></tr>
<tr><td>
open
</td>
<td>
${base_url}/foo_module/0/1/cell_0_1/getTitle
</td><td></td></tr>
<tr><td>
verifyTextPresent
</td>
<td>
c,three
</td><td></td></tr>
<!-- Matrix box global properties fields can be used to edit all cells with the
same values. The field must be in the 'bottom' group for this to work.
Kato: I don't understand this part of the test - just copy&pasted from the old test.
-->
<tr><td>
open
</td>
<td>
${base_url}/foo_module/0/1/cell_0_0/getFooCategoryTitleList
</td><td></td></tr>
<tr><td>
verifyTextPresent
</td>
<td>
['a', 'b']
</td><td></td></tr>
<tr><td>
open
</td>
<td>
${base_url}/foo_module/0/1/cell_0_1/getFooCategoryTitleList
</td><td></td></tr>
<tr><td>
verifyTextPresent
</td>
<td>
['a', 'b']
</td><td></td></tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testValidationOnEditableCell.xml
0 → 100644
View file @
0d6e0c25
<?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>
testValidationOnEditableCell
</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_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_matrixbox_zuite/testValidationOnEditableCell.zpt
0 → 100644
View file @
0d6e0c25
<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 Validation on editable cells
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test validation on editable cells
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/MatrixBoxZuite_CommonTemplate/macros/init"
/>
<!-- Shortcut for full renderjs url -->
<tr><td>
store
</td>
<td>
${base_url}/web_site_module/renderjs_runner
</td>
<td>
renderjs_url
</td></tr>
<tr><td>
store
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_matrixbox.html"]//table
</td>
<td>
matrixbox_table
</td></tr>
<tr><td>
store
</td>
<td>
//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table
</td>
<td>
listbox_table
</td></tr>
<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>
${renderjs_url}/#/foo_module/0/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Views"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Dynamic MatrixBox"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Dynamic MatrixBox"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
${matrixbox_table}//input[@name="field_matrixbox_quantity_cell_0_0_0"]
</td><td></td></tr>
<!-- We cannot just type garbage like in XHTML skin because we are using proper
number fields. Thus there is an external validator which raises when the
value is < 0 -->
<tr><td>
type
</td>
<td>
field_matrixbox_quantity_cell_0_0_0
</td>
<td>
-2
</td></tr>
<tr><td>
type
</td>
<td>
field_matrixbox_quantity_cell_0_1_0
</td>
<td>
2
</td></tr>
<tr><td>
click
</td>
<td>
//button[@data-i18n="Save"]
</td><td></td></tr>
<tr><td>
waitForTextPresent
</td>
<td>
Input data has errors.
</td><td></td></tr>
<!-- Verify no data loss (and correct formating with precision=1)-->
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_0_0_0
</td>
<td>
-2.0
</td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_0_1_0
</td>
<td>
2.0
</td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_0_0
</td>
<td></td></tr>
<tr><td>
verifyValue
</td>
<td>
field_matrixbox_quantity_cell_1_1_0
</td>
<td></td></tr>
<!-- create cells -->
<tr><td>
type
</td>
<td>
field_matrixbox_quantity_cell_0_0_0
</td>
<td>
1
</td></tr>
<tr><td>
type
</td>
<td>
field_matrixbox_quantity_cell_0_1_0
</td>
<td>
2
</td></tr>
<tr><td>
click
</td>
<td>
//button[@data-i18n="Save"]
</td><td></td></tr>
<tr><td>
waitForTextPresent
</td>
<td>
Data updated.
</td><td></td></tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalRJSMatrixbox.py
0 → 100644
View file @
0d6e0c25
##############################################################################
#
# Copyright (c) 2011 Nexedi SARL and Contributors. All Rights Reserved.
# Kazuhiko <kazuhiko@nexedi.com>
# Rafael Monnerat <rafael@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
unittest
from
Products.ERP5Type.tests.ERP5TypeFunctionalTestCase
import
ERP5TypeFunctionalTestCase
class
TestRenderJSUIMatrixbox
(
ERP5TypeFunctionalTestCase
):
foreground
=
0
run_only
=
"renderjs_ui_matrixbox_zuite"
def
getBusinessTemplateList
(
self
):
return
(
'erp5_web_renderjs_ui'
,
'erp5_web_renderjs_ui_test'
,
'erp5_ui_test_core'
,
)
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestRenderJSUIMatrixbox
))
return
suite
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalRJSMatrixbox.xml
0 → 100644
View file @
0d6e0c25
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testFunctionalRJSMatrixbox
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testFunctionalRJSMatrixbox
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</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>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/bt/template_path_list
View file @
0d6e0c25
...
...
@@ -12,6 +12,8 @@ portal_tests/renderjs_ui_logout_translate_zuite
portal_tests/renderjs_ui_logout_translate_zuite/**
portal_tests/renderjs_ui_logout_zuite
portal_tests/renderjs_ui_logout_zuite/**
portal_tests/renderjs_ui_matrixbox_zuite
portal_tests/renderjs_ui_matrixbox_zuite/**
portal_tests/renderjs_ui_multi_check_box_field_zuite
portal_tests/renderjs_ui_multi_check_box_field_zuite/**
portal_tests/renderjs_ui_multi_list_field_zuite
...
...
bt5/erp5_web_renderjs_ui_test/bt/template_test_id_list
View file @
0d6e0c25
...
...
@@ -14,4 +14,5 @@ test.erp5.testFunctionalRJSFormbox
test.erp5.testFunctionalRJSLogout
test.erp5.testFunctionalRJSTranslation
test.erp5.testFunctionalRJSLogoutTranslation
test.erp5.testFunctionalRJSNotification
\ No newline at end of file
test.erp5.testFunctionalRJSNotification
test.erp5.testFunctionalRJSMatrixbox
\ No newline at end of file
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