Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
erp5
Commits
8d519385
Commit
8d519385
authored
May 18, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_workflow_test_data: add test improvements.
parent
55f199aa
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
8 deletions
+22
-8
bt5/erp5_workflow_test_data/PortalTypeTemplateItem/portal_types/ERP5Workflow%20Test%20Document.xml
...plateItem/portal_types/ERP5Workflow%20Test%20Document.xml
+2
-2
bt5/erp5_workflow_test_data/TestTemplateItem/portal_components/test.erp5.testWorkflowAndDCWorkflow.py
.../portal_components/test.erp5.testWorkflowAndDCWorkflow.py
+3
-3
bt5/erp5_workflow_test_data/WorkflowTemplateItem/portal_workflow/interactionworkflow_testing_interaction_workflow/afterSetTitle.xml
...onworkflow_testing_interaction_workflow/afterSetTitle.xml
+1
-1
bt5/erp5_workflow_test_data/WorkflowTemplateItem/portal_workflow/interactionworkflow_testing_interaction_workflow/afterValidate.xml
...onworkflow_testing_interaction_workflow/afterValidate.xml
+1
-1
bt5/erp5_workflow_test_data/WorkflowTemplateItem/portal_workflow/testing_interaction_workflow/scripts/afterSetTitle.xml
...ow/testing_interaction_workflow/scripts/afterSetTitle.xml
+1
-1
bt5/erp5_workflow_test_data/WorkflowTemplateItem/portal_workflow/workflow_testing_workflow/transition_delete_action.xml
...ow/workflow_testing_workflow/transition_delete_action.xml
+14
-0
No files found.
bt5/erp5_workflow_test_data/PortalTypeTemplateItem/portal_types/ERP5Workflow%20Test%20Document.xml
View file @
8d519385
...
@@ -26,8 +26,8 @@
...
@@ -26,8 +26,8 @@
<key>
<string>
erp5workflow_list
</string>
</key>
<key>
<string>
erp5workflow_list
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
testing_ingeraction_workflow_interaction
workflow
</string>
<string>
interactionworkflow_testing_interaction_
workflow
</string>
<string>
testing_workflow
_workflow
</string>
<string>
workflow_testing
_workflow
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
...
bt5/erp5_workflow_test_data/TestTemplateItem/portal_components/test.erp5.testWorkflowAndDCWorkflow.py
View file @
8d519385
...
@@ -63,7 +63,7 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
...
@@ -63,7 +63,7 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
# self.assertEqual(new_object.getDescription(), "After script was executed.")
# self.assertEqual(new_object.getDescription(), "After script was executed.")
### zwj: mechanism: validate => validate interaction =>
### zwj: mechanism: validate => validate interaction =>
### setTitle => setTitle interaction => setDescription
### setTitle => setTitle interaction => setDescription
self
.
assertEqual
(
new_object
.
getDescription
(),
"
Interaction of setTitle executed
."
)
self
.
assertEqual
(
new_object
.
getDescription
(),
"
'Interaction of setTitle executed. setTitle is appeared in after validate script
."
)
def
test_02_testBeforeScript
(
self
):
def
test_02_testBeforeScript
(
self
):
new_object
=
self
.
getTestObject
()
new_object
=
self
.
getTestObject
()
...
@@ -181,10 +181,10 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
...
@@ -181,10 +181,10 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
new_object
=
self
.
getTestObject
()
new_object
=
self
.
getTestObject
()
new_object
.
setTitle
(
'nana'
)
new_object
.
setTitle
(
'nana'
)
self
.
doActionFor
(
new_object
,
"validate_action"
)
self
.
doActionFor
(
new_object
,
"validate_action"
)
self
.
assertEqual
(
new_object
.
getTitle
(),
"
toto
"
)
self
.
assertEqual
(
new_object
.
getTitle
(),
"
After validate interaction.
"
)
self
.
assertEqual
(
self
.
getStateFor
(
new_object
),
'validated'
)
self
.
assertEqual
(
self
.
getStateFor
(
new_object
),
'validated'
)
new_object
.
setTitle
(
"tictic"
)
new_object
.
setTitle
(
"tictic"
)
self
.
assertEqual
(
new_object
.
getDescription
(),
"
Interaction of setTitle executed
."
)
self
.
assertEqual
(
new_object
.
getDescription
(),
"
'Interaction of setTitle executed. setTitle is appeared in after validate script
."
)
def
test_12_testIsTransitionPossible
(
self
):
def
test_12_testIsTransitionPossible
(
self
):
new_object
=
self
.
getTestObject
()
new_object
=
self
.
getTestObject
()
...
...
bt5/erp5_workflow_test_data/WorkflowTemplateItem/portal_workflow/interactionworkflow_testing_interaction_workflow/afterSetTitle.xml
View file @
8d519385
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
document = state_change.object\n
<value>
<string>
document = state_change.object\n
document.setDescription(\'Interaction of setTitle executed.\')\n
document.setDescription(\'Interaction of setTitle executed.
setTitle is appeared in after validate script.
\')\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
bt5/erp5_workflow_test_data/WorkflowTemplateItem/portal_workflow/interactionworkflow_testing_interaction_workflow/afterValidate.xml
View file @
8d519385
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
document = state_change[\'object\']\n
<value>
<string>
document = state_change[\'object\']\n
document.setTitle("
toto
")\n
document.setTitle("
After validate interaction.
")\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
bt5/erp5_workflow_test_data/WorkflowTemplateItem/portal_workflow/testing_interaction_workflow/scripts/afterSetTitle.xml
View file @
8d519385
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
document = sci.object\n
<value>
<string>
document = sci.object\n
document.setDescription(\'Interaction of setTitle executed.\')\n
document.setDescription(\'Interaction of setTitle executed.
setTitle is appeared in after validate script.
\')\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
bt5/erp5_workflow_test_data/WorkflowTemplateItem/portal_workflow/workflow_testing_workflow/transition_delete_action.xml
View file @
8d519385
...
@@ -46,6 +46,12 @@
...
@@ -46,6 +46,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 +81,12 @@
...
@@ -75,4 +81,12 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
</pickle>
<pickle>
<dictionary/>
</pickle>
</record>
</ZopeData>
</ZopeData>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment