Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5
Commits
6cf25395
Commit
6cf25395
authored
Oct 10, 2019
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs]: update notebook app tests and simple export test
parent
5a7282a3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
738 additions
and
629 deletions
+738
-629
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebook.zpt
...tests/officejs_ui_notebook_zuite/testOfficeJSNotebook.zpt
+241
-214
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebookErp5Synchronization.zpt
...otebook_zuite/testOfficeJSNotebookErp5Synchronization.zpt
+197
-415
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebookExport.xml
...officejs_ui_notebook_zuite/testOfficeJSNotebookExport.xml
+58
-0
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebookExport.zpt
...officejs_ui_notebook_zuite/testOfficeJSNotebookExport.zpt
+242
-0
No files found.
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebook.zpt
View file @
6cf25395
<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 (expected failure)
</title>
<script
src=
"../../web_site_module/officejs_notebook/rsvp.js"
></script>
<script
src=
"../../web_site_module/officejs_notebook/jiodev.js"
></script>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test OfficeJS UI (expected failure)
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<tr>
<html>
<head>
<title
tal:content=
"template/title"
>
Test OfficeJS Notebook UI
</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}/bar_module/ListBoxZuite_reset
</td>
<td>
${base_url}/web_site_module/officejs_notebook/
</td>
<td></td>
</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>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Storages'
]
</td>
<td>
//a[@data-i18n="Storages"
]
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Storages'
]
</td>
<td>
//a[@data-i18n="Storages"
]
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Local is Enough
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
link=Local is Enough
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save'
]
</td>
<td>
//button[@data-i18n="Save"
]
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<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>
</tr>
<tr>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Reference %s' % DateTime()"
>
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>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Version %s' % DateTime()"
>
Version
</td>
<td>
version
</td>
</tr>
<tr>
</tr>
<tr>
<td>
store
</td>
<td
tal:content=
"python: 'Test Description %s' % DateTime()"
>
Description
</td>
<td>
description
</td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//input[@title='Title']
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Title']
</td>
<td>
${title}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Reference']
</td>
<td>
${reference}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Version']
</td>
<td>
${version}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@title='Language']
</td>
<td>
${language}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
type
</td>
<td>
//textarea[@title='Description']
</td>
<td>
${description}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="notification"]//button[text()='Data Updated']
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document'
]
</td>
<td>
//a[@accesskey="s"
]
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<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>
</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>
link=${title}
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
link=${title}
</td>
<td></td>
</tr>
<tr>
</tr>
</tal:block>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@title='Description']
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Title']
</td>
<td>
${title}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Reference']
</td>
<td>
${reference}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Version']
</td>
<td>
${version}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//input[@title='Language']
</td>
<td>
${language}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//textarea[@title='Description']
</td>
<td>
${description}
</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>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
identifier=notebook-container
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
waitFor
ElementPresent
</td>
<td>
//a[@data-i18n='Download'
]
</td>
</tr>
<tr>
<td>
assert
ElementPresent
</td>
<td>
//iframe[@src="${base_url}/web_site_module/officejs_notebook/app/codemirror.gadget.html"
]
</td>
<td></td>
</tr>
<!-- Go to Document list -->
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Document']
</td>
<td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Upload
</td>
<td>
//a[@data-i18n='Export']
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
link=Upload
</td>
<td>
//a[@data-i18n='Export']
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<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>
</tr>
</tbody></table>
</body>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebookErp5Synchronization.zpt
View file @
6cf25395
<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 (expected failure)
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test OfficeJS UI (expected failure)
</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>
<!-- Initialize -->
<tr>
<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>
!-- 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>
<td>
waitForElementPresent
</td>
<td>
link=Storages
</td>
<td>
//a[@data-i18n="Storages"]
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
link=Storages
</td>
<td>
//a[@data-i18n="Storages"]
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Erp5
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
link=Erp5
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
name=erp5_url
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
type
</td>
<td>
name=erp5_url
</td>
<td>
${base_url}/web_site_module
/
</td>
</tr>
<tr>
<td>
${base_url}/web_site_module/renderjs_runner
/
</td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Proceed']
</td>
<td>
name=submit
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
click
</td>
<td>
link=Add
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</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>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
identifier=notebook-container
</td>
<td>
id=title
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<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>
</tr>
<tr>
</tr>
<tr>
<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>
</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
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>
</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>
name=reference
</td>
<td>
//input[@title='Reference']
</td>
<td>
${reference}
</td>
</tr>
<tr>
</tr>
<tr>
<td>
type
</td>
<td>
name=title
</td>
<td>
${title
}
</td>
</tr>
<tr>
<td>
//input[@title='Version']
</td>
<td>
${version
}
</td>
</tr>
<tr>
<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>
</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>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@data-i18n='Save']
</td>
<td></td>
</tr>
<tr>
</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='Document']
</td>
<td></td>
</tr>
<!-- Verify Search, add another document -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Add']
</td>
<td></td>
</tr>
<tr>
</tr>
<tal:block
metal:define-macro=
"synchronization_document"
>
<tr>
<td
colspan=
"3"
><b>
Sync Document
</b></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Add']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@data-i18n='Save']
</td>
<td>
//a[@data-i18n="Synchronize"]
</td>
<td></td>
</tr>
<tr>
<td>
store
</td>
<td>
search
</td>
<td>
search
</td>
</tr>
<tr>
</tr>
</tal:block>
<tr>
<td>
waitForElementPresent
</td>
<td>
identifier=title
</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>
//button[@data-i18n='Filter']
</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>
</tr>
<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>
</tr>
<tr>
<td>
click
</td>
<td>
link=${referenc
e}
</td>
<td>
link=${titl
e}
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
identifier=title
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
${title}
</td>
<td></td>
</tr>
<tr>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
title
</td>
<td>
${title}
</td>
</tr>
<tr>
</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>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
title
</td>
<td>
${title
}
</td>
</tr>
<tr>
<td>
version
</td>
<td>
${version
}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
referenc
e
</td>
<td>
${referenc
e}
</td>
</tr>
<tr>
<td>
languag
e
</td>
<td>
${languag
e}
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
description
</td>
<td>
${description}
</td>
</tr>
</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>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebookExport.xml
0 → 100644
View file @
6cf25395
<?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>
bt5/erp5_officejs_ui_test/PathTemplateItem/portal_tests/officejs_ui_notebook_zuite/testOfficeJSNotebookExport.zpt
0 → 100644
View file @
6cf25395
<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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment