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 --> <td>open</td>
<tr> <td>${base_url}/web_site_module/officejs_notebook/</td>
<td>open</td> <td></td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//a[@data-i18n="Storages"]</td>
<td>assertTextPresent</td> <td></td>
<td>Reset Successfully.</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tal:block tal:define="web_site_name python: 'officejs_notebook'"> <td>//a[@data-i18n="Storages"]</td>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForOfficejsUi/macros/install_offline_and_redirect" /> <td></td>
</tal:block> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n='Storages']</td> <td>link=Local is Enough</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Storages']</td> <td>link=Local is Enough</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Local is Enough</td> <td>link=Add</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>link=Local is Enough</td> <td>link=Add</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Add</td> <td>//button[@data-i18n="Save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>store</td>
<td>link=Add</td> <td tal:content="python: 'test_text_%s' % DateTime().strftime('%Y%m%d%H%M%S')">Titre</td>
<td></td> <td>title</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>store</td>
<td>//button[@data-i18n='Save']</td> <td tal:content="python: 'Test Reference %s' % DateTime()">Reference</td>
<td></td> <td>reference</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 Language %s' % DateTime()">Language</td>
<td>title</td> <td>language</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 Version %s' % DateTime()">Version</td>
<td>reference</td> <td>version</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 Description %s' % DateTime()">Description</td>
<td>language</td> <td>description</td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>waitForElementPresent</td>
<td tal:content="python: 'Test Version %s' % DateTime()">Version</td> <td>//input[@title='Title']</td>
<td>version</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>type</td>
<td tal:content="python: 'Test Description %s' % DateTime()">Description</td> <td>//input[@title='Title']</td>
<td>description</td> <td>${title}</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>type</td>
<td>//input[@title='Title']</td> <td>//input[@title='Reference']</td>
<td></td> <td>${reference}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@title='Title']</td> <td>//input[@title='Version']</td>
<td>${title}</td> <td>${version}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@title='Reference']</td> <td>//input[@title='Language']</td>
<td>${reference}</td> <td>${language}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@title='Version']</td> <td>//textarea[@title='Description']</td>
<td>${version}</td> <td>${description}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>click</td>
<td>//input[@title='Language']</td> <td>//button[@data-i18n='Save']</td>
<td>${language}</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>waitForElementPresent</td>
<td>//textarea[@title='Description']</td> <td>//div[@data-gadget-scope="notification"]//button[text()='Data Updated']</td>
<td>${description}</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//button[@data-i18n='Save']</td> <td>//a[@accesskey="s"]</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>//a[@data-i18n='Upload']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n='Document']</td> <td>//a[@data-i18n='Upload']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>link=Add</td> <td>//input[@value='Upload']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>click</td>
<td>link=${title}</td> <td>//a[@data-i18n="Cancel"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>waitForElementPresent</td>
<td>link=${title}</td> <td>//a[@accesskey="s"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block metal:define-macro="open_document_with_title">
<td>waitForElementPresent</td> <tr>
<td>//textarea[@title='Description']</td> <td colspan="3"><b>Open Document</b></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>verifyValue</td> <td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
<td>//input[@title='Title']</td> <td></td>
<td>${title}</td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>verifyValue</td> <td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
<td>//input[@title='Reference']</td> <td>${title}</td>
<td>${reference}</td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>verifyValue</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>//input[@title='Version']</td> <td></td>
<td>${version}</td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>verifyValue</td> <td>link=${title}</td>
<td>//input[@title='Language']</td> <td></td>
<td>${language}</td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>verifyValue</td> <td>link=${title}</td>
<td>//textarea[@title='Description']</td> <td></td>
<td>${description}</td> </tr>
</tr> </tal:block>
<!-- 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. <td>waitForElementPresent</td>
This has been successfully tested with 59. --> <td>//textarea[@title='Description']</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>identifier=notebook-container</td> <tr>
<td></td> <td>verifyValue</td>
</tr> <td>//input[@title='Title']</td>
<tr> <td>${title}</td>
<td>waitForElementPresent</td> </tr>
<td>//a[@data-i18n='Download']</td> <tr>
<td></td> <td>verifyValue</td>
</tr> <td>//input[@title='Reference']</td>
<!-- Go to Document list --> <td>${reference}</td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[@data-i18n='Document']</td> <td>verifyValue</td>
<td> <td>//input[@title='Version']</td>
</tr> <td>${version}</td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>link=Upload</td> <td>verifyValue</td>
<td></td> <td>//input[@title='Language']</td>
</tr> <td>${language}</td>
<tr> </tr>
<td>click</td> <tr>
<td>link=Upload</td> <td>verifyValue</td>
<td></td> <td>//textarea[@title='Description']</td>
</tr> <td>${description}</td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//input[@value='Upload']</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@data-gadget-scope="editor"]//iframe</td>
</tr> <td></td>
</tbody></table> </tr>
</body> <tr>
<td>assertElementPresent</td>
<td>//iframe[@src="${base_url}/web_site_module/officejs_notebook/app/codemirror.gadget.html"]</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>//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>
</tr>
</tbody>
</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>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>waitForElementPresent</td>
<td>Reset Successfully.</td> <td>//a[@data-i18n="Storages"]</td>
<td></td> <td></td>
</tr> </tr>
<!-- Initialize --> <tr>
<tr> <td>click</td>
<td>open</td> <td>//a[@data-i18n="Storages"]</td>
<td>${base_url}/web_site_module/officejs_notebook/</td> <td></td>
<td></td> </tr>
</tr> <tr>
!-- Install can be longer than 90s --> <td>waitForElementPresent</td>
<tr> <td>link=Erp5</td>
<td>waitForCondition</td> <td></td>
<td>selenium.browserbot.currentWindow.applicationCache.status !== window.applicationCache.DOWNLOADING</td> </tr>
<td>50000</td> <tr>
</tr> <td>click</td>
<tr> <td>link=Erp5</td>
<td>waitForElementPresent</td> <td></td>
<td>link=Storages</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>name=erp5_url</td>
<td>click</td> <td></td>
<td>link=Storages</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=erp5_url</td>
<td>waitForElementPresent</td> <td>${base_url}/web_site_module/renderjs_runner/</td>
<td>link=Erp5</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>name=submit</td>
<td>click</td> <td></td>
<td>link=Erp5</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>link=Add</td>
<td>waitForElementPresent</td> <td></td>
<td>name=erp5_url</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>link=Add</td>
<td>type</td> <td></td>
<td>name=erp5_url</td> </tr>
<td>${base_url}/web_site_module/</td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//button[@data-i18n='Save']</td>
<td>click</td> <td></td>
<td>//button[@data-i18n='Proceed']</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>id=title</td>
<td>waitForElementPresent</td> <td></td>
<td>link=Add</td> </tr>
<td></td> <tr>
</tr> <td>store</td>
<tr> <td tal:content="python: 'test_text_%s' % DateTime().strftime('%Y%m%d%H%M%S')">Titre</td>
<td>click</td> <td>title</td>
<td>link=Add</td> </tr>
<td></td> <tr>
</tr> <td>store</td>
<tr> <td tal:content="python: 'Test Reference %s' % DateTime()">Reference</td>
<td>waitForElementPresent</td> <td>reference</td>
<td>//button[@data-i18n='Save']</td> </tr>
<td></td> <tr>
</tr> <td>store</td>
<tr> <td tal:content="python: 'Test Language %s' % DateTime()">Language</td>
<td>waitForElementPresent</td> <td>language</td>
<td>identifier=title</td> </tr>
<td></td> <tr>
</tr> <td>store</td>
<!-- This part (actually loading the notebook) requires a recent version <td tal:content="python: 'Test Version %s' % DateTime()">Version</td>
of firefox. Right now (may 2018) the test nodes are running with firefox 51. <td>version</td>
This has been successfully tested with 59. --> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>store</td>
<td>identifier=notebook-container</td> <td tal:content="python: 'Test Description %s' % DateTime()">Description</td>
<td></td> <td>description</td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>waitForElementPresent</td>
<td>Titre</td> <td>//input[@title='Title']</td>
<td>title</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>type</td>
<td tal:content="python: ('Test Reference %s' % DateTime()).replace(' ','.').replace(':', '.').replace('/', '.')">Reference</td> <td>//input[@title='Title']</td>
<td>reference</td> <td>${title}</td>
</tr> </tr>
<tr> <tr>
<td>store</td> <td>type</td>
<td tal:content="python: 'Test Description %s' % DateTime()">Today</td> <td>//input[@title='Reference']</td>
<td>description</td> <td>${reference}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>name=reference</td> <td>//input[@title='Version']</td>
<td>${reference}</td> <td>${version}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>name=title</td> <td>//input[@title='Language']</td>
<td>${title}</td> <td>${language}</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>identifier=description</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())"> <td>click</td>
<td>//button[@data-i18n='Save']</td>
<tr> <td></td>
<td>store</td> </tr>
<td tal:content="python: notebook_content">Notebook content</td> <tr>
<td>notebook_content</td> <td>waitForElementPresent</td>
</tr> <td>//div[@data-gadget-scope="notification"]//button[text()='Data Updated']</td>
<td></td>
<tr> </tr>
<td>storeEval</td> <tal:block metal:define-macro="synchronization_document">
<td tal:content="python: 'document.querySelector(\'#selenium_myiframe\').contentWindow.document.body.querySelector(\'iframe\').contentWindow.document.querySelector(\'.CodeMirror\').CodeMirror.setValue(\'%s\')' % notebook_content"></td> <tr>
<td></td> <td colspan="3"><b>Sync Document</b></td>
</tr> </tr>
<tr>
</tal:block> <td>click</td>
<!-- 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. <td>//a[@data-i18n="Synchronize"]</td>
For that I'm using this undocumented triggerOnKeyDown() method --> <td></td>
<tr> </tr>
<td>storeEval</td> </tal:block>
<td tal:content="python: 'document.querySelector(\'#selenium_myiframe\').contentWindow.document.body.querySelector(\'iframe\').contentWindow.document.querySelector(\'.CodeMirror\'). <tr>
CodeMirror.triggerOnKeyDown({type: \'keydown\', keyCode: 13})'"></td> <td>waitForElementPresent</td>
<td></td> <td>//button[@data-i18n='Filter']</td>
</tr> <td></td>
<!-- Laurent : in case the UI of iodide notebooks ever changes, you need to select the "run cell" button here --> </tr>
<tr> <tr>
<td>click</td> <td>waitForElementPresent</td>
<td>//*[@class="editor-mode-controls"]/button[5]</td> <td>link=${title}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//button[@data-i18n='Save']</td> <td>link=${title}</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>identifier=title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>verifyValue</td>
<td>//a[@data-i18n='Document']</td> <td>title</td>
<td></td> <td>${title}</td>
</tr> </tr>
<!-- Verify Search, add another document --> <tr>
<tr> <td>verifyValue</td>
<td>waitForElementPresent</td> <td>reference</td>
<td>//a[@data-i18n='Add']</td> <td>${reference}</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>verifyValue</td>
<td>click</td> <td>version</td>
<td>//a[@data-i18n='Add']</td> <td>${version}</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>verifyValue</td>
<td>waitForElementPresent</td> <td>language</td>
<td>//button[@data-i18n='Save']</td> <td>${language}</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>verifyValue</td>
<td>store</td> <td>description</td>
<td>search</td> <td>${description}</td>
<td>search</td> </tr>
</tr>
<tr> </tbody>
<td>waitForElementPresent</td> </table>
<td>identifier=title</td> </body>
<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>
</tr>
<tal:block tal:define="search_query python: 'Titre'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>link=${title}</td>
<td></td>
</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>link=${reference}</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>identifier=title</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>${title}</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>title</td>
<td>${title}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>reference</td>
<td>${reference}</td>
</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>title</td>
<td>${title}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>reference</td>
<td>${reference}</td>
</tr>
<tr>
<td>verifyValue</td>
<td>description</td>
<td>${description}</td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/notebook_module/Zuite_waitForActivities</td>
<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