Commit dd628ae5 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_report_renderjs_ui_test: add report tests

parent de0b1774
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>renderjs_ui_report_language_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>testGeneralPrint</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 General Print</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test General Print</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/renderjs_runner/#/sale_order_module</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': 'Add'}">
<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 metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Object created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//label</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//label</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>//ul[@class="document-listview"]//a[text()='Print']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class="document-listview"]//a[text()='Print']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@id="field_your_format"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//select[@id="field_your_format"]</td>
<td>html</td>
</tr>
<tr>
<td>type</td>
<td>//select[@id="field_your_target_language"]</td>
<td>fr</td>
</tr>
<!-- overwrite createObjectURL to read server response and append result to Dom -->
<tr>
<td>getEval</td>
<td>
window.URL.createObjectURL = function (blob) {
window.jIO.util.readBlobAsText(blob)
.then(function (answer) {
text_node = document.createElement('div');
text_node.innerHTML = answer.target.result;
text_node.setAttribute("id", "text_node_for_blob");
document.getElementById("selenium_myiframe").contentWindow.document.body.appendChild(text_node);
})
.then(undefined, function(error) {console.log(error);});
return '';
};
</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@value="Print"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[text()='Data received.']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@id='text_node_for_blob']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@id='text_node_for_blob']//font[contains(text(), "Fournisseur")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@id='text_node_for_blob']//font[contains(text(), "Mode de livraison")]</td>
<td></td>
</tr>
</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>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>testProductionOrderPrintProductionOrder</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 Production Order Report</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Produdction Order Report</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/renderjs_runner/#/production_order_module</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': 'Add'}">
<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 metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Object created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//label</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//label</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>//ul[@class="document-listview"]//a[text()='Print Production Order']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class="document-listview"]//a[text()='Print Production Order']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@id="field_your_format"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//select[@id="field_your_format"]</td>
<td>html</td>
</tr>
<tr>
<td>type</td>
<td>//select[@id="field_your_target_language"]</td>
<td>fr</td>
</tr>
<!-- overwrite createObjectURL to read server response and append result to Dom -->
<tr>
<td>getEval</td>
<td>
window.URL.createObjectURL = function (blob) {
window.jIO.util.readBlobAsText(blob)
.then(function (answer) {
text_node = document.createElement('div');
text_node.innerHTML = answer.target.result;
text_node.setAttribute("id", "text_node_for_blob");
document.getElementById("selenium_myiframe").contentWindow.document.body.appendChild(text_node);
})
.then(undefined, function(error) {console.log(error);});
return '';
};
</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@value="Print Production Order"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[text()='Data received.']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@id='text_node_for_blob']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@id='text_node_for_blob']//p[contains(text(), "Fournisseur")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@id='text_node_for_blob']//p[contains(text(), "Date du document")]</td>
<td></td>
</tr>
</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>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>testProductionPackingListPrintProductionPackingList</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 Production Packing List Report</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Produdction Packing List Report</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/renderjs_runner/#/production_packing_list_module</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': 'Add'}">
<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 metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Object created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//label</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//label</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>//ul[@class="document-listview"]//a[text()='Print Production Packing List']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class="document-listview"]//a[text()='Print Production Packing List']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@id="field_your_format"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//select[@id="field_your_format"]</td>
<td>html</td>
</tr>
<tr>
<td>type</td>
<td>//select[@id="field_your_target_language"]</td>
<td>fr</td>
</tr>
<!-- overwrite createObjectURL to read server response and append result to Dom -->
<tr>
<td>getEval</td>
<td>
window.URL.createObjectURL = function (blob) {
window.jIO.util.readBlobAsText(blob)
.then(function (answer) {
text_node = document.createElement('div');
text_node.innerHTML = answer.target.result;
text_node.setAttribute("id", "text_node_for_blob");
document.getElementById("selenium_myiframe").contentWindow.document.body.appendChild(text_node);
})
.then(undefined, function(error) {console.log(error);});
return '';
};
</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@value="Print Packing List"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[text()='Data received.']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@id='text_node_for_blob']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@id='text_node_for_blob']//p[contains(text(), "Fournisseur")]</td>
<td></td>
</tr>