From dc1f7a8afa1188abcd0fafeef85f29bf3e2e518e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 9 Sep 2008 09:43:49 +0000 Subject: [PATCH] tests that we only allow to select validated accounts when inputting an accounting transaction git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23504 20353a03-c40f-0410-a6d1-a30d3c3de9de --- ...action_input_invalidated_accounts.html.xml | 201 ++++++++++++++++++ bt5/erp5_accounting_ui_test/bt/revision | 2 +- 2 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_input_invalidated_accounts.html.xml diff --git a/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_input_invalidated_accounts.html.xml b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_input_invalidated_accounts.html.xml new file mode 100644 index 0000000000..605b4b5217 --- /dev/null +++ b/bt5/erp5_accounting_ui_test/PathTemplateItem/portal_tests/accounting_zuite/accounting_transaction_zuite/test_accounting_transaction_input_invalidated_accounts.html.xml @@ -0,0 +1,201 @@ +<?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>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_text</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<html>\n +<head><title>Test for Accounting Transaction</title></head>\n +<body>\n +<table cellpadding="1" cellspacing="1" border="1">\n +<thead>\n +<tr><td rowspan="1" colspan="4">\n +Invalidated accounts are not proposed in the drop down where you select\n +accounts.\n +</td></tr>\n +</thead><tbody tal:define="init_method string:AccountingZuite_createAccountingTransactionList?add_draft_transactions:int=0">\n +<tal:block metal:use-macro="here/AccountingZuite_CommonTemplate/macros/init"/>\n +\n +<!-- Setup {{{ -->\n +<tr>\n + <td>open</td>\n + <td>${base_url}/AccountingZuite_markChanged</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>verifyTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}</td>\n + <td></td>\n +</tr>\n +<!-- invalidate an account.\n +-->\n +<tr>\n + <td>selectAndWait</td>\n + <td>select_module</td>\n + <td>Accounts</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>link=Receivable</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>selectAndWait</td>\n + <td>select_action</td>\n + <td>label=Block Account</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>dialog_submit_button</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td>${base_url}/Zuite_waitForActivities</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertTextPresent</td>\n + <td>Done.</td>\n + <td></td>\n +</tr>\n +<!-- }}} -->\n +\n +<!-- Add a new accounting transaction and check this invalidated account cannot\n +be selected {{{ -->\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>Add Accounting Transaction</td>\n +</tr>\n +<tr>\n + <td>assertText</td>\n + <td>//span[@id=\'listbox_record_number\']</td>\n + <td>2 record(s)</td>\n +</tr>\n +<tr>\n + <td>assertElementNotPresent</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[3]/select/option[text()=\'41 - Receivable\']</td>\n + <td></td>\n +</tr>\n +<!-- }}} -->\n +\n +\n +<!-- Check that this account is still in the list for already posted transactions {{{ -->\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>clickAndWait</td>\n + <td>link=Client 1 Sale Invoice</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertValue</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[3]/select</td>\n + <td>account_module/receivable</td>\n +</tr>\n +<tr>\n + <td>assertElementPresent</td>\n + <td>//tr[@id=\'listbox_data_line_0\']/td[3]/select/option[text()=\'41 - Receivable\']</td>\n + <td></td>\n +</tr>\n +<!-- }}} -->\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_accounting_transaction_input_invalidated_accounts.html</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_accounting_ui_test/bt/revision b/bt5/erp5_accounting_ui_test/bt/revision index 105d7d9ad3..97a55e1d74 100644 --- a/bt5/erp5_accounting_ui_test/bt/revision +++ b/bt5/erp5_accounting_ui_test/bt/revision @@ -1 +1 @@ -100 \ No newline at end of file +101 \ No newline at end of file -- 2.30.9