Commit a2519b1a authored by Jérome Perrin's avatar Jérome Perrin

Add a test for object_print action slot.

Remove useless default 'print' action on Foo objects.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8461 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1d9335ae
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
<string>Products.CMFCore.ActionInformation</string> <string>Products.PageTemplates.ZopePageTemplate</string>
<string>ActionInformation</string> <string>ZopePageTemplate</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
...@@ -19,50 +19,94 @@ ...@@ -19,50 +19,94 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>action</string> </key> <key> <string>_bind_names</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <object>
</value> <klass>
</item> <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item> <item>
<key> <string>category</string> </key> <key> <string>_asgns</string> </key>
<value> <string>object_print</string> </value> <value>
</item> <dictionary>
<item> <item>
<key> <string>condition</string> </key> <key> <string>name_subpath</string> </key>
<value> <string></string> </value> <value> <string>traverse_subpath</string> </value>
</item> </item>
<item> </dictionary>
<key> <string>description</string> </key> </value>
<value> <string></string> </value> </item>
</dictionary>
</state>
</object>
</value>
</item> </item>
<item> <item>
<key> <string>icon</string> </key> <key> <string>_dav_writelocks</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>_text</string> </key>
<value> <string>print</string> </value> <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 Print Actions</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Print Actions</td></tr>\n
</thead><tbody>\n
<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=Print Portal&category=object_print&action=string:%24{portal_url}/view">Create a dummy action that redirects to the portal</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td tal:content="string: ${here/portal_url}/foo_module/1/view">/erp5/foo_module/1/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Print\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Welcome to ERP5</td>\n
<td></td>\n
</tr>\n
</body>\n
</html>\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>permissions</string> </key> <key> <string>content_type</string> </key>
<value> <value> <string>text/html</string> </value>
<tuple>
<string>View</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>priority</string> </key> <key> <string>expand</string> </key>
<value> <float>1.0</float> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>id</string> </key>
<value> <string>Print</string> </value> <value> <string>test_print_actions_present</string> </value>
</item> </item>
<item> <item>
<key> <string>visible</string> </key> <key> <string>title</string> </key>
<value> <int>1</int> </value> <value> <string></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -71,8 +115,8 @@ ...@@ -71,8 +115,8 @@
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
<string>Products.CMFCore.Expression</string> <string>Persistence</string>
<string>Expression</string> <string>PersistentMapping</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
...@@ -80,8 +124,10 @@ ...@@ -80,8 +124,10 @@
<pickle> <pickle>
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>_container</string> </key>
<value> <string>string:${object_url}/Delivery_print</string> </value> <value>
<dictionary/>
</value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -16,5 +16,4 @@ Foo Module | view ...@@ -16,5 +16,4 @@ Foo Module | view
Foo | history Foo | history
Foo | list Foo | list
Foo | metadata Foo | metadata
Foo | print
Foo | view Foo | view
\ 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