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
9c023b23
Commit
9c023b23
authored
Nov 22, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_json_editor_ui_test: Add UI tests for json editor
parent
e6c710eb
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1237 additions
and
0 deletions
+1237
-0
bt5/erp5_json_editor_ui_test/ActionTemplateItem/portal_types/Foo/view_json_editor.xml
.../ActionTemplateItem/portal_types/Foo/view_json_editor.xml
+83
-0
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite.xml
..._test/PathTemplateItem/portal_tests/json_editor_zuite.xml
+26
-0
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorCacheManifest.xml
...l_tests/json_editor_zuite/testJsonEditorCacheManifest.xml
+62
-0
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorCacheManifest.zpt
...l_tests/json_editor_zuite/testJsonEditorCacheManifest.zpt
+90
-0
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorRenderJSStyle.xml
...l_tests/json_editor_zuite/testJsonEditorRenderJSStyle.xml
+62
-0
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorRenderJSStyle.zpt
...l_tests/json_editor_zuite/testJsonEditorRenderJSStyle.zpt
+157
-0
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorXHTMLStyle.xml
...rtal_tests/json_editor_zuite/testJsonEditorXHTMLStyle.xml
+62
-0
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorXHTMLStyle.zpt
...rtal_tests/json_editor_zuite/testJsonEditorXHTMLStyle.zpt
+154
-0
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test.xml
...kinTemplateItem/portal_skins/erp5_json_editor_ui_test.xml
+47
-0
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test/Foo_viewJsonEditor.xml
...tal_skins/erp5_json_editor_ui_test/Foo_viewJsonEditor.xml
+160
-0
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test/Foo_viewJsonEditor/my_text_content.xml
...son_editor_ui_test/Foo_viewJsonEditor/my_text_content.xml
+135
-0
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test/test-schema.json.txt
...ortal_skins/erp5_json_editor_ui_test/test-schema.json.txt
+13
-0
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test/test-schema.json.xml
...ortal_skins/erp5_json_editor_ui_test/test-schema.json.xml
+28
-0
bt5/erp5_json_editor_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalJsonEditor.py
...m/portal_components/test.erp5.testFunctionalJsonEditor.py
+33
-0
bt5/erp5_json_editor_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalJsonEditor.xml
.../portal_components/test.erp5.testFunctionalJsonEditor.xml
+112
-0
bt5/erp5_json_editor_ui_test/bt/dependency_list
bt5/erp5_json_editor_ui_test/bt/dependency_list
+4
-0
bt5/erp5_json_editor_ui_test/bt/license
bt5/erp5_json_editor_ui_test/bt/license
+1
-0
bt5/erp5_json_editor_ui_test/bt/template_action_path_list
bt5/erp5_json_editor_ui_test/bt/template_action_path_list
+1
-0
bt5/erp5_json_editor_ui_test/bt/template_format_version
bt5/erp5_json_editor_ui_test/bt/template_format_version
+1
-0
bt5/erp5_json_editor_ui_test/bt/template_path_list
bt5/erp5_json_editor_ui_test/bt/template_path_list
+2
-0
bt5/erp5_json_editor_ui_test/bt/template_skin_id_list
bt5/erp5_json_editor_ui_test/bt/template_skin_id_list
+1
-0
bt5/erp5_json_editor_ui_test/bt/template_test_id_list
bt5/erp5_json_editor_ui_test/bt/template_test_id_list
+1
-0
bt5/erp5_json_editor_ui_test/bt/test_dependency_list
bt5/erp5_json_editor_ui_test/bt/test_dependency_list
+1
-0
bt5/erp5_json_editor_ui_test/bt/title
bt5/erp5_json_editor_ui_test/bt/title
+1
-0
No files found.
bt5/erp5_json_editor_ui_test/ActionTemplateItem/portal_types/Foo/view_json_editor.xml
0 → 100644
View file @
9c023b23
<?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 to edit JSON using a dummy schema.
</string>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view_json_editor
</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>
88.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
View JSON Editor
</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_viewJsonEditor
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite.xml
0 → 100644
View file @
9c023b23
<?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>
json_editor_zuite
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorCacheManifest.xml
0 → 100644
View file @
9c023b23
<?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=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
testJsonEditorCacheManifest
</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>
Json Editor Cache Manifest
</unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorCacheManifest.zpt
0 → 100644
View file @
9c023b23
<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
tal:content=
"template/title_and_id"
></title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr>
<td
rowspan=
"1"
colspan=
"3"
tal:content=
"template/title_and_id"
></td>
</tr>
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/ListBoxZuite_reset
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Make a new web site using our cache manifest
</b></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/?ignore_layout:int=1
&
editable_mode:int=1
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
name=Base_createCloneDocument:method
</td>
<td></td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td>
Created Clone Web Site.
</td>
<td></td>
</tr>
<tr>
<td>
storeValue
</td>
<td>
name=field_my_id
</td>
<td>
new_web_site_id
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
link=Layout Configuration
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
field_my_configuration_precache_manifest_script_list
</td>
<td><br/>
WebSection_getJsonEditorPrecacheManifestList
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
name=Base_edit:method
</td>
<td></td>
</tr>
<tr>
<td>
assertPortalStatusMessage
</td>
<td>
Data updated.
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Switch to renderjs UI and check the manifest is loaded
</b></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/${new_web_site_id}/#/web_page_module?editable=true
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tr>
<td>
waitForCondition
</td>
<td>
selenium.browserbot.currentWindow.navigator.serviceWorker.controller !== null
</td>
<td>
180000
</td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorRenderJSStyle.xml
0 → 100644
View file @
9c023b23
<?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=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
testJsonEditorRenderJSStyle
</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_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorRenderJSStyle.zpt
0 → 100644
View file @
9c023b23
<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>
Web Page Editor Gadget RenderJS Style
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr>
<td
rowspan=
"1"
colspan=
"3"
>
Web Page Editor Gadget RenderJS Style
</td>
</tr>
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/ListBoxZuite_reset
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Switch to renderjs UI and edit a web page
</b></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module?editable=true
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tal:block
tal:define=
"click_configuration python: {'text': 'Add'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
select
</td>
<td>
//select[@name='field_your_select_action']
</td>
<td>
label=Foo
</td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'Object created.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"click_configuration python: {'text': 'Views'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"click_configuration python: {'text': 'View JSON Editor'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td
colspan=
"3"
><b>
Wait for editor to be loaded
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
selectFrame
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
css=div.json-editor-container
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Edit Json Form Property
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td>
bar
</td>
</tr>
<tr>
<td>
selectFrame
</td>
<td>
relative=top
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tr>
<td
colspan=
"3"
><b>
Check that our edition is reflected on preview.
</b></td>
</tr>
<tal:block
tal:define=
"click_configuration python: {'text': 'Views'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"click_configuration python: {'text': 'View JSON Editor'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
selectFrame
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td>
bar
</td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorXHTMLStyle.xml
0 → 100644
View file @
9c023b23
<?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=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
testJsonEditorXHTMLStyle
</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_json_editor_ui_test/PathTemplateItem/portal_tests/json_editor_zuite/testJsonEditorXHTMLStyle.zpt
0 → 100644
View file @
9c023b23
<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>
Json Editor Gadget XHTML Style
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr>
<td
rowspan=
"1"
colspan=
"3"
>
Web Page Editor Gadget XHTML Style
</td>
</tr>
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/ListBoxZuite_reset
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_createObjects?num: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
colspan=
"3"
><b>
Edit a web page
</b></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/0/Foo_viewJsonEditor
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Wait for editor to be loaded
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-editable="field_my_text_content"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
selectFrame
</td>
<td>
//div[@data-gadget-editable="field_my_text_content"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
css=div.json-editor-container
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Edit Json Form Property
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td>
bar
</td>
</tr>
<tr>
<td>
selectFrame
</td>
<td>
relative=top
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@name='Base_edit:method']
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//button[@name='Base_edit:method']
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Check that our edition is reflected on preview
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@class="actions"]//span[text() = "View JSON Editor"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@class="actions"]//span[text() = "View JSON Editor"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//div[@class="actions"]//span[text() = "View JSON Editor"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-editable="field_my_text_content"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
selectFrame
</td>
<td>
//div[@data-gadget-editable="field_my_text_content"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td></td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
//div[@data-schemapath="root.foo"]//input
</td>
<td>
bar
</td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test.xml
0 → 100644
View file @
9c023b23
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
business_template_skin_layer_priority
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
float
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
business_template_skin_layer_priority
</string>
</key>
<value>
<float>
40.0
</float>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
erp5_json_editor_ui_test
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test/Foo_viewJsonEditor.xml
0 → 100644
View file @
9c023b23
<?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=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></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>
my_text_content
</string>
</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/>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Foo_viewJsonEditor
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
Foo_viewJsonEditor
</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>
Json Editor
</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>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test/Foo_viewJsonEditor/my_text_content.xml
0 → 100644
View file @
9c023b23
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
description
</string>
<string>
renderjs_extra
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_text_content
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Content of the web page
</string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_text_content
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
JSON Content
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(\'jio_key\', context.getRelativeUrl()), (\'editor\', \'jsoneditor\'), (\'portal_type\', context.getPortalType()), (\'maximize\', \'listbox\' not in field.id), (\'content_type\', context.getProperty(\'content_type\')), (\'language\', context.getPortalObject().Localizer.get_selected_language()), (\'schema_url\', \'test-schema.json\')]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test/test-schema.json.txt
0 → 100644
View file @
9c023b23
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Sample",
"type": "object",
"additionalProperties": false,
"properties": {
"foo": {
"description": "Foo description",
"default": "bar",
"type": "string"
}
}
}
bt5/erp5_json_editor_ui_test/SkinTemplateItem/portal_skins/erp5_json_editor_ui_test/test-schema.json.xml
0 → 100644
View file @
9c023b23
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
test-schema.json
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/plain
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_json_editor_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalJsonEditor.py
0 → 100644
View file @
9c023b23
##############################################################################
#
# Copyright (c) 2023 Nexedi SA and Contributors. All Rights Reserved.
#
# 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.
#
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeFunctionalTestCase
import
ERP5TypeFunctionalTestCase
class
TestFunctionalJsonEditor
(
ERP5TypeFunctionalTestCase
):
run_only
=
"json_editor_zuite"
del
ERP5TypeFunctionalTestCase
# ( not to run ERP5TypeFunctionalTestCase itself )
bt5/erp5_json_editor_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalJsonEditor.xml
0 → 100644
View file @
9c023b23
<?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>
testFunctionalJsonEditor
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testFunctionalJsonEditor
</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.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<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>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_json_editor_ui_test/bt/dependency_list
0 → 100644
View file @
9c023b23
erp5_administration
erp5_json_editor
erp5_ui_test_core
erp5_web_renderjs_ui_test
\ No newline at end of file
bt5/erp5_json_editor_ui_test/bt/license
0 → 100644
View file @
9c023b23
GPL
\ No newline at end of file
bt5/erp5_json_editor_ui_test/bt/template_action_path_list
0 → 100644
View file @
9c023b23
Foo | view_json_editor
\ No newline at end of file
bt5/erp5_json_editor_ui_test/bt/template_format_version
0 → 100644
View file @
9c023b23
1
\ No newline at end of file
bt5/erp5_json_editor_ui_test/bt/template_path_list
0 → 100644
View file @
9c023b23
portal_tests/json_editor_zuite
portal_tests/json_editor_zuite/**
\ No newline at end of file
bt5/erp5_json_editor_ui_test/bt/template_skin_id_list
0 → 100644
View file @
9c023b23
erp5_json_editor_ui_test
\ No newline at end of file
bt5/erp5_json_editor_ui_test/bt/template_test_id_list
0 → 100644
View file @
9c023b23
test.erp5.testFunctionalJsonEditor
\ No newline at end of file
bt5/erp5_json_editor_ui_test/bt/test_dependency_list
0 → 100644
View file @
9c023b23
erp5_full_text_mroonga_catalog
\ No newline at end of file
bt5/erp5_json_editor_ui_test/bt/title
0 → 100644
View file @
9c023b23
erp5_json_editor_ui_test
\ 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