Commit ddddbd89 authored by Yusei Tahara's avatar Yusei Tahara

Added Accounting Transaction Template Test.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19190 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bee0815b
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Zuite" module="Products.Zelenium.zuite"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test_accounting_transaction_template</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>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<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>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<html>\n
<head><title>Test for Accounting Transaction Template</title></head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="4">\n
Test Accounting Transaction Template\n
</td></tr>\n
</thead><tbody tal:define="init_method string:AccountingZuite_initializeAccountingTransactionTemplateTest">\n
<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>\n
\n
<!-- Setup {{{ -->\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_module</td>\n
<td>Accounting</td>\n
</tr>\n
<!-- }}} -->\n
\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>label=Add Accounting Transaction</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>label=Add Accounting Transaction Line</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>label=Add Accounting Transaction Line</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>field_my_title</td>\n
<td>Accounting Transaction Template</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>subfield_field_my_start_date_year</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>subfield_field_my_start_date_month</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>subfield_field_my_start_date_day</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>field_my_resource</td>\n
<td>label=YEN</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[3]/select</td>\n
<td>label=1 - Equity</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[3]/select</td>\n
<td>label=2 - Fixed Assets</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//tr[@id="listbox_data_line_2"]/td[3]/select</td>\n
<td>label=40 - Payable</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//tr[@id="listbox_data_line_3"]/td[3]/select</td>\n
<td>label=41 - Receivable</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>document.forms[0].elements[\'Base_edit:method\'][1]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>label=Make a Template</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_module</td>\n
<td>label=Accounting</td>\n
</tr>\n
\n
<!-- Remove Accounting Transactions -->\n
<tr>\n
<td>open</td>\n
<td>${base_url}/AccountingZuite_initializeAccountingTransactionTemplateTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Accounting Transactions Created.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_module</td>\n
<td>Accounting</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>label=Add Accounting Transaction Template</td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Template Created.</td>\n
<td></td>\n
</tr>\n
\n
<!-- Check the content of the document -->\n
<tr>\n
<td>verifyValue</td>\n
<td>field_my_title</td>\n
<td>Accounting Transaction Template</td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>field_my_resource</td>\n
<td>YEN</td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[3]/select</td>\n
<td>label=1 - Equity</td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[3]/select</td>\n
<td>label=2 - Fixed Assets</td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>//tr[@id="listbox_data_line_2"]/td[3]/select</td>\n
<td>label=40 - Payable</td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>//tr[@id="listbox_data_line_3"]/td[3]/select</td>\n
<td>label=41 - Receivable</td>\n
</tr>\n
\n
<!-- delete template -->\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_favorite</td>\n
<td>label=Preferences</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Preference for erp5_accounting ui tests</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Templates</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>listbox_title</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>listbox_record_number</td>\n
<td>1 record(s)</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>listbox_check_all</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_deleteObjectList:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>dialog_submit_button</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Deleted.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>listbox_record_number</td>\n
<td>0 record(s)</td>\n
</tr>\n
\n
</tbody></table>\n
</body>\n
</html> <!-- vim: syntax=html foldmethod=marker\n
-->\n
]]></string> </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_template</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>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<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_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<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>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
module = portal.accounting_module\n
\n
module.manage_delObjects(list(module.objectIds()))\n
\n
# test depends on this\n
return "Accounting Transactions Created."\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>month_count=1, add_draft_transactions=1, transaction_state=\'validated\'</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>month_count</string>
<string>add_draft_transactions</string>
<string>transaction_state</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>module</string>
<string>list</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<int>1</int>
<int>1</int>
<string>validated</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountingZuite_initializeAccountingTransactionTemplateTest</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
68
\ No newline at end of file
69
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment