Commit acbaec04 authored by Roque's avatar Roque

erp5_officejs: update Text Editor app configuration

- corresponding test update
parent fbd23eb3
......@@ -145,8 +145,6 @@ gadget_erp5_ojs_panel.html\n
gadget_erp5_ojs_panel.js\n
gadget_erp5_header.html\n
gadget_erp5_header.js\n
gadget_ojs_local_jio.html\n
gadget_ojs_local_jio.js\n
\n
gadget_erp5_page_ojs_configurator.html\n
gadget_erp5_page_ojs_configurator.js\n
......@@ -211,68 +209,6 @@ gadget_officejs_text_editor.json\n
officejs_logo_text_editor.png\n
gadget_officejs_text_editor_router.html\n
\n
#new approach (storage hateoas requests)\n
gadget_erp5_pt_form_view_editable.html\n
gadget_erp5_pt_form_view_editable.js\n
gadget_erp5_pt_form_dialog.html\n
gadget_erp5_pt_form_dialog.js\n
gadget_erp5_field_list.html\n
gadget_erp5_field_list.js\n
gadget_erp5_field_listbox.html\n
gadget_erp5_field_listbox.js\n
gadget_html5_select.html\n
gadget_html5_select.js\n
gadget_erp5_page_action_officejs.html\n
gadget_erp5_page_action_officejs.js\n
gadget_erp5_page_ojs_local_controller.html\n
gadget_erp5_page_ojs_local_controller.js\n
gadget_officejs_form_view.html\n
gadget_officejs_form_view.js\n
gadget_erp5_page_handle_action.html\n
gadget_erp5_page_handle_action.js\n
gadget_officejs_common_util.html\n
gadget_officejs_common_util.js\n
gadget_erp5_page_create_document.html\n
gadget_erp5_page_create_document.js\n
\n
#needed for appcachestorage sync\n
/\n
app/\n
gadget_officejs_text_editor.configuration\n
gadget_officejs_bootloader.js\n
gadget_officejs_bootloader_presentation.html\n
gadget_officejs_bootloader_presentation.js\n
gadget_officejs_bootloader_presentation.css\n
gadget_officejs_bootloader_serviceworker.js\n
officejs_logo.png\n
jio_appcachestorage.js\n
\n
action_texteditor_clone.html\n
action_texteditor_clone.js\n
\n
#configuration resources\n
\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page Module)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlIE1vZHVsZQ==\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page Module/text_editor_view)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlIE1vZHVsZS90ZXh0X2VkaXRvcl92aWV3\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdl\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page/text_editor_view)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlL3RleHRfZWRpdG9yX3ZpZXc=\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page/text_editor_clone)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlL3RleHRfZWRpdG9yX2Nsb25l\n
\n
#hateoas_appcache/definition_view/BASE64(portal_skins/erp5_text_editor/Base_viewNewContentDialogForTextEditor)\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvQmFzZV92aWV3TmV3Q29udGVudERpYWxvZ0ZvclRleHRFZGl0b3I=\n
#hateoas_appcache/definition_view/BASE64(portal_skins/erp5_text_editor/WebPageModule_viewWebPageListAsJioForTextEditor)\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvV2ViUGFnZU1vZHVsZV92aWV3V2ViUGFnZUxpc3RBc0ppb0ZvclRleHRFZGl0b3I=\n
#hateoas_appcache/definition_view/BASE64(portal_skins/erp5_text_editor/WebPage_viewAsTextDocumentForTextEditor)\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvV2ViUGFnZV92aWV3QXNUZXh0RG9jdW1lbnRGb3JUZXh0RWRpdG9y\n
#hateoas_appcache/definition_view/BASE64(portal_skins/erp5_text_editor/Base_cloneDocumentForTextEditor)\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvQmFzZV9jbG9uZURvY3VtZW50Rm9yVGV4dEVkaXRvcg==\n
\n
\n
#Ckeditor\n
ckeditor.gadget.html\n
ckeditor.gadget.js\n
......@@ -611,8 +547,71 @@ ckeditor/config.js\n
ckeditor/ckeditor.js\n
ckeditor/adapters/jquery.js\n
\n
\n
#new officejs approach\n
gadget_erp5_pt_form_view_editable.html\n
gadget_erp5_pt_form_view_editable.js\n
gadget_erp5_pt_form_dialog.html\n
gadget_erp5_pt_form_dialog.js\n
gadget_erp5_field_list.html\n
gadget_erp5_field_list.js\n
gadget_erp5_field_listbox.html\n
gadget_erp5_field_listbox.js\n
gadget_html5_select.html\n
gadget_html5_select.js\n
gadget_ojs_local_jio.html\n
gadget_ojs_local_jio.js\n
gadget_erp5_page_action_officejs.html\n
gadget_erp5_page_action_officejs.js\n
gadget_erp5_page_ojs_local_controller.html\n
gadget_erp5_page_ojs_local_controller.js\n
gadget_officejs_form_view.html\n
gadget_officejs_form_view.js\n
gadget_erp5_page_handle_action.html\n
gadget_erp5_page_handle_action.js\n
gadget_officejs_common_util.html\n
gadget_officejs_common_util.js\n
gadget_erp5_page_create_document.html\n
gadget_erp5_page_create_document.js\n
\n
#needed for appcachestorage sync\n
/\n
app/\n
gadget_officejs_text_editor.configuration\n
gadget_officejs_bootloader.js\n
gadget_officejs_bootloader_presentation.html\n
gadget_officejs_bootloader_presentation.js\n
gadget_officejs_bootloader_presentation.css\n
gadget_officejs_bootloader_serviceworker.js\n
officejs_logo.png\n
jio_appcachestorage.js\n
jio_configuration_storage.js\n
\n
#app custom actions\n
action_texteditor_clone.html\n
action_texteditor_clone.js\n
\n
#app_configuration_resources\n
#CONFIGURATION ELEMENTS generated on Fri Sep 20 09:45:43 2019. Same as in configuration manifest\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlIE1vZHVsZQ==\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlIE1vZHVsZS90ZXh0X2VkaXRvcl92aWV3\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvV2ViUGFnZU1vZHVsZV92aWV3V2ViUGFnZUxpc3RBc0ppb0ZvclRleHRFZGl0b3I=\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdl\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlL3RleHRfZWRpdG9yX3ZpZXc=\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvV2ViUGFnZV92aWV3QXNUZXh0RG9jdW1lbnRGb3JUZXh0RWRpdG9y\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlL3RleHRfZWRpdG9yX2Nsb25l\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvQmFzZV9jbG9uZURvY3VtZW50Rm9yVGV4dEVkaXRvcg==\n
#/app_configuration_resources\n
\n
\n
\n
NETWORK:\n
*</string> </value>
*\n
\n
\n
\n
\n
</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -753,7 +752,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.40995.25945.24064</string> </value>
<value> <string>978.31397.31451.12492</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -771,7 +770,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1565341519.15</float>
<float>1568707377.29</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -109,31 +109,19 @@
</item>
<item>
<key> <string>text_content</string> </key>
<value> <string>CACHE MANIFEST\n
# generated on Thu, 14 Jan 2019 11:55:33 +0000\n
<value> <string>CONFIGURATION MANIFEST\n
# generated on Fri Sep 20 09:45:43 2019\n
CACHE:\n
\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page Module)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlIE1vZHVsZQ==\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page Module/text_editor_view)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlIE1vZHVsZS90ZXh0X2VkaXRvcl92aWV3\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page)\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvV2ViUGFnZU1vZHVsZV92aWV3V2ViUGFnZUxpc3RBc0ppb0ZvclRleHRFZGl0b3I=\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdl\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page/text_editor_view)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlL3RleHRfZWRpdG9yX3ZpZXc=\n
#hateoas_appcache/definition_view/BASE64(portal_types/Web Page/text_editor_clone)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlL3RleHRfZWRpdG9yX2Nsb25l\n
\n
#hateoas_appcache/definition_view/BASE64(portal_skins/erp5_text_editor/Base_viewNewContentDialogForTextEditor)\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvQmFzZV92aWV3TmV3Q29udGVudERpYWxvZ0ZvclRleHRFZGl0b3I=\n
#hateoas_appcache/definition_view/BASE64(portal_skins/erp5_text_editor/WebPageModule_viewWebPageListAsJioForTextEditor)\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvV2ViUGFnZU1vZHVsZV92aWV3V2ViUGFnZUxpc3RBc0ppb0ZvclRleHRFZGl0b3I=\n
#hateoas_appcache/definition_view/BASE64(portal_skins/erp5_text_editor/WebPage_viewAsTextDocumentForTextEditor)\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvV2ViUGFnZV92aWV3QXNUZXh0RG9jdW1lbnRGb3JUZXh0RWRpdG9y\n
#hateoas_appcache/definition_view/BASE64(portal_skins/erp5_text_editor/Base_cloneDocumentForTextEditor)\n
hateoas_appcache/definition_view/cG9ydGFsX3R5cGVzL1dlYiBQYWdlL3RleHRfZWRpdG9yX2Nsb25l\n
hateoas_appcache/definition_view/cG9ydGFsX3NraW5zL2VycDVfdGV4dF9lZGl0b3IvQmFzZV9jbG9uZURvY3VtZW50Rm9yVGV4dEVkaXRvcg==\n
\n
\n
NETWORK:\n
*</string> </value>
</item>
......@@ -276,7 +264,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.41790.42136.10513</string> </value>
<value> <string>977.56362.16233.35328</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -294,7 +282,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1565341511.13</float>
<float>1566219739.99</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -14,21 +14,16 @@
</head>
<body>
<script data-renderjs-configuration="configuration_manifest" type="text/x-renderjs-configuration">gadget_officejs_text_editor.configuration</script>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Web Page</script>
<script data-renderjs-configuration="document_title" type="text/x-renderjs-configuration">Text Document</script>
<script data-renderjs-configuration="document_title_plural" type="text/x-renderjs-configuration">Text Documents</script>
<script data-renderjs-configuration="parent_portal_type" type="text/x-renderjs-configuration">Web Page Module</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">web_page_module</script>
<script data-renderjs-configuration="hide_listbox_buttons" type="text/x-renderjs-configuration">1</script>
<script data-renderjs-configuration="documents_editable" type="text/x-renderjs-configuration">1</script>
<script data-renderjs-configuration="portal_skin_folder" type="text/x-renderjs-configuration">erp5_text_editor</script>
<!-- TODO: somehow (a generic action?) get the path string:${object_url}/Base_viewNewContentDialogForTextEditor. For now it's in new_content_action -->
<script data-renderjs-configuration="new_content_action" type="text/x-renderjs-configuration">portal_skins/erp5_text_editor/Base_viewNewContentDialogForTextEditor</script>
<script data-renderjs-configuration="app_view_reference" type="text/x-renderjs-configuration">text_editor_view</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Web Page | text_editor_view', 'Web Page | text_editor_clone')</script>
<script data-renderjs-configuration="app_actions" type="text/x-renderjs-configuration">('Web Page | text_editor_view', 'Web Page | text_editor_clone', 'Web Page Module | text_editor_view')</script>
<script data-renderjs-configuration="app_allowed_sub_types" type="text/x-renderjs-configuration">('Web Page Module | Web Page',)</script>
<script data-renderjs-configuration="hide_header_add_button" type="text/x-renderjs-configuration">0</script>
<script data-renderjs-configuration="header_jump_button" type="text/x-renderjs-configuration">0</script>
<script data-renderjs-configuration="web_page_module_dict" type="text/x-renderjs-configuration">{"front_page": 1, "upload_button": 0, "download_button": 0, "editable": 0, "hide_add_button": 0, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 1, "panel_action": 1, "previous_next_button": 0, "history_previous_link": 0, "title": "Text Documents", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0}</script>
<script data-renderjs-configuration="web_page_dict" type="text/x-renderjs-configuration"> {"front_page": 0, "upload_button": 0, "download_button": 0, "editable": 1, "hide_add_button": 0, "jump_button": 0, "fast_input_button": 0, "export_button": 0, "filter_action": 0, "panel_action": 1, "previous_next_button": 1, "history_previous_link": 1, "title": "Text Document", "hide_listbox_buttons": 1, "blob_type": "", "blob_create_object_url": 0}</script>
<script data-renderjs-configuration="erp5_attachment_synchro" type="text/x-renderjs-configuration"></script>
<script data-renderjs-configuration="dropbox_app_key" type="text/x-renderjs-configuration">n692ixxhyg9zhqs</script>
<div data-gadget-url="gadget_erp5_router.html" data-gadget-scope="erp5_router"></div>
......
......@@ -277,7 +277,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.8695.30374.7765</string> </value>
<value> <string>978.36776.33713.12509</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -295,7 +295,7 @@
</tuple>
<state>
<tuple>
<float>1563367353.31</float>
<float>1568972733.17</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -732,7 +732,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.59928.32228.31914</string> </value>
<value> <string>978.15061.532.21862</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -750,7 +750,7 @@
</tuple>
<state>
<tuple>
<float>1562075278.62</float>
<float>1567669976.16</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -331,7 +331,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.37785.31847.31180</string> </value>
<value> <string>977.41795.8516.21060</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -349,7 +349,7 @@
</tuple>
<state>
<tuple>
<float>1565341627.79</float>
<float>1567669976.15</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -340,7 +340,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Web Pages</string> </value>
<value> <string>Documents</string> </value>
</item>
</dictionary>
</value>
......
......@@ -24,7 +24,19 @@
})
.declareMethod('handleSubmit', function (content_dict, parent_options) {
var gadget = this,
//must return a dict with:
//notify: options_dict for notifySubmitted
//redirect: options_dict for redirect
var return_submit_dict = {
notify: {
message: "",
status: ""
},
redirect: {
command: 'display',
options: {}
}
}, gadget = this,
document = parent_options.doc,
property;
delete content_dict.dialog_method;
......@@ -33,7 +45,23 @@
document[property] = content_dict[property];
}
}
return gadget.jio_post(document);
return gadget.jio_post(document)
.push(function (jio_key) {
return_submit_dict.notify.message = "Data Updated";
return_submit_dict.notify.status = "success";
return_submit_dict.redirect.options = {
jio_key: jio_key,
editable: true
};
return return_submit_dict;
}, function (error) {
if (error instanceof jIO.util.jIOError) {
return_submit_dict.notify.message = "Failure cloning document";
return_submit_dict.notify.status = "error";
return return_submit_dict;
}
throw error;
});
});
}(window, rJS, RSVP));
\ No newline at end of file
<?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>testOfficeJSTextEditorChangeBetweenStorages</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>
<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 OfficeJS UI</title>
<script src="../../web_site_module/officejs_text_editor/rsvp.js"></script>
<script src="../../web_site_module/officejs_text_editor/jiodev.js"></script>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test OfficeJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Clean Up -->
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tal:block tal:define="web_site_name python: 'officejs_text_editor'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOfficejsUi/macros/install_offline_and_redirect" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Storages']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Storages']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Local is Enough</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=Local is Enough</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<!-- As all resources are now in indexedDB, is faster than before and sometimes the header spinner icon doesn't apprear
Wait for spinner was removed, but a minimum pause is needed before perform an action -->
<tr>
<td>pause</td>
<td>100</td>
<td></td>
</tr>
<tr>
<td>store</td>
<td tal:content="python: 'Test Titre %s' % DateTime()">Titre</td>
<td>title</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python: 'Test Reference %s' % DateTime()">Reference</td>
<td>reference</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python: 'Test Language %s' % DateTime()">Language</td>
<td>language</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python: 'Test Version %s' % DateTime()">Version</td>
<td>version</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python: 'Test Description %s' % DateTime()">Description</td>
<td>description</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@title='Title']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@title='Title']</td>
<td>${title}</td>
</tr>
<tr>
<td>type</td>
<td>//input[@title='Reference']</td>
<td>${reference}</td>
</tr>
<tr>
<td>type</td>
<td>//input[@title='Version']</td>
<td>${version}</td>
</tr>
<tr>
<td>type</td>
<td>//input[@title='Language']</td>
<td>${language}</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@title='Description']</td>
<td>${description}</td>
</tr>
<tr>
<td>pause</td>
<td>100</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<!-- As all resources are now in indexedDB, is faster than before and sometimes the header spinner icon doesn't apprear
Wait for spinner was removed, but a minimum pause is needed before continue -->
<tr>
<td>pause</td>
<td>100</td>
<td></td>
</tr>
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Data Updated'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tr>
<td>click</td>
<td>//a[@data-i18n='Document']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=${title}</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=${title}</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@title='Description']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@title='Title']</td>
<td>${title}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@title='Reference']</td>
<td>${reference}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@title='Version']</td>
<td>${version}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@title='Language']</td>
<td>${language}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//textarea[@title='Description']</td>
<td>${description}</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>identifier=cke_1_contents</td>
<td></td>
</tr>
<!-- Clone action -->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Actions"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Actions"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_action_officejs.html')]//a[@data-i18n="Clone"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_page_action_officejs.html')]//a[@data-i18n="Clone"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'dialog_button_container')]//input[@value="Clone"]</td>
<td></td>
<tr>
<tr>
<td>click</td>
<td>//div[contains(@class, 'dialog_button_container')]//input[@value="Clone"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@title='Description']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@title='Title']</td>
<td>${title}</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python:'Cloned document'">Titre</td>
<td>cloned_title</td>
</tr>
<tr>
<td>type</td>
<td>//input[@title='Title']</td>
<td>${cloned_title}</td>
</tr>
<tr>
<td>pause</td>
<td>100</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<!-- As all resources are now in indexedDB, is faster than before and sometimes the header spinner icon doesn't apprear
Wait for spinner was removed, but a minimum pause is needed before continue -->
<tr>
<td>pause</td>
<td>100</td>
<td></td>
</tr>
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Data Updated'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tr>
<td>click</td>
<td>//a[@data-i18n='Document']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<!-- check that previous document still exists -->
<tr>
<td>waitForElementPresent</td>
<td>link=${title}</td>
<td></td>
</tr>
<!-- check new cloned document -->
<tr>
<td>waitForElementPresent</td>
<td>link=${cloned_title}</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=${cloned_title}</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@title='Description']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@title='Title']</td>
<td>${cloned_title}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@title='Reference']</td>
<td>${reference}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@title='Version']</td>
<td>${version}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//input[@title='Language']</td>
<td>${language}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//textarea[@title='Description']</td>
<td>${description}</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>identifier=cke_1_contents</td>
<td></td>
</tr>
<!-- change storage -->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//button[@data-i18n="Menu"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//button[@data-i18n="Menu"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_ojs_panel.html')]//a[@data-i18n="Storages"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_ojs_panel.html')]//a[@data-i18n="Storages"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Erp5</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=Erp5</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=erp5_url</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=erp5_url</td>
<td>${base_url}/web_site_module/</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Proceed']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<tr>
\ No newline at end of file
......@@ -79,7 +79,18 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<!-- due to local storage, loading is faster than display/hide header spinner
So icon doesn't appear. Using a pause (and check no-spinner after) instead. -->
<tr>
<td>pause</td>
<td>1000</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//h1//*[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>waitForElementPresent</td>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment