From 967fea927cfa40558f67b60da9a7d03e233047b4 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Mon, 25 Sep 2006 09:15:40 +0000 Subject: [PATCH] Update testDialogMain to test more dialog capabilities. Add testInstallFormRepositoryDialogCategoryPropagation to test the special case of install from repository action. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10282 20353a03-c40f-0410-a6d1-a30d3c3de9de --- ...ormRepositoryDialogCategoryPropagation.xml | 122 ++++++++ .../page_templates_zuite/testDialogMain.xml | 34 ++- .../FooModule_viewFooList/listbox.xml | 7 +- .../erp5_ui_test/Foo_doNothing.xml | 146 ++++++++++ .../erp5_ui_test/Foo_viewDummyDialog.xml | 122 ++++++++ .../Foo_viewDummyDialog/your_string_field.xml | 266 ++++++++++++++++++ bt5/erp5_ui_test/bt/revision | 2 +- 7 files changed, 695 insertions(+), 4 deletions(-) create mode 100644 bt5/erp5_ui_test/PathTemplateItem/portal_tests/business_template_zuite/testInstallFormRepositoryDialogCategoryPropagation.xml create mode 100644 bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_doNothing.xml create mode 100644 bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDummyDialog.xml create mode 100644 bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDummyDialog/your_string_field.xml diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/business_template_zuite/testInstallFormRepositoryDialogCategoryPropagation.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/business_template_zuite/testInstallFormRepositoryDialogCategoryPropagation.xml new file mode 100644 index 0000000000..c464e60ded --- /dev/null +++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/business_template_zuite/testInstallFormRepositoryDialogCategoryPropagation.xml @@ -0,0 +1,122 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.PageTemplates.ZopePageTemplate</string> + <string>ZopePageTemplate</string> + </tuple> + <none/> + </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 xmlns:tal="http://xml.zope.org/namespaces/tal"\n + xmlns:metal="http://xml.zope.org/namespaces/metal">\n +<head>\n +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n +<title>Test install from repository dialog category propagation</title>\n +</head>\n +<body>\n +<table cellpadding="1" cellspacing="1" border="1">\n +<thead>\n +<tr><td rowspan="1" colspan="3">Check that the script used to reset the selection for install from repository dialog transmits correctly the dialog_category.</td></tr>\n +</thead><tbody>\n +<tr>\n + <td>open</td>\n + <td tal:content="here/portal_url"></td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>selectAndWait</td>\n + <td>select_favorite</td>\n + <td>label=Manage Business Templates</td>\n +</tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>link=Import / Export</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertElementPresent</td>\n + <td>//input[@name=\'dialog_category\' and @value=\'object_exchange\']</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>selectAndWait</td>\n + <td>dialog_selector</td>\n + <td>label=Install Business Templates From Repositories</td>\n +</tr>\n +<tr>\n + <td>assertElementPresent</td>\n + <td>//input[@name=\'dialog_category\' and @value=\'object_exchange\']</td>\n + <td></td>\n +</tr>\n +</tbody></table>\n +</body>\n +</html>\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>testInstallFormRepositoryDialogCategoryPropagation</string> </value> + </item> + <item> + <key> <string>isIndexable</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testDialogMain.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testDialogMain.xml index fa71a1de54..263cb51afe 100644 --- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testDialogMain.xml +++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testDialogMain.xml @@ -68,7 +68,12 @@ <tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n <tr>\n <td>open</td>\n - <td tal:content="string: ${here/portal_url}/portal_types/Foo/PortalType_addAction?id=test_action&name=Dummy Exchange&category=object_exchange&action=string:%24{portal_url}/view">Create a dummy action</td>\n + <td tal:content="string: ${here/portal_url}/portal_types/Foo/PortalType_addAction?id=test_action&name=Dummy Exchange&category=object_exchange&action=string:%24{object_url}/Foo_viewDummyDialog">Create a dummy action</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>open</td>\n + <td tal:content="string: ${here/portal_url}/portal_types/Foo/PortalType_addAction?id=test_action_2&name=Another Dummy Exchange&category=object_exchange&action=string:%24{object_url}/Foo_viewDummyDialog">Create another dummy action</td>\n <td></td>\n </tr>\n <tr>\n @@ -87,9 +92,14 @@ <td>link=Import / Export</td>\n <td></td>\n </tr>\n +<tr>\n + <td>clickAndWait</td>\n + <td>Base_callDialogMethod:method</td>\n + <td></td>\n +</tr>\n <tr>\n <td>assertTextPresent</td>\n - <td>Welcome to ERP5</td>\n + <td>"Nothing" action is done.</td>\n <td></td>\n </tr>\n <tr>\n @@ -97,6 +107,26 @@ <td>//input[@name=\'dialog_id\']</td>\n <td></td>\n </tr>\n +<tr>\n + <td>assertElementNotPresent</td>\n + <td>//input[@name=\'dialog_category\']</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertElementNotPresent</td>\n + <td>//input[@name=\'update_method\']</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertElementNotPresent</td>\n + <td>//input[@name=\'dialog_method\']</td>\n + <td></td>\n +</tr>\n +<tr>\n + <td>assertElementNotPresent</td>\n + <td>//input[@name=\'select_dialog\']</td>\n + <td></td>\n +</tr>\n </body>\n </html>\n diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_viewFooList/listbox.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_viewFooList/listbox.xml index 7af946aa6a..6d2379831f 100644 --- a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_viewFooList/listbox.xml +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_viewFooList/listbox.xml @@ -393,7 +393,12 @@ <item> <key> <string>editable_columns</string> </key> <value> - <list/> + <list> + <tuple> + <string>id</string> + <string>id</string> + </tuple> + </list> </value> </item> <item> diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_doNothing.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_doNothing.xml new file mode 100644 index 0000000000..b22e4d8a99 --- /dev/null +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_doNothing.xml @@ -0,0 +1,146 @@ +<?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>kw.update(context.REQUEST.form)\n +return context.ERP5XhtmlStyle_redirect(context.absolute_url(), keep_items={\'portal_status_message\': \'"Nothing" action is done.\'}, **kw)\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>**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>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>kw</string> + <string>_getattr_</string> + <string>context</string> + <string>_apply_</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_doNothing</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_viewDummyDialog.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDummyDialog.xml new file mode 100644 index 0000000000..a900f69f23 --- /dev/null +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDummyDialog.xml @@ -0,0 +1,122 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.ERP5Form.Form</string> + <string>ERP5Form</string> + </tuple> + <none/> + </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/> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> <string>Foo_doNothing</string> </value> + </item> + <item> + <key> <string>encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>enctype</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>group_list</string> </key> + <value> + <list> + <string>left</string> + </list> + </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <dictionary> + <item> + <key> <string>left</string> </key> + <value> + <list> + <string>your_string_field</string> + </list> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Foo_viewDummyDialog</string> </value> + </item> + <item> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>Foo_viewDummyDialog</string> </value> + </item> + <item> + <key> <string>pt</string> </key> + <value> <string>form_dialog</string> </value> + </item> + <item> + <key> <string>row_length</string> </key> + <value> <int>4</int> </value> + </item> + <item> + <key> <string>stored_encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Dummy</string> </value> + </item> + <item> + <key> <string>unicode_mode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>update_action</string> </key> + <value> <string>Foo_doNothing</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDummyDialog/your_string_field.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDummyDialog/your_string_field.xml new file mode 100644 index 0000000000..e7d9e56a28 --- /dev/null +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDummyDialog/your_string_field.xml @@ -0,0 +1,266 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.Formulator.StandardFields</string> + <string>StringField</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>your_string_field</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + <item> + <key> <string>required_not_found</string> </key> + <value> <string>Input is required but no input given.</string> </value> + </item> + <item> + <key> <string>too_long</string> </key> + <value> <string>Too much input was given.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_maxwidth</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_width</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_length</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>truncate</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_maxwidth</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_width</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_length</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>truncate</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_maxwidth</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>display_width</string> </key> + <value> <int>20</int> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>max_length</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>your_string_field</string> </value> + </item> + <item> + <key> <string>truncate</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <int>0</int> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision index 3d9aebb2cc..780fea92d2 100644 --- a/bt5/erp5_ui_test/bt/revision +++ b/bt5/erp5_ui_test/bt/revision @@ -1 +1 @@ -68 \ No newline at end of file +77 \ No newline at end of file -- 2.30.9