Commit 02f234a9 authored by Tomáš Peterka's avatar Tomáš Peterka

[erp5_accounting_renderjs_ui_test] Add accounting report renderjs tests

parent 28c4777c
<?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_accounting_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Functional test suites for erp5_accounting</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>test_accounting_report</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>test_account_statement</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>Test Account Statement</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tests/testAccountingReports.py#L894">testAccountingReports.py:TestAccountingReports.testAccountStatement</a>
</th></tr>
</thead>
<tbody
tal:define="init_method string:AccountingZuite_initializeAccountingTransactionReportTest?report_name=account-statement&report_style=Hal;
now python:DateTime();
today python:DateTime(now.year(), now.month(), now.day());
tomorrow python:today + 1;
yesterday python:today - 1;
offset python:0">
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr>
<tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(today.day(), today.month(), today.year())"></td><td>today</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(tomorrow.day(), tomorrow.month(), tomorrow.year())"></td><td>tomorrow</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(yesterday.day(), yesterday.month(), yesterday.year())"></td><td>yesterday</td></tr>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/accounting_module/</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[contains(@data-gadget-url, 'gadget_erp5_page_export.html')]//ul/li</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//a[@data-i18n="Account Statement"]</td><td></td></tr>
<tr><td>click</td>
<td>//a[@data-i18n="Account Statement"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_node"]/div/div[1]//select</td><td></td></tr>
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_node"]/div/div[1]//select</td>
<td>value=account_module/receivable</td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_your_section_category"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_your_section_category"]</td>
<td>value=group/demo_group/sub1</td></tr>
<tr><td>waitForElementPresent</td>
<td>//input[@name="field_your_at_date"]</td><td></td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_at_date"]</td>
<td>${year}-${month}-${day}</td></tr>
<!-- field_your_section_category_strict is False by default -->
<!-- field_your_portal_type is good by default -->
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td><td></td></tr>
<!-- we need to zero-out simulation_state to just 'delivered' -->
<tal:block tal:repeat="_ python:range(4)"><!-- There is by default just few simulation states -->
<!-- we take advantage of dissapearing elements when selecting one empty -->
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=</td></tr>
<tr><td>pause</td>
<td>50</td>
<td></td></tr>
</tal:block>
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=delivered</td></tr>
<tr><td>click</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr>
<tr><td>store</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="6 Records"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_currency"]//p[text()="EUR"]</td><td></td></tr>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
Movement_getSpecificReference string:1;
date string:$${yesterday};
mirror_section_title string:Client 1;
Movement_getExplanationTitleAndAnalytics string:Transaction 1 ref1;
debit_price string:100;
credit_price string:0;
running_total_price string:100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[2];
Movement_getSpecificReference string:2;
date string:$${yesterday};
mirror_section_title string:Client 1;
Movement_getExplanationTitleAndAnalytics string:Transaction 2 ref2;
debit_price string:0;
credit_price string:200;
running_total_price string:-100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[3];
Movement_getSpecificReference string:3;
date string:$${today};
Movement_getExplanationTitleAndAnalytics string:Transaction 3 ref3;
debit_price string:300;
credit_price string:0;
running_total_price string:200">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[4];
Movement_getSpecificReference string:4;
date string:$${today};
Movement_getExplanationTitleAndAnalytics string:Transaction 4 ref4;
debit_price string:400;
credit_price string:0;
running_total_price string:600">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[5];
Movement_getSpecificReference string:5;
date string:$${today};
Movement_getExplanationTitleAndAnalytics string:Transaction 5 ref5;
debit_price string:500;
credit_price string:0;
running_total_price string:1100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[6];
Movement_getSpecificReference string:6;
date string:$${today};
Movement_getExplanationTitleAndAnalytics string:Transaction 6 ref6;
debit_price string:600;
credit_price string:0;
running_total_price string:1700">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
</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>test_aged_balance</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>Test Aged Balance Report</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tests/testAccountingReports.py#L4904">testAccountingReports.py:test_simple_aged_creditor_report_detailed.testOtherPartiesReport</a>
</th></tr>
</thead>
<tbody
tal:define="init_method string:AccountingZuite_initializeAccountingTransactionReportTest?report_name=aged-balance&report_style=Hal;
now python:DateTime();
last_month python:DateTime(now.year(), now.month(), 1) - 1;
offset python:0">
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr>
<tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(last_month.day())"></td><td>last_day</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(last_month.month())"></td><td>last_month</td></tr>
<tr><td>store</td><td tal:content="python: last_month.year()"></td><td>last_year</td></tr>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/accounting_module/</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>//a[@data-i18n="Aged Balance"]</td><td></td></tr>
<tr><td>click</td>
<td>//a[@data-i18n="Aged Balance"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_your_section_category"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_your_section_category"]</td>
<td>value=group/demo_group</td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_account_type"]//select</td><td></td></tr>
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_account_type"]//select</td>
<td>value=account_type/asset/receivable</td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_at_date"]</td>
<td>${year}-${month}-01</td></tr>
<tr><td>click</td><!-- Check because it is unchecked by default -->
<td>//input[@type="checkbox" and @name="field_your_detailed"]</td><td></td></tr>
<tr><td>type</td>
<td>//textarea[@name="field_your_period_list"]</td>
<td>1
2
3</td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td><td></td></tr>
<!-- we need to zero-out simulation_state to just 'delivered' -->
<tal:block tal:repeat="_ python:range(4)"><!-- There is by default just few simulation states -->
<!-- we take advantage of dissapearing elements when selecting one empty -->
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=</td></tr>
<tr><td>pause</td>
<td>50</td>
<td></td></tr>
</tal:block>
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=delivered</td></tr>
<tr><td>click</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr>
<tr><td>store</td>]
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="1 Records"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_currency"]//p[text()="EUR"]</td><td></td></tr>
<tr><td>store</td>
<td>${table}/tbody/tr[1]</td>
<td>current_row</td></tr>
<tr><td>assertText</td>
<td>${current_row}/td[1]/a</td>
<td>Client 1</td></tr>
<tr><td>assertText</td>
<td>${current_row}/td[2]/a</td>
<td>Sale invoice 2</td></tr>
<!-- skip account_number field -->
<!-- skip invoice_number field -->
<!-- skip transaction_reference field -->
<tr><td>assertText</td>
<td>${current_row}/td[6]/a</td>
<td>${last_day}/${last_month}/${last_year}</td></tr>
<tr><td>assertText</td>
<td>${current_row}/td[7]/a</td>
<td>Sale Invoice Transaction</td></tr>
<tr><td>assertFloat</td>
<td>${current_row}/td[8]//div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/p</td>
<td>300</td></tr><!-- balance -->
<tr><td>assertText</td>
<td>${current_row}/td[9]//div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/p</td>
<td></td></tr><!-- future is empty -->
<tr><td>assertFloat</td>
<td>${current_row}/td[10]//div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/p</td>
<td>300</td></tr><!-- period_1=300 -->
</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>test_balance_sheet</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>Test Balance Sheet Report</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tests/testAccountingReports.py#L4563">testAccountingReports.py:TestAccountingReports.testBalanceSheet</a>
</th></tr>
</thead>
<tbody
tal:define="init_method string:AccountingZuite_initializeAccountingTransactionReportTest?report_name=balance-sheet&report_style=Hal;
offset python:0;
now python:DateTime()">
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr>
<tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/accounting_module/</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>//a[@data-i18n="Balance Sheet"]</td><td></td></tr>
<tr><td>click</td>
<td>//a[@data-i18n="Balance Sheet"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_your_section_category"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_your_section_category"]</td>
<td>value=group/demo_group</td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_at_date"]</td>
<td>${year}-12-31</td></tr>
<!-- We cannot easily ensure correctness because the report renders always as
an attachment. Even in unittest we only check validity of such attachment.
-->
</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>test_general_ledger</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><title>Test Report General Ledger</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tests/testAccountingReports.py#L3895">testAccountingReports.py:TestAccountingReports.testGeneralLedger</a>
</th></tr>
</thead>
<tbody
tal:define="init_method string:AccountingZuite_initializeAccountingTransactionReportTest?report_name=general-ledger&report_style=Hal;
now python:DateTime();
today python:DateTime(now.year(), now.month(), now.day());
tomorrow python:today + 1;
yesterday python:today - 1;
offset python:0">
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr>
<tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(today.day(), today.month(), today.year())"></td><td>today</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(tomorrow.day(), tomorrow.month(), tomorrow.year())"></td><td>tomorrow</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}/{:0>#2d}/{:d}'.format(yesterday.day(), yesterday.month(), yesterday.year())"></td><td>yesterday</td></tr>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/accounting_module/</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>//a[@data-i18n="General Ledger"]</td><td></td></tr>
<tr><td>click</td>
<td>//a[@data-i18n="General Ledger"]</td><td></td></tr>
<tr><td>waitForElementPresent</td><td>//input[@name="field_your_from_date"]</td><td></td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_from_date"]</td>
<td>${year}-1-1</td></tr>
<tr><td>waitForElementPresent</td><td>//input[@name="field_your_at_date"]</td><td></td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_at_date"]</td>
<td>${year}-12-31</td></tr>
<tr><td>waitForElementPresent</td><td>//select[@name="field_your_section_category"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_your_section_category"]</td>
<td>value=group/demo_group</td></tr>
<!-- All checkboxes are by default turned off -->
<!-- we need to zero-out simulation_state to just 'delivered' -->
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td><td></td></tr>
<tal:block tal:repeat="_ python:range(4)"><!-- There is by default just few simulation states -->
<!-- we take advantage of dissapearing elements when selecting one empty -->
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=</td></tr>
<tr><td>pause</td>
<td>50</td>
<td></td></tr>
</tal:block>
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=delivered</td></tr>
<tr><td>click</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr>
<!-- 1. report section is the Bank -->
<tr><td>store</td>
<td>//div[@class="report_section_list"]/div/div[1]//div[@data-gadget-scope="erp5_form"]</td>
<td>form</td></tr>
<tr><td>waitForElementPresent</td>
<td>${form}//h3[text()="A-BANK - Bank (Bank1)"]</td><td></td></tr>
<tr><td>store</td>
<td>${form}//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="5 Records"]</td><td></td></tr>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
Movement_getExplanationTitleAndAnalytics string:Transaction 3 ref3;
Movement_getSpecificReference string:3;
date string:$${today};
debit_price string:0;
credit_price string:300;
running_total_price string:-300">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[2];
Movement_getExplanationTitleAndAnalytics string:Transaction 4 ref4;
Movement_getSpecificReference string:4;
date string:$${today};
debit_price string:0;
credit_price string:400;
running_total_price string:-700">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[3];
Movement_getExplanationTitleAndAnalytics string:Transaction 5 ref5;
Movement_getSpecificReference string:5;
date string:$${today};
debit_price string:0;
credit_price string:500;
running_total_price string:-1200">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[4];
Movement_getExplanationTitleAndAnalytics string:Transaction 6 ref6;
Movement_getSpecificReference string:6;
date string:$${today};
debit_price string:0;
credit_price string:600;
running_total_price string:-1800">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[5];
Movement_getExplanationTitleAndAnalytics string:Transaction 8 ref8;
Movement_getSpecificReference string:8;
date string:$${tomorrow};
debit_price string:0;
credit_price string:800;
running_total_price string:-2600">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<!-- 2. report section is Payable - Client 1 -->
<tr><td>store</td>
<td>//div[@class="report_section_list"]/div/div[2]//div[@data-gadget-scope="erp5_form"]</td>
<td>form</td></tr>
<tr><td>waitForElementPresent</td>
<td>${form}//h3[text()="A-PAY - Payable (Client 1)"]</td><td></td></tr>
<tr><td>store</td>
<td>${form}//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="2 Records"]</td><td></td></tr>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
Movement_getExplanationTitleAndAnalytics string:Transaction 1 ref1;
Movement_getSpecificReference string:1;
Movement_getMirrorSectionTitle string:Client 1;
date string:$${yesterday};
debit_price string:0;
credit_price string:100;
running_total_price string:-100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[2];
Movement_getExplanationTitleAndAnalytics string:Transaction 2 ref2;
Movement_getSpecificReference string:2;
date string:$${yesterday};
debit_price string:200;
credit_price string:0;
running_total_price string:100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<!-- 3. report section is A-REC - Receivable (Client 1) -->
<tr><td>store</td>
<td>//div[@class="report_section_list"]/div/div[3]//div[@data-gadget-scope="erp5_form"]</td>
<td>form</td></tr>
<tr><td>waitForElementPresent</td>
<td>${form}//h3[text()="A-REC - Receivable (Client 1)"]</td><td></td></tr>
<tr><td>store</td>
<td>${form}//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="5 Records"]</td><td></td></tr>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
Movement_getSpecificReference string:1;
Movement_getExplanationTitleAndAnalytics string:Transaction 1 ref1;
date string:$${yesterday};
debit_price string:100;
credit_price string:0;
running_total_price string:100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[2];
Movement_getSpecificReference string:2;
Movement_getExplanationTitleAndAnalytics string:Transaction 2 ref2;
date string:$${yesterday};
debit_price string:0;
credit_price string:200;
running_total_price string:-100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[3];
Movement_getSpecificReference string:3;
Movement_getExplanationTitleAndAnalytics string:Transaction 3 ref3;
date string:$${today};
debit_price string:300;
credit_price string:0;
running_total_price string:200">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[4];
Movement_getSpecificReference string:6;
Movement_getExplanationTitleAndAnalytics string:Transaction 6 ref6;
date string:$${today};
debit_price string:600;
credit_price string:0;
running_total_price string:800">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[5];
Movement_getSpecificReference string:8;
Movement_getExplanationTitleAndAnalytics string:Transaction 8 ref8;
date string:$${tomorrow};
debit_price string:800;
credit_price string:0;
running_total_price string:1600">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<!-- 4. report section is A-REC - Receivable (Client 2) -->
<tr><td>store</td>
<td>//div[@class="report_section_list"]/div/div[4]//div[@data-gadget-scope="erp5_form"]</td>
<td>form</td></tr>
<tr><td>waitForElementPresent</td>
<td>${form}//h3[text()="A-REC - Receivable (Client 2)"]</td><td></td></tr>
<tr><td>store</td>
<td>${form}//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="1 Records"]</td><td></td></tr>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
Movement_getExplanationTitleAndAnalytics string:Transaction 4 ref4;
Movement_getSpecificReference string:4;
date string:$${today};
debit_price string:400;
credit_price string:0;
running_total_price string:400">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<!-- 5. report section is A-REC - Receivable (John Smith) -->
<tr><td>store</td>
<td>//div[@class="report_section_list"]/div/div[5]//div[@data-gadget-scope="erp5_form"]</td>
<td>form</td></tr>
<tr><td>waitForElementPresent</td>
<td>${form}//h3[text()="A-REC - Receivable (John Smith)"]</td><td></td></tr>
<tr><td>store</td>
<td>${form}//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="1 Records"]</td><td></td></tr>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
Movement_getExplanationTitleAndAnalytics string:Transaction 5 ref5;
Movement_getSpecificReference string:5;
date string:$${today};
debit_price string:500;
credit_price string:0;
running_total_price string:500">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_table" />
</tal:block>
<!-- 5. report section is Total -->
<tr><td>store</td>
<td>//div[@class="report_section_list"]/div/div[6]//div[@data-gadget-scope="erp5_form"]</td>
<td>form</td></tr>
<tr><td>waitForElementPresent</td>
<td>${form}//h3[text()="Total"]</td><td></td></tr>
<tr><td>store</td>
<td>${form}//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="1 Records"]</td><td></td></tr>
<tr><td>store</td>
<td>${table}/tbody/tr[1]</td>
<td>current_row</td></tr>
<tr><td>assertFloat</td><!-- debit -->
<td>${current_row}/td[1]//div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/p</td>
<td>2900</td></tr>
<tr><td>assertFloat</td><!-- credit -->
<td>${current_row}/td[2]//div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/p</td>
<td>2900</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>test_invoices_report</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>Test Invoices Report</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
No test!
</th></tr>
</thead>
<tbody>
<!-- There is no unittest covering this report so no UI test either. -->
</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>test_journal</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>Test Report Journal</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
Copy of <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tests/testAccountingReports.py#L53">TestAccountingReports.testJournal</a>
</th></tr>
</thead>
<tbody
tal:define="init_method string:AccountingZuite_initializeAccountingTransactionReportTest?report_name=journal&report_style=Hal;
now python: DateTime()">
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/accounting_module/</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>//a[@data-i18n="Journal"]</td><td></td></tr>
<tr><td>click</td>
<td>//a[@data-i18n="Journal"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_your_section_category"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_your_section_category"]</td>
<td>value=group/demo_group</td></tr>
<!-- field_your_at_date is already at now() -->
<!-- field_your_section_category_strict is False by default -->
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_portal_type"]/div/div[1]//select</td><td></td></tr>
<!-- we need to zero-out portal_types to just 'Sale Invoice Transaction' -->
<tal:block tal:repeat="_ python:range(8)"><!-- there is by default many Portal Types -->
<!-- we take advantage of dissapearing elements when selecting one empty -->
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_portal_type"]/div/div[1]//select</td>
<td>value=</td></tr>
<tr><td>pause</td>
<td>50</td>
<td></td></tr>
</tal:block>
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_portal_type"]/div/div[1]//select</td>
<td>value=Sale Invoice Transaction</td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td><td></td></tr>
<!-- we need to zero-out simulation_state to just 'delivered' -->
<tal:block tal:repeat="_ python:range(4)"><!-- There is by default just few simulation states -->
<!-- we take advantage of dissapearing elements when selecting one empty -->
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=</td></tr>
<tr><td>pause</td>
<td>50</td>
<td></td></tr>
</tal:block>
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=delivered</td></tr>
<tr><td>click</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr>
<tr><td>store</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="9 Records"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_currency"]//p[text()="EUR"]</td><td></td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr>
<tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
date string:$${day}/$${month}/$${year};
title string:First One;
parent_reference string:1;
node_title string:A-REC;
mirror_section_title string:Client 1;
debit string:119.60;
credit string:0">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_transactions_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[2];
specific_reference string:;
title string:;
parent_reference string:;
node_title string:A-COLLECTED-VAT;
mirror_section_title string:Client 1;
debit string:0,
credit string:19.60">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_transactions_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[3];
specific_reference string:;
title string:;
parent_reference string:;
node_title string:A-GS;
mirror_section_title string:Client 1;
debit string:0;
credit string:100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_transactions_table" />
</tal:block>
<!-- Second Transaction -->
<tal:block tal:define="row_selector string:$${table}/tbody/tr[4];
date string:$${day}/$${month}/$${year};
title string:Second One;
parent_reference string:2;
node_title string:A-REC;
mirror_section_title string:Client 2;
debit string:239.20;
credit string:0">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_transactions_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[5];
specific_reference string:;
title string:;
parent_reference string:;
node_title string:A-COLLECTED-VAT;
mirror_section_title string:Client 2;
debit string:0;
credit string:39.20">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_transactions_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[6];
specific_reference string:;
title string:;
parent_reference string:;
node_title string:A-GS;
mirror_section_title string:Client 2;
debit string:0;
credit string:200">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_transactions_table" />
</tal:block>
<!-- Third Transaction -->
<tal:block tal:define="row_selector string:$${table}/tbody/tr[7];
date string:$${day}/$${month}/$${year};
title string:Third One;
parent_reference string:3;
node_title string:A-REC;
mirror_section_title string:John Smith;
debit string:358.80;
credit string:0">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_transactions_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[8];
specific_reference string:;
title string:;
parent_reference string:;
node_title string:A-COLLECTED-VAT;
mirror_section_title string:John Smith;
debit string:0;
credit string:58.80">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_transactions_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[9];
specific_reference string:;
title string:Line Title;
parent_reference string:;
node_title string:A-GS;
mirror_section_title string:John Smith;
debit string:0;
credit string:300">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_transactions_table" />
</tal:block>
</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>test_profit_and_loss</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>Test Profit and Loss Report</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tests/testAccountingReports.py#L4542">testAccountingReports.py:TestAccountingReports.testProfitAndLoss</a>
</th></tr>
</thead>
<tbody
tal:define="init_method string:AccountingZuite_initializeAccountingTransactionReportTest?report_name=profit-and-loss&report_style=Hal;
offset python:0;
now python:DateTime()">
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr>
<tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/accounting_module/</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>//a[@data-i18n="Profit and Loss"]</td><td></td></tr>
<tr><td>click</td>
<td>//a[@data-i18n="Profit and Loss"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_your_section_category"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_your_section_category"]</td>
<td>value=group/demo_group</td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_at_date"]</td>
<td>${year}-12-31</td></tr>
<!-- We cannot easily ensure correctness because the report renders always as
an attachment. Even in unittest we only check validity of such attachment.
-->
</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>test_restricted_skin_selection</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>Test Invoices Report Skin Allowance</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
Check that use gets notified if they are using wrong 'Report Style' (UI) Preference.
</th></tr>
</thead>
<!-- Set Report Style to not-allowed value 'View' -->
<tbody
tal:define="init_method string:AccountingZuite_initializeAccountingTransactionReportTest?report_name=journal&report_style=View;">
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/accounting_module/</td><td></td></tr>
<!-- Select random Report and fill in just the necessary values for valid submission. -->
<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>//a[@data-i18n="Journal"]</td><td></td></tr>
<tr><td>click</td>
<td>//a[@data-i18n="Journal"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_your_section_category"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_your_section_category"]</td>
<td>value=group/demo_group</td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr>
<tr><td>click</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr>
<!-- Now we should get somehow notified about wrong skin selection.
At the beginning it was implemented as Form Message because the error is on a hidden field. -->
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="notification"]//button[contains(text(), "skins are allowed for reports")]</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//div[@data-gadget-scope="notification"]//button[contains(text(), "skins are allowed for reports")]</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>test_third_parties</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>Test Third Party (aka Other Party) Report</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tests/testAccountingReports.py#L4658">testAccountingReports.py:TestAccountingReports.testOtherPartiesReport</a>
</th></tr>
</thead>
<tbody
tal:define="init_method string:AccountingZuite_initializeAccountingTransactionReportTest?report_name=other-parties-ledger&report_style=Hal;
offset python:0;
now python:DateTime()">
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr>
<tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/accounting_module/</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>//a[@data-i18n="Third Parties"]</td><td></td></tr>
<tr><td>click</td>
<td>//a[@data-i18n="Third Parties"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_your_section_category"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_your_section_category"]</td>
<td>value=group/demo_group</td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_ledger"]//select</td><td></td></tr>
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_ledger"]//select</td>
<td>value=ledger/accounting/general</td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_at_date"]</td>
<td>${year}-${month}-${day}</td></tr>
<tr><td>click</td><!-- Uncheck because it is checked by default -->
<td>//input[@type="checkbox" and @name="field_your_omit_balanced_accounts"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td><td></td></tr>
<!-- we need to zero-out simulation_state to just 'delivered' -->
<tal:block tal:repeat="_ python:range(4)"><!-- There is by default just few simulation states -->
<!-- we take advantage of dissapearing elements when selecting one empty -->
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=</td></tr>
<tr><td>pause</td>
<td>50</td>
<td></td></tr>
</tal:block>
<tr><td>select</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]/div/div[1]//select</td>
<td>value=delivered</td></tr>
<tr><td>click</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr>
<tr><td>store</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="2 Records"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_currency"]//p[text()="EUR"]</td><td></td></tr>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
Movement_getExplanationTitle string:Transaction 1;
section_title string:;
Movement_getExplanationTranslatedPortalType string:Accounting Transaction;
Movement_getNodeGapId string:A-REC;
Movement_getExplanationReference string:;
Movement_getSpecificReference string:1;
getTranslatedSimulationStateTitle string:Closed;
debit_price string:100;
credit_price string:0;
running_total_price string:100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_ledger_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[2];
Movement_getExplanationTitle string:Transaction 2;
section_title string:;
Movement_getExplanationTranslatedPortalType string:Accounting Transaction;
Movement_getNodeGapId string:A-PAY;
Movement_getExplanationReference string:;
Movement_getSpecificReference string:2;
getTranslatedSimulationStateTitle string:Closed;
debit_price string:200;
credit_price string:0;
running_total_price string:300">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_accounts_ledger_table" />
</tal:block>
</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>test_trial_balance</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>Test Trial Balance Report</title></head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><th rowspan="1" colspan="4">
Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tests/testAccountingReports.py#L2326">TestAccountingReports.testJournal</a>
</th></tr>
</thead>
<tbody
tal:define="init_method string:AccountingZuite_initializeAccountingTransactionReportTest?report_name=trial-balance&report_style=Hal;
now python: DateTime()">
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>
<tr><td>store</td>
<td>${base_url}/web_site_module/renderjs_runner</td>
<td>renderjs_url</td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/accounting_module/</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>//a[@data-i18n="Trial Balance"]</td><td></td></tr>
<tr><td>click</td>
<td>//a[@data-i18n="Trial Balance"]</td><td></td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr>
<tr><td>store</td><td tal:content="python: now.year()"></td><td>year</td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_your_section_category"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_your_section_category"]</td>
<td>value=group/demo_group</td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_from_date"]</td>
<td>${year}-01-01</td></tr>
<tr><td>type</td>
<td>//input[@name="field_your_at_date"]</td>
<td>${year}-12-31</td></tr>
<!-- field_your_section_category_strict is False by default -->
<!-- field_your_per_account_class_summary is False by default -->
<!-- field_your_expand_accounts is False by default -->
<tr><td>click</td>
<td>//input[@type="checkbox" and @name="field_your_show_empty_accounts"]</td><td></td></tr>
<tr><td>click</td>
<td>//input[@type="checkbox" and @name="field_your_show_detailed_balance_columns"]</td><td></td></tr>
<!-- let field_your_portal_type its default values -->
<!-- For simulation state only ensure that default values are still "delivered" and "stopped" -->
<tr><td>store</td>
<td>//div[@data-gadget-scope="field_your_simulation_state"]//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_multilist.html"]</td>
<td>multi_select</td></tr>
<tr><td>waitForElementPresent</td>
<td>${multi_select}/div[3]//select</td><td></td></tr>
<tr><td>assertValue</td>
<td>${multi_select}/div[1]//select</td>
<td>delivered</td></tr>
<tr><td>assertValue</td>
<td>${multi_select}/div[2]//select</td>
<td>stopped</td></tr>
<tr><td>assertValue</td>
<td>${multi_select}/div[3]//select</td>
<td></td></tr>
<tr><td>click</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_page_form.html"]//input[@type="submit"]</td><td></td></tr>
<tr><td>store</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table</td>
<td>table</td></tr>
<tr><td>waitForElementPresent</td>
<td>${table}//tfoot//span[@data-i18n="10 Records"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_your_currency"]//p[text()="EUR"]</td><td></td></tr>
<!-- ListBox sorts the result in different order than they are returned by its
List Method. Seems they are sorted on Title alphabetically -->
<tal:block tal:define="row_selector string:$${table}/tbody/tr[1];
node_id string:A-BANK;
node_title string:Bank (Bank1);
credit string:3300;
final_balance string:-3300;
final_credit_balance string:3300;
final_balance_if_credit string:3300">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[2];
node_id string:A-COLLECTED-VAT;
node_title string:Collected VAT 10%">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[3];
node_id string:A-EQUITY;
node_title string:Equity">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[4];
node_id string:A-FIX-ASSETS;
node_title string:Fixed Assets">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[5];
node_id string:A-GP;
node_title string:Goods Purchase">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[6];
node_id string:A-GS;
node_title string:Goods Sales">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[7];
node_id string:A-PAY;
node_title string:Payable;
debit string:200;
credit string:100;
final_balance string:100;
final_debit_balance string:200;
final_credit_balance string:100;
final_balance_if_debit string:100">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[8];
node_id string:A-REC;
node_title string:Receivable;
debit string:3400;
credit string:200;
final_balance string:3200;
final_debit_balance string:3400;
final_credit_balance string:200;
final_balance_if_debit string:3200">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table" />
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[9];
node_title string:Refundable VAT 10%;
node_id string:A-REF-VAT">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table"></tal:block>
</tal:block>
<tal:block tal:define="row_selector string:$${table}/tbody/tr[10];
node_title string:Stocks;
node_id string:A-STOCK">
<tal:block metal:use-macro="here/AccountingZuite_reportMacros/macros/check_row_in_balance_table"></tal:block>
</tal:block>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2011 Nexedi SARL and Contributors. All Rights Reserved.
# Kazuhiko <kazuhiko@nexedi.com>
# Rafael Monnerat <rafael@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import unittest
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase
class TestRenderJSAccountingReport(ERP5TypeFunctionalTestCase):
foreground = 0
run_only = "renderjs_ui_accounting_zuite/test_accounting_report"
def getBusinessTemplateList(self):
return (
'erp5_accounting_renderjs_ui_test',
)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestRenderJSAccountingReport))
return suite
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testFunctionalRJSAccounting</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testFunctionalRJSAccounting</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
Copyright (c) Nexedi SARL
\ No newline at end of file
erp5_accounting_ui_test
erp5_web_renderjs_ui
\ No newline at end of file
RenderJS UI tests for Accounting Module.
\ No newline at end of file
portal_tests/renderjs_ui_accounting_zuite
portal_tests/renderjs_ui_accounting_zuite/**
\ No newline at end of file
test.erp5.testFunctionalRJSAccounting
\ No newline at end of file
erp5_full_text_mroonga_catalog
\ No newline at end of file
erp5_accounting_renderjs_ui_test
\ No newline at end of file
...@@ -57,11 +57,11 @@ Usage: ...@@ -57,11 +57,11 @@ Usage:
<td tal:content="string:$mirror_section_title"></td></tr> <td tal:content="string:$mirror_section_title"></td></tr>
<tr tal:condition="exists:debit"> <tr tal:condition="exists:debit">
<td>assertFloat</td> <td>assertFloat</td>
<td>${current_row}/td[7]//div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/div</td> <td>${current_row}/td[7]//div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/p</td>
<td tal:content="string:$debit"></td></tr> <td tal:content="string:$debit"></td></tr>
<tr tal:condition="exists:credit"> <tr tal:condition="exists:credit">
<td>assertFloat</td> <td>assertFloat</td>
<td>${current_row}/td[8]//div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/div</td> <td>${current_row}/td[8]//div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/p</td>
<td tal:content="string:$credit"></td></tr> <td tal:content="string:$credit"></td></tr>
</tal:block> </tal:block>
...@@ -103,15 +103,15 @@ Usage: ...@@ -103,15 +103,15 @@ Usage:
<td tal:content="string:$getTranslatedSimulationStateTitle"></td></tr> <td tal:content="string:$getTranslatedSimulationStateTitle"></td></tr>
<tr tal:condition="exists:debit_price"> <tr tal:condition="exists:debit_price">
<td>assertFloat</td> <td>assertFloat</td>
<td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/div'.format(offset + 8)"></td> <td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/p'.format(offset + 8)"></td>
<td tal:content="string:$debit_price"></td></tr> <td tal:content="string:$debit_price"></td></tr>
<tr tal:condition="exists:credit_price"> <tr tal:condition="exists:credit_price">
<td>assertFloat</td> <td>assertFloat</td>
<td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/div'.format(offset + 9)"></td> <td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/p'.format(offset + 9)"></td>
<td tal:content="string:$credit_price"></td></tr> <td tal:content="string:$credit_price"></td></tr>
<tr tal:condition="exists:running_total_price"> <tr tal:condition="exists:running_total_price">
<td>assertFloat</td><!-- Balance --> <td>assertFloat</td><!-- Balance -->
<td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/div'.format(offset + 10)"></td> <td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/p'.format(offset + 10)"></td>
<td tal:content="string:$running_total_price"></td></tr> <td tal:content="string:$running_total_price"></td></tr>
</tal:block> </tal:block>
...@@ -142,15 +142,15 @@ Usage: ...@@ -142,15 +142,15 @@ Usage:
<td tal:content="string:$Movement_getExplanationTitleAndAnalytics"></td></tr> <td tal:content="string:$Movement_getExplanationTitleAndAnalytics"></td></tr>
<tr tal:condition="exists:debit_price"> <tr tal:condition="exists:debit_price">
<td>assertFloat</td> <td>assertFloat</td>
<td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/div'.format(offset + 5)"></td> <td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/p'.format(offset + 5)"></td>
<td tal:content="string:$debit_price"></td></tr> <td tal:content="string:$debit_price"></td></tr>
<tr tal:condition="exists:credit_price"> <tr tal:condition="exists:credit_price">
<td>assertFloat</td> <td>assertFloat</td>
<td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/div'.format(offset + 6)"></td> <td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/p'.format(offset + 6)"></td>
<td tal:content="string:$credit_price"></td></tr> <td tal:content="string:$credit_price"></td></tr>
<tr tal:condition="exists:running_total_price"> <tr tal:condition="exists:running_total_price">
<td>assertFloat</td><!-- Balance --> <td>assertFloat</td><!-- Balance -->
<td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/div'.format(offset + 7)"></td> <td tal:content="python: '${{current_row}}/td[{:d}]//div[contains(@data-gadget-url, \'gadget_html5_element.html\')]/p'.format(offset + 7)"></td>
<td tal:content="string:$running_total_price"></td></tr> <td tal:content="string:$running_total_price"></td></tr>
<!-- Grouping Reference --> <!-- Grouping Reference -->
<!-- Grouping Date --> <!-- Grouping Date -->
...@@ -164,7 +164,7 @@ Usage: ...@@ -164,7 +164,7 @@ Usage:
<tal:block metal:define-macro='check_row_in_balance_table'> <tal:block metal:define-macro='check_row_in_balance_table'>
<tr><td>store</td><td tal:content="string:$row_selector"></td><td>current_row</td></tr> <tr><td>store</td><td tal:content="string:$row_selector"></td><td>current_row</td></tr>
<tr><td>store</td><td>div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/div</td><td>float_val</td></tr> <tr><td>store</td><td>div[@data-gadget-url="${renderjs_url}/gadget_html5_element.html"]/p</td><td>float_val</td></tr>
<tr tal:condition="exists:node_id"> <tr tal:condition="exists:node_id">
<td>assertText</td> <td>assertText</td>
<td>${current_row}/td[1]//a</td> <td>${current_row}/td[1]//a</td>
......
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