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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tomáš Peterka
erp5
Commits
71e8989e
Commit
71e8989e
authored
Nov 23, 2017
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[renderjs_ui_test] Test error appearance on a hidden field
parent
6f2270f9
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
890 additions
and
0 deletions
+890
-0
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo/view_hidden_positive_only_quantity.xml
...m/portal_types/Foo/view_hidden_positive_only_quantity.xml
+83
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewHiddenErrorneousField.xml
...rtal_skins/erp5_ui_test/Foo_viewHiddenErrorneousField.xml
+149
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewHiddenErrorneousField/my_quantity.xml
...rp5_ui_test/Foo_viewHiddenErrorneousField/my_quantity.xml
+271
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewHiddenErrorneousField/read_only_quantity.xml
...test/Foo_viewHiddenErrorneousField/read_only_quantity.xml
+277
-0
bt5/erp5_ui_test/bt/template_action_path_list
bt5/erp5_ui_test/bt/template_action_path_list
+1
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testHiddenFieldError.xml
...s/renderjs_ui_notification_zuite/testHiddenFieldError.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testHiddenFieldError.zpt
...s/renderjs_ui_notification_zuite/testHiddenFieldError.zpt
+51
-0
No files found.
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo/view_hidden_positive_only_quantity.xml
0 → 100644
View file @
71e8989e
<?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>
<string>
Form with hidden quantity field with external validator asserting positiveness of the value. Used to test behaviour of errors on hidden fields.
</string>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view_hidden_positive_only_quantity
</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>
10.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
View Hidden Positive-Only Quantity
</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}/Foo_viewHiddenErrorneousField
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewHiddenErrorneousField.xml
0 → 100644
View file @
71e8989e
<?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 some integers field 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/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
my_quantity
</string>
<string>
read_only_quantity
</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>
Foo_viewHiddenErrorneousField
</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
</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/Foo_viewHiddenErrorneousField/my_quantity.xml
0 → 100644
View file @
71e8989e
This diff is collapsed.
Click to expand it.
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewHiddenErrorneousField/read_only_quantity.xml
0 → 100644
View file @
71e8989e
This diff is collapsed.
Click to expand it.
bt5/erp5_ui_test/bt/template_action_path_list
View file @
71e8989e
...
...
@@ -30,6 +30,7 @@ Foo | view_duration_field
Foo | view_formbox
Foo | view_formbox_dialog
Foo | view_formbox_fooline
Foo | view_hidden_positive_only_quantity
Foo | view_listbox
Foo | view_multiple_listbox
Foo | view_planning
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_notification_zuite/testHiddenFieldError.xml
0 → 100644
View file @
71e8989e
<?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>
testHiddenFieldError
</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_notification_zuite/testHiddenFieldError.zpt
0 → 100644
View file @
71e8989e
<html>
<head><title>
Test Invoices Report Skin Allowance
</title></head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><th
rowspan=
"1"
colspan=
"4"
>
Check that user gets notified if there is an error on a hidden field.
</th></tr>
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<tr><td>
store
</td>
<td>
${base_url}/web_site_module/renderjs_runner
</td>
<td>
renderjs_url
</td></tr>
<tr><td>
open
</td>
<td>
${renderjs_url}/#/foo_module/1/?editable=1
</td><td></td></tr>
<!-- Originaly the field was required and we tested here an empty value. Problem is that Firefox
evaluates numerical rule before required value wheras Chrome does it in the opposite direction -->
<!-- Put negative quantity so the external validator will not pass external test in the next view -->
<tr><td>
waitForElementPresent
</td>
<td>
//input[@name="field_my_quantity"]
</td><td></td></tr>
<tr><td>
type
</td>
<td>
//input[@name="field_my_quantity"]
</td>
<td>
-20
</td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<!-- Let the external validator throw an error - this time we test explicitely
for a notification with the error -->
<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="View Hidden Positive-Only Quantity"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="View Hidden Positive-Only Quantity"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//button[@data-i18n='Save']
</td><td></td></tr>
<tr><td>
waitForTextPresent
</td>
<td>
The input failed the external validator.
</td><td></td></tr>
</tbody>
</table>
</body>
</html>
\ 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