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
Mukul
erp5
Commits
4cee501f
Commit
4cee501f
authored
May 31, 2013
by
Mame Coumba Sall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add security test for task and task report in configuration test
parent
52ee84ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletion
+43
-1
bt5/erp5_configurator_standard/TestTemplateItem/testStandardConfigurationWorkflow.py
...ard/TestTemplateItem/testStandardConfigurationWorkflow.py
+2
-0
bt5/erp5_configurator_standard/bt/revision
bt5/erp5_configurator_standard/bt/revision
+1
-1
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
+40
-0
No files found.
bt5/erp5_configurator_standard/TestTemplateItem/testStandardConfigurationWorkflow.py
View file @
4cee501f
...
@@ -120,6 +120,8 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -120,6 +120,8 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
stepViewAccessAddSaleOrder
stepViewAccessAddSaleOrder
stepViewAccessAddSalePackingList
stepViewAccessAddSalePackingList
stepViewAccessPurchaseOrder
stepViewAccessPurchaseOrder
stepViewAccessAddTask
stepViewAccessAddTaskReport
stepPurchasePackingList
stepPurchasePackingList
stepWebSiteModule
stepWebSiteModule
stepPortalContributionsTool
stepPortalContributionsTool
...
...
bt5/erp5_configurator_standard/bt/revision
View file @
4cee501f
66
7
66
8
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
View file @
4cee501f
...
@@ -1789,7 +1789,47 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
...
@@ -1789,7 +1789,47 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
self
.
assertEquals
(
'confirmed'
,
order
.
getSimulationState
())
self
.
assertEquals
(
'confirmed'
,
order
.
getSimulationState
())
self
.
assertUserCanViewDocument
(
username
,
order
)
self
.
assertUserCanViewDocument
(
username
,
order
)
self
.
failIfUserCanModifyDocument
(
username
,
order
)
self
.
failIfUserCanModifyDocument
(
username
,
order
)
def
stepViewAccessAddTask
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
module
=
self
.
portal
.
task_module
for
username
in
self
.
all_username_list
:
self
.
assertUserCanViewDocument
(
username
,
module
)
self
.
assertUserCanAccessDocument
(
username
,
module
)
for
username
in
self
.
sales_and_purchase_username_list
:
self
.
assertUserCanAddDocument
(
username
,
module
)
self
.
_loginAsUser
(
username
)
task
=
module
.
newContent
(
portal_type
=
'Task'
)
self
.
assertUserCanViewDocument
(
username
,
task
)
self
.
failUnlessUserCanPassWorkflowTransition
(
username
,
'plan_action'
,
task
)
self
.
failUnlessUserCanPassWorkflowTransition
(
username
,
'confirm_action'
,
task
)
self
.
failUnlessUserCanPassWorkflowTransition
(
username
,
'cancel_action'
,
task
)
task
.
confirm
()
self
.
assertEquals
(
'confirmed'
,
task
.
getSimulationState
())
self
.
assertUserCanViewDocument
(
username
,
task
)
self
.
failIfUserCanModifyDocument
(
username
,
task
)
def
stepViewAccessAddTaskReport
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
module
=
self
.
portal
.
task_report_module
for
username
in
self
.
all_username_list
:
self
.
assertUserCanViewDocument
(
username
,
module
)
self
.
assertUserCanAccessDocument
(
username
,
module
)
for
username
in
self
.
sales_and_purchase_username_list
:
self
.
assertUserCanAddDocument
(
username
,
module
)
self
.
_loginAsUser
(
username
)
task_report
=
module
.
newContent
(
portal_type
=
'Task Report'
)
self
.
assertUserCanViewDocument
(
username
,
task_report
)
self
.
failUnlessUserCanPassWorkflowTransition
(
username
,
'confirm_action'
,
task_report
)
task_report
.
confirm
()
self
.
assertEquals
(
'confirmed'
,
task_report
.
getSimulationState
())
self
.
assertUserCanViewDocument
(
username
,
task_report
)
self
.
assertUserCanModifyDocument
(
username
,
task_report
)
def
stepPurchasePackingList
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepPurchasePackingList
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
module
=
self
.
portal
.
purchase_packing_list_module
module
=
self
.
portal
.
purchase_packing_list_module
for
username
in
self
.
all_username_list
:
for
username
in
self
.
all_username_list
:
...
...
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