From 8aaffeb0376e135939dd7e1bf26a94bc34ef6977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Sun, 14 Jan 2007 20:01:46 +0000 Subject: [PATCH] tests that editable fields are used to render stat line. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12092 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../listbox_zuite/testStatColumns.xml | 27 ++++ .../erp5_ui_test/Foo_statQuantity.xml | 143 ++++++++++++++++++ .../erp5_ui_test/Foo_view/listbox.xml | 30 +++- .../Foo_view/listbox_quantity.xml | 2 +- bt5/erp5_ui_test/bt/revision | 2 +- 5 files changed, 200 insertions(+), 4 deletions(-) create mode 100644 bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_statQuantity.xml diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testStatColumns.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testStatColumns.xml index 26a3f6e3ac..9faa1907ef 100644 --- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testStatColumns.xml +++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testStatColumns.xml @@ -111,6 +111,33 @@ \t<td></td>\n </tr>\n \n +<!-- view mode with editable field -->\n +<tr>\n +\t<td>open</td>\n +\t<td>${base_url}/foo_module/0/view</td>\n +\t<td></td>\n +</tr>\n +<tr>\n +\t<td>verifyText</td>\n +\t<td>//tr[@id="listbox_stat_line"]/td[2]</td>\n +\t<td></td>\n +</tr>\n +<tr>\n +\t<td>verifyText</td>\n +\t<td>//tr[@id="listbox_stat_line"]/td[4]</td>\n +\t<td></td>\n +</tr>\n +<tr>\n +\t<td>verifyText</td>\n +\t<td>//tr[@id="listbox_stat_line"]/td[3]</td>\n +\t<td>1 234.5</td>\n +</tr>\n +<tr>\n +\t<td>verifyNotEditable</td>\n +\t<td>//tr[@id="listbox_stat_line"]/td[3]</td>\n +\t<td></td>\n +</tr>\n +\n </tbody></table>\n </body>\n </html>\n diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_statQuantity.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_statQuantity.xml new file mode 100644 index 0000000000..02a9af8d93 --- /dev/null +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_statQuantity.xml @@ -0,0 +1,143 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.PythonScripts.PythonScript</string> + <string>PythonScript</string> + </tuple> + <none/> + </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>return 1234.5\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>selection, **kw</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>1</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>selection</string> + <string>kw</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Foo_statQuantity</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_view/listbox.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_view/listbox.xml index 1e7c7b86b5..eaea169a53 100644 --- a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_view/listbox.xml +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_view/listbox.xml @@ -517,12 +517,19 @@ <item> <key> <string>stat_columns</string> </key> <value> - <list/> + <list> + <tuple> + <string>quantity</string> + <string>Foo_statQuantity</string> + </tuple> + </list> </value> </item> <item> <key> <string>stat_method</string> </key> - <value> <string></string> </value> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> </item> <item> <key> <string>title</string> </key> @@ -559,4 +566,23 @@ </dictionary> </pickle> </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.MethodField</string> + <string>Method</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>method_name</string> </key> + <value> <string>portal_catalog</string> </value> + </item> + </dictionary> + </pickle> + </record> </ZopeData> diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_view/listbox_quantity.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_view/listbox_quantity.xml index 9e78e0291f..a03fa4b65e 100644 --- a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_view/listbox_quantity.xml +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_view/listbox_quantity.xml @@ -233,7 +233,7 @@ </item> <item> <key> <string>input_style</string> </key> - <value> <string>-1234.5</string> </value> + <value> <string>-1 234.5</string> </value> </item> <item> <key> <string>precision</string> </key> diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision index b00047941a..9da06a1833 100644 --- a/bt5/erp5_ui_test/bt/revision +++ b/bt5/erp5_ui_test/bt/revision @@ -1 +1 @@ -159 \ No newline at end of file +160 \ No newline at end of file -- 2.30.9