Commit 6cf25395 authored by Klaus Wölfel's avatar Klaus Wölfel

[erp5_officejs]: update notebook app tests and simple export test

parent 5a7282a3
<html xmlns:tal="http://xml.zope.org/namespaces/tal" <html>
xmlns:metal="http://xml.zope.org/namespaces/metal"> <head>
<head> <title tal:content="template/title">Test OfficeJS Notebook UI</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Test OfficeJS UI (expected failure)</title> </head>
<script src="../../web_site_module/officejs_notebook/rsvp.js"></script> <body>
<script src="../../web_site_module/officejs_notebook/jiodev.js"></script> <table cellpadding="1" cellspacing="1" border="1">
</head> <thead>
<body> <tr><td rowspan="1" colspan="3">Test OfficeJS Notebook UI</td></tr>
<table cellpadding="1" cellspacing="1" border="1"> </thead>
<thead> <tbody>
<tr><td rowspan="1" colspan="3">Test OfficeJS UI (expected failure)</td></tr> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
</thead><tbody> <!-- Clean Up -->
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tr>
<!-- Clean Up -->
<tr>
<td>open</td> <td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td> <td>${base_url}/web_site_module/officejs_notebook/</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tal:block tal:define="web_site_name python: 'officejs_notebook'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOfficejsUi/macros/install_offline_and_redirect" />
</tal:block>
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n='Storages']</td> <td>//a[@data-i18n="Storages"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Storages']</td> <td>//a[@data-i18n="Storages"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Local is Enough</td> <td>link=Local is Enough</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=Local is Enough</td> <td>link=Local is Enough</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Add</td> <td>link=Add</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=Add</td> <td>link=Add</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//button[@data-i18n='Save']</td> <td>//button[@data-i18n="Save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>store</td>
<td tal:content="python: 'Test Titre %s' % DateTime()">Titre</td> <td tal:content="python: 'test_text_%s' % DateTime().strftime('%Y%m%d%H%M%S')">Titre</td>
<td>title</td> <td>title</td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>store</td>
<td tal:content="python: 'Test Reference %s' % DateTime()">Reference</td> <td tal:content="python: 'Test Reference %s' % DateTime()">Reference</td>
<td>reference</td> <td>reference</td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>store</td>
<td tal:content="python: 'Test Language %s' % DateTime()">Language</td> <td tal:content="python: 'Test Language %s' % DateTime()">Language</td>
<td>language</td> <td>language</td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>store</td>
<td tal:content="python: 'Test Version %s' % DateTime()">Version</td> <td tal:content="python: 'Test Version %s' % DateTime()">Version</td>
<td>version</td> <td>version</td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>store</td>
<td tal:content="python: 'Test Description %s' % DateTime()">Description</td> <td tal:content="python: 'Test Description %s' % DateTime()">Description</td>
<td>description</td> <td>description</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@title='Title']</td> <td>//input[@title='Title']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@title='Title']</td> <td>//input[@title='Title']</td>
<td>${title}</td> <td>${title}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@title='Reference']</td> <td>//input[@title='Reference']</td>
<td>${reference}</td> <td>${reference}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@title='Version']</td> <td>//input[@title='Version']</td>
<td>${version}</td> <td>${version}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@title='Language']</td> <td>//input[@title='Language']</td>
<td>${language}</td> <td>${language}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//textarea[@title='Description']</td> <td>//textarea[@title='Description']</td>
<td>${description}</td> <td>${description}</td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//button[@data-i18n='Save']</td> <td>//button[@data-i18n='Save']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="notification"]//button[text()='Data Updated']</td> <td>//div[@data-gadget-scope="notification"]//button[text()='Data Updated']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Document']</td> <td>//a[@accesskey="s"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Add</td> <td>//a[@data-i18n='Upload']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Upload']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td>
<td>//input[@value='Upload']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Cancel"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@accesskey="s"]</td>
<td></td>
</tr>
<tal:block metal:define-macro="open_document_with_title">
<tr>
<td colspan="3"><b>Open Document</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
<td>${title}</td>
</tr>
<tr>
<td>click</td>
<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>
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=${title}</td> <td>link=${title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=${title}</td> <td>link=${title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> </tal:block>
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//textarea[@title='Description']</td> <td>//textarea[@title='Description']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>//input[@title='Title']</td> <td>//input[@title='Title']</td>
<td>${title}</td> <td>${title}</td>
</tr> </tr>
<tr> <tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>//input[@title='Reference']</td> <td>//input[@title='Reference']</td>
<td>${reference}</td> <td>${reference}</td>
</tr> </tr>
<tr> <tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>//input[@title='Version']</td> <td>//input[@title='Version']</td>
<td>${version}</td> <td>${version}</td>
</tr> </tr>
<tr> <tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>//input[@title='Language']</td> <td>//input[@title='Language']</td>
<td>${language}</td> <td>${language}</td>
</tr> </tr>
<tr> <tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>//textarea[@title='Description']</td> <td>//textarea[@title='Description']</td>
<td>${description}</td> <td>${description}</td>
</tr> </tr>
<!-- This part (actually loading the notebook) requires a recent version <tr>
of firefox. Right now (may 2018) the test nodes are running with firefox 51.
This has been successfully tested with 59. -->
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>identifier=notebook-container</td> <td>//div[@data-gadget-scope="editor"]//iframe</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertElementPresent</td>
<td>//a[@data-i18n='Download']</td> <td>//iframe[@src="${base_url}/web_site_module/officejs_notebook/app/codemirror.gadget.html"]</td>
<td></td> <td></td>
</tr> </tr>
<!-- Go to Document list --> <tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Document']</td>
<td>
</tr>
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Upload</td> <td>//a[@data-i18n='Export']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=Upload</td> <td>//a[@data-i18n='Export']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@value='Upload']</td> <td>//div[@data-gadget-scope="editor"]//iframe[@src="${base_url}/web_site_module/officejs_notebook/app/gadget_jsmd_viewer.html"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//iframe[@src="${base_url}/web_site_module/officejs_notebook/app/gadget_jsmd_viewer.html"]</td>
<td></td> <td></td>
</tr> </tr>
</tbody></table> </tbody>
</body> </table>
</body>
</html> </html>
\ No newline at end of file
<html xmlns:tal="http://xml.zope.org/namespaces/tal" <html>
xmlns:metal="http://xml.zope.org/namespaces/metal"> <head>
<head> <title tal:content="template/title">The title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Test OfficeJS UI (expected failure)</title> </head>
</head> <body>
<body> <table cellpadding="1" cellspacing="1" border="1">
<table cellpadding="1" cellspacing="1" border="1"> <thead>
<thead> <tr><td rowspan="1" colspan="3">Test OfficeJS Notebook UI</td></tr>
<tr><td rowspan="1" colspan="3">Test OfficeJS UI (expected failure)</td></tr> </thead>
</thead><tbody> <tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Clean Up --> <!-- Clean Up -->
<tr> <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>
<!-- Initialize -->
<tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/officejs_notebook/</td> <td>${base_url}/web_site_module/officejs_notebook/</td>
<td></td> <td></td>
</tr>
!-- Install can be longer than 90s -->
<tr>
<td>waitForCondition</td>
<td>selenium.browserbot.currentWindow.applicationCache.status !== window.applicationCache.DOWNLOADING</td>
<td>50000</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Storages</td> <td>//a[@data-i18n="Storages"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=Storages</td> <td>//a[@data-i18n="Storages"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Erp5</td> <td>link=Erp5</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=Erp5</td> <td>link=Erp5</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>name=erp5_url</td> <td>name=erp5_url</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>name=erp5_url</td> <td>name=erp5_url</td>
<td>${base_url}/web_site_module/</td> <td>${base_url}/web_site_module/renderjs_runner/</td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//button[@data-i18n='Proceed']</td> <td>name=submit</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Add</td> <td>link=Add</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=Add</td> <td>link=Add</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//button[@data-i18n='Save']</td> <td>//button[@data-i18n='Save']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td>
<td>identifier=title</td>
<td></td>
</tr>
<!-- This part (actually loading the notebook) requires a recent version
of firefox. Right now (may 2018) the test nodes are running with firefox 51.
This has been successfully tested with 59. -->
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>identifier=notebook-container</td> <td>id=title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>store</td>
<td>Titre</td> <td tal:content="python: 'test_text_%s' % DateTime().strftime('%Y%m%d%H%M%S')">Titre</td>
<td>title</td> <td>title</td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>store</td>
<td tal:content="python: ('Test Reference %s' % DateTime()).replace(' ','.').replace(':', '.').replace('/', '.')">Reference</td> <td tal:content="python: 'Test Reference %s' % DateTime()">Reference</td>
<td>reference</td> <td>reference</td>
</tr> </tr>
<tr> <tr>
<td>store</td>
<td tal:content="python: 'Test Language %s' % DateTime()">Language</td>
<td>language</td>
</tr>
<tr>
<td>store</td> <td>store</td>
<td tal:content="python: 'Test Description %s' % DateTime()">Today</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> <td>description</td>
</tr> </tr>
<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>type</td>
<td>name=reference</td> <td>//input[@title='Reference']</td>
<td>${reference}</td> <td>${reference}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>name=title</td> <td>//input[@title='Version']</td>
<td>${title}</td> <td>${version}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>identifier=description</td> <td>//input[@title='Language']</td>
<td>${language}</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@title='Description']</td>
<td>${description}</td> <td>${description}</td>
</tr> </tr>
<tr>
<tal:block tal:define="notebook_content python: 'content {}'.format(DateTime())">
<tr>
<td>store</td>
<td tal:content="python: notebook_content">Notebook content</td>
<td>notebook_content</td>
</tr>
<tr>
<td>storeEval</td>
<td tal:content="python: 'document.querySelector(\'#selenium_myiframe\').contentWindow.document.body.querySelector(\'iframe\').contentWindow.document.querySelector(\'.CodeMirror\').CodeMirror.setValue(\'%s\')' % notebook_content"></td>
<td></td>
</tr>
</tal:block>
<!-- Laurent : for some reason, if you just change the cell content, it will not be saved. You need to send a keyboard input at some point.
For that I'm using this undocumented triggerOnKeyDown() method -->
<tr>
<td>storeEval</td>
<td tal:content="python: 'document.querySelector(\'#selenium_myiframe\').contentWindow.document.body.querySelector(\'iframe\').contentWindow.document.querySelector(\'.CodeMirror\').
CodeMirror.triggerOnKeyDown({type: \'keydown\', keyCode: 13})'"></td>
<td></td>
</tr>
<!-- Laurent : in case the UI of iodide notebooks ever changes, you need to select the "run cell" button here -->
<tr>
<td>click</td>
<td>//*[@class="editor-mode-controls"]/button[5]</td>
<td></td>
</tr>
<tr>
<td>click</td> <td>click</td>
<td>//button[@data-i18n='Save']</td> <td>//button[@data-i18n='Save']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="notification"]//button[text()='Data Updated']</td> <td>//div[@data-gadget-scope="notification"]//button[text()='Data Updated']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block metal:define-macro="synchronization_document">
<td>click</td> <tr>
<td>//a[@data-i18n='Document']</td> <td colspan="3"><b>Sync Document</b></td>
<td></td> </tr>
</tr> <tr>
<!-- Verify Search, add another document -->
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Add']</td>
<td></td>
</tr>
<tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Add']</td> <td>//a[@data-i18n="Synchronize"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Save']</td>
<td></td> <td></td>
</tr> </tr>
<tr> </tal:block>
<td>store</td> <tr>
<td>search</td>
<td>search</td>
</tr>
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>identifier=title</td> <td>//button[@data-i18n='Filter']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=reference</td>
<td>${search}</td>
</tr>
<tr>
<td>type</td>
<td>name=title</td>
<td>${search}</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Document']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block tal:define="search_query python: 'Titre'"> <tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=${title}</td> <td>link=${title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td>
<td>${reference}</td>
<td></td>
</tr>
<tr>
<td>assertFailureOnNext</td>
<td>false</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>link=${search}</td>
<td></td>
</tr>
<tr>
<td>click</td> <td>click</td>
<td>link=${reference}</td> <td>link=${title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>identifier=title</td> <td>identifier=title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td>
<td>${title}</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>title</td> <td>title</td>
<td>${title}</td> <td>${title}</td>
</tr> </tr>
<tr> <tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>reference</td> <td>reference</td>
<td>${reference}</td> <td>${reference}</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td>
<td>identifier=description</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>description</td>
<td>${description}</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Menu']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Synchronize']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>name=search</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=search</td>
<td>${title}</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Filter']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Filter']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Filter']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=${title}</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>${reference}</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=${reference}</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>identifier=title</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>title</td> <td>version</td>
<td>${title}</td> <td>${version}</td>
</tr> </tr>
<tr> <tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>reference</td> <td>language</td>
<td>${reference}</td> <td>${language}</td>
</tr> </tr>
<tr> <tr>
<td>verifyValue</td> <td>verifyValue</td>
<td>description</td> <td>description</td>
<td>${description}</td> <td>${description}</td>
</tr> </tr>
<tr> </tbody>
<td>open</td> </table>
<td>${base_url}/notebook_module/Zuite_waitForActivities</td> </body>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//pre[contains(text(), Done.)]</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/notebook_module/</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@title="Show All"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@title="Show All"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>1000</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="listbox_title"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_title</td>
<td>${title}</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Base_doSelect:method</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>${title}</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>${reference}</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>${description}</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>${notebook_content}</td>
<td></td>
</tr>
</tbody></table>
</body>
</html> </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>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>testOfficeJSNotebookExport</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>
<head>
<title tal:content="template/title">The title</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test OfficeJS Notebook UI</td></tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Clean Up -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/officejs_notebook/</td>
<td></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>${base_url}/web_site_module/renderjs_runner/</td>
</tr>
<tr>
<td>click</td>
<td>name=submit</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=Add</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>id=title</td>
<td></td>
</tr>
<tr>
<td>store</td>
<td tal:content="python: 'test_text_%s' % DateTime().strftime('%Y%m%d%H%M%S')">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>//span[@role="presentation"]</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>click</td>
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="notification"]//button[text()='Data Updated']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Synchronize"]</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>//a[@data-i18n='Export']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Export']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//iframe[@src="${base_url}/web_site_module/officejs_notebook/app/gadget_jsmd_viewer.html"]</td>
<td></td>
</tr>
<tr>
<td>setSpeed</td>
<td>2000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>name=submit</td>
<td></td>
</tr>
<tr>
<td>setSpeed</td>
<td>0</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@id="format"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@id="format"]</td>
<td>value=txt</td>
</tr>
<tr>
<td>click</td>
<td>//input[@type="submit"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@id="format"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@id="format"]</td>
<td>value=html</td>
</tr>
<tr>
<td>click</td>
<td>//input[@type="submit"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@id="format"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@id="format"]</td>
<td>value=pdf</td>
</tr>
<tr>
<td>click</td>
<td>//input[@type="submit"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Cancel"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Cancel"]</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ 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