Commit cb49c4ca authored by Boris Kocherov's avatar Boris Kocherov Committed by Romain Courteaud

[erp5_officejs_ui_test] add replication OnlyOffice.cell test

replication test
parent e88b130f
<?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>testOnlyfficeSpreadsheetErp5Synchronization</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>
</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"/>
<tr>
<td>store</td>
<td tal:content="python: 'test.officejs.onlyoffice.spreadsheet.replication.xlsy.%s' % DateTime().strftime('%Y%m%d%H%M%S')">Titre</td>
<td>title</td>
</tr>
<tr>
<td>store</td>
<td>ooffice_spreadsheet</td>
<td>test_url</td>
</tr>
<!-- Initialize -->
<tr>
<td>open</td>
<td>${base_url}/document_module/test_officejs_onlyoffice_spreadsheet_replication_xlsy</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=Base_createCloneDocument:method</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_createCloneDocument:method</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Created Clone Spreadsheet.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=field_my_title</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_my_title</td>
<td>${title}</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_edit:method</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//span[text()='Metadata']/..</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=field_my_id</td>
<td></td>
</tr>
<tr>
<td>storeValue</td>
<td>name=field_my_id</td>
<td>id</td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/document_module/Zuite_waitForActivities</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_site_module/${test_url}/</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/choice_erp5_storage"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"/>
<!--1-->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/open_document_with_title"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/click_to_content"/><!-- first time after open -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load"/>
<tal:block tal:define="check_value string:1;
set_value string:2">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOfficeCell/macros/current_cell" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/save"/>
<!-- XXX Romain -->
<!--tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/open_document_with_title"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/click_to_content"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load"/>
<tal:block tal:define="check_value string:2;
set_value string:2">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOfficeCell/macros/current_cell" />
</tal:block-->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/synchronize"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"/>
<!-- XXX Romain -->
<!--tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/open_document_with_title"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/click_to_content"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load"/>
<tal:block tal:define="check_value string:2;
set_value string:2">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOfficeCell/macros/current_cell" />
</tal:block-->
<!-- if remove these two lines test passes -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/choice_erp5_storage"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"/>
<!--2-->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/open_document_with_title"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/wait_for_load"/>
<tal:block tal:define="check_value string:2;
set_value string:3">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOfficeCell/macros/current_cell" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/remove_document_by_id"/>
</tbody>
</table>
</body>
</html>
\ 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>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>description</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>text</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Common Template for PTZuite, it will reuse parts of the Listbox Zuite</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_CommonTemplateForOnlyOfficeCell</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>Common Template for All OnlyOffice Zuite</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="current_cell">
<tr>
<td colspan="3"><b tal:content="string:Check current cell=${check_value}"></b></td>
</tr>
<tr>
<td>assertValue</td>
<td>//textarea[@id='ce-cell-content']</td>
<td tal:content="check_value"></td>
</tr>
<tr>
<td colspan="3"><b tal:content="string:Set current cell=${set_value}"></b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@id='ce-cell-content' and not(contains(@class, "disabled"))]</td>
<td></td>
</tr>
<tr>
<td>fireEvent</td>
<td>//textarea[@id='ce-cell-content']</td>
<td>focus</td>
</tr>
<tr>
<td>fireEvent</td>
<td>//textarea[@id='ce-cell-content']</td>
<td>input</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@id='ce-cell-content']</td>
<td tal:content="set_value"></td>
</tr>
<tr>
<td>fireEvent</td>
<td>//textarea[@id='ce-cell-content']</td>
<td>input</td>
</tr>
</tal:block>
</tal:block>
\ No newline at end of file
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