Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
056285ae
Commit
056285ae
authored
Jun 17, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename test and do rough draft implementation
parent
045967a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
172 additions
and
2 deletions
+172
-2
master/bt5/erp5_configurator_vifib/TestTemplateItem/testVifibConfigurationWorkflow.py
..._vifib/TestTemplateItem/testVifibConfigurationWorkflow.py
+170
-0
master/bt5/erp5_configurator_vifib/bt/revision
master/bt5/erp5_configurator_vifib/bt/revision
+1
-1
master/bt5/erp5_configurator_vifib/bt/template_test_id_list
master/bt5/erp5_configurator_vifib/bt/template_test_id_list
+1
-1
No files found.
master/bt5/erp5_configurator_vifib/TestTemplateItem/test
MaxmaDemo
ConfigurationWorkflow.py
→
master/bt5/erp5_configurator_vifib/TestTemplateItem/test
Vifib
ConfigurationWorkflow.py
View file @
056285ae
...
...
@@ -29,42 +29,61 @@ from Products.ERP5Configurator.tests.ConfiguratorTestMixin import \
TestLiveConfiguratorWorkflowMixin
from
Products.ERP5Type.tests.Sequence
import
SequenceList
class
Test
MaxmaDemo
ConfiguratorWorkflow
(
TestLiveConfiguratorWorkflowMixin
):
class
Test
Vifib
ConfiguratorWorkflow
(
TestLiveConfiguratorWorkflowMixin
):
"""
Configurator Mixin Class
"""
# The list of standard business templates that the configurator should force
# to install
user_reference
=
"demo"
standard_bt5_list
=
(
'erp5_simulation'
,
'erp5_dhtml_style'
,
'erp5_jquery'
,
'erp5_jquery_ui'
,
'erp5_xhtml_jquery_style'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion'
,
'erp5_web'
,
'erp5_dms'
,
'erp5_crm'
,
'erp5_pdm'
,
'erp5_trade'
,
'erp5_knowledge_pad'
,
'erp5_accounting'
,
'erp5_tax_resource'
,
'erp5_discount_resource'
,
'erp5_invoicing'
,
'erp5_configurator_standard_categories'
,
'erp5_trade_knowledge_pad'
,
'erp5_crm_knowledge_pad'
,
'erp5_simulation_test'
,
'erp5_simplified_invoicing'
,
'erp5_ods_style'
,
'erp5_odt_style'
,
'erp5_ooo_import'
,
'erp5_accounting_l10n_fr'
,
'erp5_l10n_fr'
,
'erp5_l10n_pt-BR'
,
'erp5_demo_maxma_rule'
)
standard_bt5_list
=
(
'erp5_simulation'
,
'erp5_administration'
,
'erp5_pdm'
,
'erp5_trade'
,
'erp5_simulation_test'
,
'erp5_item'
,
'erp5_open_trade'
,
'erp5_forge'
,
'erp5_ingestion_mysql_innodb_catalog'
,
'erp5_ingestion'
,
'erp5_crm'
,
'erp5_jquery'
,
'erp5_jquery_ui'
,
'erp5_knowledge_pad'
,
'erp5_web'
,
'erp5_dms'
,
'erp5_l10n_fr'
,
'erp5_content_translation'
,
'erp5_software_pdm'
,
'erp5_computer_immobilisation'
,
'erp5_accounting'
,
'erp5_accounting_l10n_fr'
,
'erp5_tax_resource'
,
'erp5_discount_resource'
,
'erp5_invoicing'
,
'erp5_ods_style'
,
'erp5_odt_style'
,
'erp5_ooo_import'
,
'erp5_simplified_invoicing'
,
'erp5_legacy_tax_system'
,
'erp5_commerce'
,
'erp5_project'
,
'erp5_credential'
,
'erp5_km'
,
'erp5_web_download_theme'
,
'vifib_mysql_innodb_catalog'
,
'vifib_core'
,
'vifib_base'
,
'vifib_slap'
,
'vifib_crm'
,
'vifib_forge_release'
,
'vifib_software_pdm'
,
'vifib_web'
,
'vifib_open_trade'
,
'vifib_l10n_fr'
,
'vifib_datas'
,
'vifib_erp5'
)
def
getBusinessTemplateList
(
self
):
return
(
'erp5_core_proxy_field_legacy'
,
...
...
@@ -72,7 +91,7 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
'erp5_base'
,
'erp5_workflow'
,
'erp5_configurator'
,
'erp5_configurator_
maxma_demo
'
,)
'erp5_configurator_
vifib
'
,)
def
stepCreateBusinessConfiguration
(
self
,
sequence
=
None
,
\
sequence_list
=
None
,
**
kw
):
...
...
@@ -80,7 +99,7 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
module
=
self
.
portal
.
business_configuration_module
business_configuration
=
module
.
newContent
(
portal_type
=
"Business Configuration"
,
title
=
'Test Configurator
Maxma Demo
Workflow'
)
title
=
'Test Configurator
Vifib
Workflow'
)
next_dict
=
{}
sequence
.
edit
(
business_configuration
=
business_configuration
,
next_dict
=
next_dict
)
...
...
@@ -94,44 +113,13 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
self
.
assertEquals
(
'show'
,
response_dict
[
'command'
])
self
.
assertEquals
(
'Install'
,
response_dict
[
'next'
])
def
stepSet
MaxmaDemo
Workflow
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
def
stepSet
Vifib
Workflow
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
""" Set Consulting Workflow into Business Configuration """
business_configuration
=
sequence
.
get
(
"business_configuration"
)
self
.
setBusinessConfigurationWorkflow
(
business_configuration
,
"workflow_module/
maxma_demo
_configuration_workflow"
)
"workflow_module/
vifib
_configuration_workflow"
)
def
stepViewCreatedPersons
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
self
.
login
(
user_name
=
'test_configurator_user'
)
person_list
=
self
.
portal
.
person_module
.
searchFolder
()
self
.
assertNotEquals
(
0
,
len
(
person_list
))
for
entity
in
person_list
:
for
username
in
self
.
all_username_list
:
self
.
failUnlessUserCanAccessDocument
(
username
,
entity
)
self
.
failUnlessUserCanViewDocument
(
username
,
entity
)
def
stepViewCreatedOrganisations
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
self
.
login
(
user_name
=
'test_configurator_user'
)
organisation_list
=
self
.
portal
.
organisation_module
.
searchFolder
()
self
.
assertNotEquals
(
0
,
len
(
organisation_list
))
for
entity
in
organisation_list
:
for
username
in
self
.
all_username_list
:
self
.
failUnlessUserCanAccessDocument
(
username
,
entity
)
self
.
failUnlessUserCanViewDocument
(
username
,
entity
)
def
stepViewCreatedAssignemnts
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
self
.
login
(
user_name
=
'test_configurator_user'
)
person_list
=
self
.
portal_person_module
.
searchFolder
()
self
.
assertNotEquals
(
0
,
len
(
person_list
))
for
person
in
person_list
:
for
assignment
in
person
.
contentValues
(
portal_type
=
'Assignment'
):
for
username
in
self
.
all_username_list
:
self
.
failUnlessUserCanAccessDocument
(
username
,
assignment
)
self
.
failUnlessUserCanViewDocument
(
username
,
assignment
)
def
stepCheckMaxmaDemoSampleObjectList
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
""" Check if objects are placed into the appropriate state """
...
...
@@ -143,22 +131,11 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
gadget
.
getValidationState
()))
gadget
.
Base_checkConsistency
()
# Check if demo user is working.
user
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"Person"
,
reference
=
self
.
user_reference
)
self
.
assertNotEquals
(
user
.
Person_getAvailableAssignmentValueList
(),
[])
self
.
assertEquals
(
user
.
getTitle
(),
"Jack Vale"
)
self
.
assertEquals
(
user
.
getValidationState
(),
"validated"
)
self
.
assertEquals
(
user
.
getSubordination
(),
'organisation_module/myorganisation'
)
self
.
assertEquals
(
user
.
getSubordinationTitle
(),
"Maxma Co"
)
### STEPS
DEFAULT_SEQUENCE_LIST
=
"""
stepCreateBusinessConfiguration
stepTic
stepSet
MaxmaDemo
Workflow
stepSet
Vifib
Workflow
stepTic
stepConfiguratorNext
stepTic
...
...
@@ -171,61 +148,9 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
stepStartConfigurationInstallation
stepTic
stepCheckInstanceIsConfigured%(country)s
stepCheckMaxmaDemoSampleObjectList
stepTic
stepViewAddGadget
stepViewEventModule
stepAddEvent
stepSentEventWorkflow
stepViewAccountModule
stepAddAccountModule
stepViewAccount
stepCopyPasteAccount
stepViewEntityModules
stepAddEntityModules
stepCopyAndPastePerson
stepCopyAndPasteOrganisation
stepEntityWorkflow
stepViewCreatedPersons
stepViewCreatedOrganisations
stepViewCreatedAssignemnts
stepAddAccoutingPeriod
stepValidatedAccountingPeriods
stepViewBankAccount
stepViewCreditCard
stepValidateAndModifyBankAccount
stepValidateAndModifyCreditCard
stepAddPaymentNodeInPerson
stepAddPaymentNodeInOrganisation
stepCopyAndPasteBankAccountInPerson
stepCopyAndPasteBankAccountInOrganisation
stepViewAccountingTransactionModule
stepAddAccountingTransactionModule
stepCopyAndPasteAccountingTransactions
stepTic
stepAccountingTransaction
stepTic
stepSaleInvoiceTransaction
stepTic
stepPurchaseInvoiceTransaction
stepTic
stepPaymentTransaction
stepTic
stepBalanceTransaction
stepTic
stepAccountingTransaction_getCausalityGroupedAccountingTransactionList
stepAddAssignments
stepAssignmentTI
stepEditAssignments
stepViewAcessAddPurchaseTradeCondition
stepViewAccessAddSaleTradeCondition
stepViewAccessAddSaleOrder
stepViewAccessAddSalePackingList
stepViewAccessPurchaseOrder
stepPurchasePackingList
"""
def
test_
maxma_demo
_workflow
(
self
):
def
test_
vifib
_workflow
(
self
):
""" Test the consulting workflow configuration"""
self
.
all_username_list
=
[
"demo"
]
self
.
accountant_username_list
=
self
.
all_username_list
...
...
@@ -241,5 +166,5 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
import
unittest
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
Test
MaxmaDemo
ConfiguratorWorkflow
))
suite
.
addTest
(
unittest
.
makeSuite
(
Test
Vifib
ConfiguratorWorkflow
))
return
suite
master/bt5/erp5_configurator_vifib/bt/revision
View file @
056285ae
8
\ No newline at end of file
9
\ No newline at end of file
master/bt5/erp5_configurator_vifib/bt/template_test_id_list
View file @
056285ae
testMaxmaDemoConfigurationWorkflow
\ No newline at end of file
testVifibConfigurationWorkflow
\ No newline at end of file
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