[Erp5-report] r8817 - in /erp5/trunk/bt5/erp5_ui_test: PathTemplateItem/portal_tests/page_t...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jul 26 21:11:31 CEST 2006
Author: kevin
Date: Wed Jul 26 21:11:18 2006
New Revision: 8817
URL: http://svn.erp5.org?rev=8817&view=rev
Log:
Test form_dialog Action List Rendering.
Extract PortalType_addAction delete part to new PortalType_deleteAction script.
Added:
erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFormDialogActionListRendering.xml
erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_deleteAction.xml
Modified:
erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_addAction.xml
erp5/trunk/bt5/erp5_ui_test/bt/change_log
erp5/trunk/bt5/erp5_ui_test/bt/revision
Added: erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFormDialogActionListRendering.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFormDialogActionListRendering.xml?rev=8817&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFormDialogActionListRendering.xml (added)
+++ erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/page_templates_zuite/testFormDialogActionListRendering.xml Wed Jul 26 21:11:18 2006
@@ -1,0 +1,162 @@
+<?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>_dav_writelocks</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+ </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 form_dialog Action List Rendering</title>\n
+</head>\n
+<body>\n
+<table cellpadding="1" cellspacing="1" border="1">\n
+<thead>\n
+<tr><td rowspan="1" colspan="3">Test form_dialog Action List Rendering</td></tr>\n
+</thead><tbody>\n
+<!--\n
+ === PART 0 ===\n
+ This part delete the second action if present, in order to reach the initial state\n
+ of this test. This is required to re-run the test in the same erp5 instance.\n
+-->\n
+<tr>\n
+ <td>open</td>\n
+ <td tal:content="string: ${here/portal_url}/portal_types/Foo%20Module/PortalType_deleteAction?id=search2">Delete second action if exist</td>\n
+ <td></td>\n
+</tr>\n
+<!--\n
+ === PART 1 ===\n
+ This part make sure form_dialog Page Template don\'t render <select> widget\n
+ if only one action exist.\n
+-->\n
+<tr>\n
+ <td>open</td>\n
+ <td tal:content="string: ${here/portal_url}/foo_module/FooModule_viewSearchDialog?dialog_category=object_search">/erp5/foo_module/foo_module/FooModule_viewSearchDialog?dialog_category=object_search</td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>verifyElementNotPresent</td>\n
+ <td>//select[@id="dialog_selector"]</td>\n
+ <td></td>\n
+</tr>\n
+<!--\n
+ === PART 2 ===\n
+ This part test that a <select> input is rendered when more than one action exist.\n
+-->\n
+<tr>\n
+ <td>open</td>\n
+ <td tal:content="string: ${here/portal_url}/portal_types/Foo%20Module/PortalType_addAction?id=search2&name=Search2&category=object_search&action=string:%24{portal_url}/FooModule_viewSearchDialog">Create a second dummy search action to test the dynamic creation of select action drop-down list</td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>open</td>\n
+ <td tal:content="string: ${here/portal_url}/foo_module/FooModule_viewSearchDialog?dialog_category=object_search">/erp5/foo_module/foo_module/FooModule_viewSearchDialog?dialog_category=object_search</td>\n
+ <td></td>\n
+</tr>\n
+<tr>\n
+ <td>verifyText</td>\n
+ <td>//select[@id="dialog_selector"]/option[1]</td>\n
+ <td>Search</td>\n
+</tr>\n
+<tr>\n
+ <td>assertText</td>\n
+ <td>//select[@id="dialog_selector"]/option[2]</td>\n
+ <td>Search2</td>\n
+</tr>\n
+</body>\n
+</html>
+
+]]></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>testFormDialogActionListRendering</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <tuple>
+ <string>Persistence</string>
+ <string>PersistentMapping</string>
+ </tuple>
+ <none/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_container</string> </key>
+ <value>
+ <dictionary/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_addAction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_addAction.xml?rev=8817&r1=8816&r2=8817&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_addAction.xml (original)
+++ erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_addAction.xml Wed Jul 26 21:11:18 2006
@@ -72,21 +72,16 @@
"""\n
assert context.meta_type == \'ERP5 Type Information\'\n
\n
-existing_actions_indexs = []\n
-for idx, ai in enumerate(context.listActions()):\n
- if ai.getId() == id:\n
- existing_actions_indexs.append(idx)\n
+context.PortalType_deleteAction(id=id)\n
\n
-if existing_actions_indexs:\n
- context.deleteActions(existing_actions_indexs)\n
-\n
-context.addAction( id=id,\n
- action=action,\n
- name=name,\n
- condition=condition,\n
- permission=permission,\n
- category=category,\n
- icon=icon, )\n
+context.addAction( id = id\n
+ , action = action\n
+ , name = name\n
+ , condition = condition\n
+ , permission = permission\n
+ , category = category\n
+ , icon = icon\n
+ )\n
\n
return \'Set Successfully.\'\n
</string> </value>
@@ -153,11 +148,6 @@
<string>_getattr_</string>
<string>context</string>
<string>AssertionError</string>
- <string>existing_actions_indexs</string>
- <string>_getiter_</string>
- <string>enumerate</string>
- <string>idx</string>
- <string>ai</string>
</tuple>
</value>
</item>
Added: erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_deleteAction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_deleteAction.xml?rev=8817&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_deleteAction.xml (added)
+++ erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/PortalType_deleteAction.xml Wed Jul 26 21:11:18 2006
@@ -1,0 +1,197 @@
+<?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>"""Delete an action on a type informations from types tool.\n
+"""\n
+assert context.meta_type == \'ERP5 Type Information\'\n
+\n
+existing_actions_indexs = []\n
+for idx, ai in enumerate(context.listActions()):\n
+ if ai.getId() == id:\n
+ existing_actions_indexs.append(idx)\n
+\n
+if existing_actions_indexs:\n
+ context.deleteActions(existing_actions_indexs)\n
+\n
+return \'Set Successfully.\'\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_dav_writelocks</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>id=None</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>id</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ <string>AssertionError</string>
+ <string>existing_actions_indexs</string>
+ <string>_getiter_</string>
+ <string>enumerate</string>
+ <string>idx</string>
+ <string>ai</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <tuple>
+ <none/>
+ </tuple>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>PortalType_deleteAction</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <tuple>
+ <string>Persistence</string>
+ <string>PersistentMapping</string>
+ </tuple>
+ <none/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_container</string> </key>
+ <value>
+ <dictionary/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_ui_test/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/bt/change_log?rev=8817&r1=8816&r2=8817&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_ui_test/bt/change_log Wed Jul 26 21:11:18 2006
@@ -1,3 +1,7 @@
+2006-07-26 Kevin
+* Test form_dialog Action List Rendering.
+* Extract PortalType_addAction delete part to new PortalType_deleteAction script.
+
2006-07-26 yo
* Test a validation error with an editable float field in a listbox.
Modified: erp5/trunk/bt5/erp5_ui_test/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/bt/revision?rev=8817&r1=8816&r2=8817&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/bt/revision (original)
+++ erp5/trunk/bt5/erp5_ui_test/bt/revision Wed Jul 26 21:11:18 2006
@@ -1,1 +1,1 @@
-24
+33
More information about the Erp5-report
mailing list