Commit 4c79cc7c authored by Jérome Perrin's avatar Jérome Perrin

dms_ui_test: more tests for PDF viewer

It was tested only in the context of erp5_km, not in ERP5JS and xhtml
style
parent f3c1434a
...@@ -194,6 +194,7 @@ class TestOfficeJSSDKConfigurator(SecurityTestCase): ...@@ -194,6 +194,7 @@ class TestOfficeJSSDKConfigurator(SecurityTestCase):
'erp5_core_proxy_field_legacy', 'erp5_core_proxy_field_legacy',
'erp5_crm', 'erp5_crm',
'erp5_dms', 'erp5_dms',
'erp5_dms_ui_test',
'erp5_font', 'erp5_font',
'erp5_forge', 'erp5_forge',
'erp5_full_text_mroonga_catalog', 'erp5_full_text_mroonga_catalog',
...@@ -236,6 +237,7 @@ class TestOfficeJSSDKConfigurator(SecurityTestCase): ...@@ -236,6 +237,7 @@ class TestOfficeJSSDKConfigurator(SecurityTestCase):
'erp5_travel_expense', 'erp5_travel_expense',
'erp5_ui_test', 'erp5_ui_test',
'erp5_ui_test_core', 'erp5_ui_test_core',
'erp5_ui_test_data',
'erp5_upgrader', 'erp5_upgrader',
'erp5_upgrader_officejs_sdk', 'erp5_upgrader_officejs_sdk',
'erp5_web', 'erp5_web',
......
<?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>testPDFPreview</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>PDF Preview</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 tal:content="template/title_and_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_and_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>openAndWait</td>
<td>${base_url}/document_module/test_ERP5_Logo_PDF</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Preview</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//iframe[contains(@src, "pdfjs.gadget.html")]</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>//iframe[contains(@src, "pdfjs.gadget.html")]</td>
<td></td>
</tr>
<tr>
<td>waitForText</td>
<td>//body//div[@class='textLayer']/div[1]</td>
<td>This is a sample PDF with some text and an image</td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
document_module/test_ERP5_Logo_PDF
\ No newline at end of file
document_module/test_ERP5_Logo_PDF
portal_categories/classification/** portal_categories/classification/**
portal_tests/dms_zuite portal_tests/dms_zuite
portal_tests/dms_zuite/** portal_tests/dms_zuite/**
\ 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>testPDFPreview</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>PDF Preview</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 tal:content="template/title_and_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_and_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<!-- Access a PDF provided by erp5_dms_ui_test -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/document_module/test_ERP5_Logo_PDF?editable=1</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Views'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Preview'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//iframe[contains(@src, "pdfjs.gadget.html")]</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>//iframe[contains(@src, "pdfjs.gadget.html")]</td>
<td></td>
</tr>
<tr>
<td>waitForText</td>
<td>//body//div[@class='textLayer']/div[1]</td>
<td>This is a sample PDF with some text and an image</td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
erp5_dms_ui_test
erp5_ui_test_core erp5_ui_test_core
erp5_ui_test erp5_ui_test
erp5_web_renderjs_ui erp5_web_renderjs_ui
......
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