Commit 3a625816 authored by wenjie.zheng's avatar wenjie.zheng

erp5_workflow_test_data: Add action_url in user action.

parent 62f23b36
...@@ -48,6 +48,12 @@ ...@@ -48,6 +48,12 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <string>python: True</string> </value> <value> <string>python: True</string> </value>
...@@ -81,4 +87,23 @@ ...@@ -81,4 +87,23 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <value> <string>python:${object_url}/Base_viewWorkflowActionDialog?workflow_action=invalidate_action</string> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>after_script_id</string> </key> <key> <string>after_script_id</string> </key>
...@@ -42,6 +40,12 @@ ...@@ -42,6 +40,12 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <string>python: True</string> </value> <value> <string>python: True</string> </value>
...@@ -75,4 +79,23 @@ ...@@ -75,4 +79,23 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>actbox_url</string> </key>
<value> <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=validate_action</string> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>after_script_id</string> </key> <key> <string>after_script_id</string> </key>
...@@ -52,6 +50,12 @@ ...@@ -52,6 +50,12 @@
<key> <string>groups</string> </key> <key> <string>groups</string> </key>
<value> <string>()</string> </value> <value> <string>()</string> </value>
</item> </item>
<item>
<key> <string>guard</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>guard_expression</string> </key> <key> <string>guard_expression</string> </key>
<value> <string>python: True</string> </value> <value> <string>python: True</string> </value>
...@@ -98,4 +102,23 @@ ...@@ -98,4 +102,23 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Guard" module="Products.DCWorkflow.Guard"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>roles</string> </key>
<value>
<list>
<string>Assignor</string>
<string>Assignee</string>
<string>Manager</string>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
<item> <item>
<key> <string>erp5workflow_list</string> </key> <key> <string>erp5workflow_list</string> </key>
<value> <value>
<tuple/> <tuple>
<string>testing_workflow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -81,12 +81,30 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase): ...@@ -81,12 +81,30 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
last_history = history_list[-1] last_history = history_list[-1]
self.assertEqual(last_history.get("error_message", None), "foo error") self.assertEqual(last_history.get("error_message", None), "foo error")
def test_08_testUserActionDisplay(self):
new_object = self.getTestObject()
object_pt = new_object.getTypeInfo()
self.assertTrue(hasattr(object_pt, 'validate'))
self.doActionFor(new_object, "validate")
self.assertTrue(hasattr(object_pt, 'invalidate'))
### Doesn't exist yet ### Doesn't exist yet
def _testSimpleWorklist(self): def _testSimpleWorklist(self):
pass pass
def _testWorklistWithAnAssignee(self): def _testWorklistWithAnAssignee(self):
pass pass
def beforeTearDown(self):
self.portal = self.getPortal()
self.getWorkflowTool().setChainForPortalTypes(['ERP5Workflow Test Document'], ())
self.workflow_module = self.portal.workflow_module
self.wf = self.workflow_module._getOb('testing_workflow')
type_test_object = self.portal.portal_types._getOb('ERP5Workflow Test Document')
type_test_object.edit(type_base_category_list=('validation_state',))
type_test_object.edit(type_erp5workflow_list=('testing_workflow',))
self.getWorkflowTool().setChainForPortalTypes(['ERP5Workflow Test Document'], ())
class TestERP5Workflow(TestERP5WorkflowMixin): class TestERP5Workflow(TestERP5WorkflowMixin):
""" """
Tests ERP5 Workflow. Tests ERP5 Workflow.
......
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