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

[erp5_officejs_ui_test] testing open complex OnlyOffice document

parent f91480c7
<?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>testOnlyfficeSpreadsheetComplexDocument</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"/>
<!-- Initialize -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/ooffice_spreadsheet?ignore_layout:int=1&editable_mode:int=1</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=Base_createCloneDocument:method</td>
<td></td>
field_my_id
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_createCloneDocument:method</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Created Clone Web Site</td>
<td></td>
</tr>
<tr>
<td>storeValue</td>
<td>name=field_my_id</td>
<td>test_url</td>
</tr>
<!-- Generic Officejs Test -->
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities"/>
<tr>
<td>open</td>
<td>${base_url}/web_site_module/${test_url}/</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Storages"]</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_site_module/manage_main</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=ids:list</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=ids:list</td>
<td>${test_url}</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=manage_delObjects:method</td>
<td></td>
</tr>
<!-- Offline Test -->
<tr>
<td>store</td>
<td>test.officejs.onlyoffice.spreadsheet.1.xlsy</td>
<td>title</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"/>
<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"/>
<tr>
<td>click</td>
<td>//li[@data-label="Sheet2"]/a</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/click_to_align_center"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/wait_align_center"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/save"/>
<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/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"/>
<tr>
<td>click</td>
<td>//li[@data-label="Sheet2"]/a</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/wait_align_center"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/click_to_align_center"/>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOnlyOffice/macros/save"/>
</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_CommonTemplateForOnlyOffice</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="wait_for_load">
<!-- Wait for OnlyOffice run -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='asc-loadmask-title']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>identifier=ws-canvas</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@id='id-toolbar-btn-align-center' and not(contains(@class, "disabled"))]</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="open_document_with_title">
<tr>
<td colspan="3"><b>Open Document</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="search"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="search"]</td>
<td>${title}</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[contains(@class, "search_button")]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[contains(@class, "search_button")]</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>
</tal:block>
<tal:block metal:define-macro="save">
<tr>
<td colspan="3"><b>Save</b></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>
<!-- First loader while calling Base_edit -->
<tr>
<td>waitForElementPresent</td>
<td>//h1[@class="ui-title"]//a[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<!-- Save Button is disabled -->
<tr>
<td>verifyElementPresent</td>
<td>//button[@data-i18n="Save"][contains(@class, "ui-disabled")]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data Updated</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>2000</td>
<td></td>
</tr>
<!-- Second loader while updating the page -->
<!--
<tr>
<td>waitForElementPresent</td>
<td>//h1[@class="ui-title"]//a[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<!-- Save Button is disabled -->
<!--
<tr>
<td>verifyElementPresent</td>
<td>//button[@data-i18n="Save"][contains(@class, "ui-disabled")]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//h1[@class="ui-title"]//a[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@data-i18n="Save"][contains(@class, "ui-icon-check")]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
<-->
</tal:block>
<tal:block metal:define-macro="click_to_align_center">
<tr>
<td>waitForElementPresent</td>
<td>//button[@id='id-toolbar-btn-align-center' and not(contains(@class, "disabled"))]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@id='id-toolbar-btn-align-center']</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="wait_align_center">
<tr>
<td>waitForElementPresent</td>
<td>//button[@id='id-toolbar-btn-align-center' and contains(@class, "active")]</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="click_to_content">
<tr>
<td colspan="3"><b>Click to Content</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Content</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=Content</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="synchronize">
<tr>
<td colspan="3"><b>Synchronize</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Synchronize"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Synchronize"]</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="choice_erp5_storage">
<tr>
<td colspan="3"><b>Select Erp5 storage</b></td>
</tr>
<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=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><tal:block metal:define-slot="hateoas_url">${base_url}/web_site_module/</tal:block></td>
</tr>
<tr>
<td>click</td>
<td>name=submit</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="remove_document_by_id">
<tr>
<td colspan="3"><b>Remove Document with ${id}</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/document_module/manage_main</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=ids:list</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=ids:list</td>
<td>${id}</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=manage_delObjects:method</td>
<td></td>
</tr>
</tal:block>
</tal:block>
\ No newline at end of file
document_module/test_officejs_*
portal_tests/officejs_ui_*_zuite
portal_tests/officejs_ui_*_zuite/**
\ 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