Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
52ee84ad
Commit
52ee84ad
authored
May 30, 2013
by
Mame Coumba Sall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify configurator test to include erp5_project integration to configurator
parent
4428a642
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
2 deletions
+120
-2
bt5/erp5_configurator_standard/TestTemplateItem/testStandardConfigurationWorkflow.py
...ard/TestTemplateItem/testStandardConfigurationWorkflow.py
+114
-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
+5
-1
No files found.
bt5/erp5_configurator_standard/TestTemplateItem/testStandardConfigurationWorkflow.py
View file @
52ee84ad
...
@@ -63,6 +63,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -63,6 +63,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
stepCheckSaleTradeCondition
stepCheckSaleTradeCondition
stepCheckPurchaseTradeCondition
stepCheckPurchaseTradeCondition
stepCheckSaleOrderSimulation
stepCheckSaleOrderSimulation
stepCheckTaskSimulation
'''
'''
SECURITY_CONFIGURATION_SEQUENCE
=
"""
SECURITY_CONFIGURATION_SEQUENCE
=
"""
...
@@ -1014,6 +1015,119 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -1014,6 +1015,119 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
destination_administration
)
destination_administration
)
def
stepCheckTaskSimulation
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
"""
After the configuration we need to make sure that Simulation for
Task is working as expected.
"""
portal
=
self
.
getPortal
()
business_configuration
=
sequence
.
get
(
'business_configuration'
)
# Check relation with Business Process
business_process_list
=
\
self
.
getBusinessConfigurationObjectList
(
business_configuration
,
'Business Process'
)
self
.
assertEquals
(
len
(
business_process_list
),
1
)
business_process
=
business_process_list
[
0
]
self
.
validateRules
()
self
.
tic
()
organisation_module
=
portal
.
getDefaultModule
(
portal_type
=
'Organisation'
)
organisation1
=
organisation_module
.
newContent
(
portal_type
=
'Organisation'
,
title
=
'Organization 1'
,
)
organisation2
=
organisation_module
.
newContent
(
portal_type
=
'Organisation'
,
title
=
'Organization 2'
,
)
resource_module
=
portal
.
getDefaultModule
(
'Service'
)
resource
=
resource_module
.
newContent
(
portal_type
=
'Service'
,
title
=
'Resource1'
,
)
project_module
=
portal
.
getDefaultModule
(
'Project'
)
project
=
project_module
.
newContent
(
portal_type
=
'Project'
,
title
=
'Project'
,
)
requirement_document_module
=
portal
.
getDefaultModule
(
'Requirement Document'
)
requirement
=
requirement_document_module
.
newContent
(
portal_type
=
'Requirement Document'
,
title
=
'Requirement Document'
,
)
sub_requirement
=
requirement
.
newContent
(
portal_type
=
'Requirement'
,
title
=
'Requirement'
,
)
task_module
=
self
.
portal
.
getDefaultModule
(
portal_type
=
'Task'
)
task
=
task_module
.
newContent
(
portal_type
=
'Task'
,
title
=
str
(
self
),
description
=
"This is a very simple task. You can do it quickly."
,
specialise
=
business_process
.
getRelativeUrl
())
currency_module
=
self
.
getCurrencyModule
()
if
len
(
currency_module
.
objectValues
(
id
=
'EUR'
))
==
0
:
currency
=
self
.
getCurrencyModule
().
newContent
(
portal_type
=
'Currency'
,
id
=
"EUR"
,
base_unit_quantity
=
0.01
,
)
else
:
currency
=
currency_module
.
objectValues
(
id
=
'EUR'
)[
0
]
task
.
edit
(
source_value
=
organisation1
,
source_section_value
=
organisation1
,
destination_value
=
organisation2
,
destination_section_value
=
organisation2
,
source_project_value
=
project
,
destination_project_value
=
project
,
description
=
'Task Description I'
,
start_date
=
DateTime
()
+
10
,
stop_date
=
DateTime
()
+
20
,)
task
.
edit
(
task_line_resource_value
=
resource
,
task_line_quantity
=
99.99999999
,
task_line_price
=
555.88888888
,
task_line_requirement_value
=
requirement
,
task_line_description
=
'Default Task Line Description'
,
)
task
.
setPriceCurrency
(
currency
.
getRelativeUrl
())
# ConfirmTask
task
.
confirm
()
self
.
tic
()
self
.
assertEquals
(
task
.
getSimulationState
(),
'confirmed'
)
# stepCheckTaskSimulation
causality_list
=
task
.
getCausalityRelatedValueList
(
portal_type
=
'Applied Rule'
)
self
.
assertEquals
(
len
(
causality_list
),
1
)
applied_rule
=
causality_list
[
0
]
self
.
assertEquals
(
applied_rule
.
getPortalType
(),
'Applied Rule'
)
rule
=
applied_rule
.
getSpecialiseValue
()
self
.
assertNotEquals
(
rule
,
None
)
self
.
assertEquals
(
rule
.
getReference
(),
'default_order_rule'
)
self
.
assertEquals
(
applied_rule
.
objectCount
(),
1
)
simulation_movement
=
applied_rule
.
objectValues
()[
0
]
self
.
assertEquals
(
simulation_movement
.
getPortalType
(),
'Simulation Movement'
)
self
.
assertEquals
(
simulation_movement
.
getQuantity
(),
99.999999990000006
)
self
.
assertEquals
(
simulation_movement
.
getResourceValue
(),
resource
)
self
.
assertNotEquals
(
simulation_movement
.
getCausality
(),
None
)
self
.
assertEquals
(
simulation_movement
.
getSourceValue
(),
organisation1
)
self
.
assertEquals
(
simulation_movement
.
getSourceSectionValue
(),
organisation1
)
self
.
assertEquals
(
simulation_movement
.
getDestinationValue
(),
organisation2
)
self
.
assertEquals
(
simulation_movement
.
getDestinationSectionValue
(),
organisation2
)
self
.
assertEquals
(
simulation_movement
.
getDestinationProjectValue
(),
project
)
class
TestConsultingConfiguratorWorkflow
(
StandardConfigurationMixin
):
class
TestConsultingConfiguratorWorkflow
(
StandardConfigurationMixin
):
"""
"""
Test Live Consulting Configuration Workflow
Test Live Consulting Configuration Workflow
...
...
bt5/erp5_configurator_standard/bt/revision
View file @
52ee84ad
666
667
\ No newline at end of file
product/ERP5Configurator/tests/ConfiguratorTestMixin.py
View file @
52ee84ad
...
@@ -55,10 +55,12 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
...
@@ -55,10 +55,12 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
'erp5_knowledge_pad'
,
'erp5_knowledge_pad'
,
'erp5_accounting'
,
'erp5_accounting'
,
'erp5_invoicing'
,
'erp5_invoicing'
,
'erp5_project'
,
'erp5_configurator_standard_solver'
,
'erp5_configurator_standard_solver'
,
'erp5_configurator_standard_trade_template'
,
'erp5_configurator_standard_trade_template'
,
'erp5_configurator_standard_accounting_template'
,
'erp5_configurator_standard_accounting_template'
,
'erp5_configurator_standard_invoicing_template'
,
'erp5_configurator_standard_invoicing_template'
,
'erp5_configurator_standard_project_template'
,
'erp5_trade_knowledge_pad'
,
'erp5_trade_knowledge_pad'
,
'erp5_crm_knowledge_pad'
,
'erp5_crm_knowledge_pad'
,
'erp5_simplified_invoicing'
,
'erp5_simplified_invoicing'
,
...
@@ -79,9 +81,11 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
...
@@ -79,9 +81,11 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
'erp5_configurator_standard_trade_template'
,
'erp5_configurator_standard_trade_template'
,
'erp5_configurator_standard_accounting_template'
,
'erp5_configurator_standard_accounting_template'
,
'erp5_configurator_standard_invoicing_template'
,
'erp5_configurator_standard_invoicing_template'
,
'erp5_configurator_standard_project_template'
,
'erp5_ods_style'
,
'erp5_ods_style'
,
'erp5_odt_style'
,
'erp5_odt_style'
,
'erp5_ooo_import'
)
'erp5_ooo_import'
,
'erp5_project'
)
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
'erp5_core_proxy_field_legacy'
,
return
(
'erp5_core_proxy_field_legacy'
,
...
...
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