Commit ab263ab3 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Add more steps and asserts

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44755 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f7bb4431
...@@ -52,7 +52,8 @@ ...@@ -52,7 +52,8 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n <value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n \n
bt5_installation_list = (\'erp5_simulation\',\n bt5_installation_list = (\'erp5_ingestion_mysql_innodb_catalog\',\n
\'erp5_simulation\',\n
\'erp5_dhtml_style\',\n \'erp5_dhtml_style\',\n
\'erp5_jquery\',\n \'erp5_jquery\',\n
\'erp5_jquery_ui\',\n \'erp5_jquery_ui\',\n
......
...@@ -33,7 +33,8 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase): ...@@ -33,7 +33,8 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase):
Test Live UNG Configuration Workflow. Test Live UNG Configuration Workflow.
""" """
standard_bt5_list = ('erp5_simulation', standard_bt5_list = ('erp5_ingestion_mysql_innodb_catalog',
'erp5_simulation',
'erp5_dhtml_style', 'erp5_dhtml_style',
'erp5_jquery', 'erp5_jquery',
'erp5_jquery_ui', 'erp5_jquery_ui',
...@@ -76,10 +77,11 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase): ...@@ -76,10 +77,11 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase):
stepTic stepTic
stepCheckConfigureUserAccountNumberForm stepCheckConfigureUserAccountNumberForm
stepCheckOrganisationConfiguratorItem stepCheckOrganisationConfiguratorItem
stepSetupUserAccounNumberThree stepSetupUserAccountNumberThree
stepConfiguratorNext stepConfiguratorNext
stepTic stepTic
stepCheckConfigureMultipleUserAccountForm stepCheckConfigureMultipleUserAccountForm
stepCheckUserAccountNumberThree
stepSetupMultipleUserAccountThree stepSetupMultipleUserAccountThree
stepConfiguratorNext stepConfiguratorNext
stepTic stepTic
...@@ -89,7 +91,16 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase): ...@@ -89,7 +91,16 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase):
stepTic stepTic
stepCheckConfigureWebSiteForm stepCheckConfigureWebSiteForm
stepSetupWebSiteConfiguration stepSetupWebSiteConfiguration
stepConfiguratorNext
stepTic
stepCheckConfigureInstallationForm
stepSetupInstallConfiguration
stepConfiguratorNext
stepTic
stepCheckInstallConfiguration
stepStartConfigurationInstallation
stepTic stepTic
stepCheckUNGWebSiteAfterInstallation
""" """
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
...@@ -193,7 +204,7 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase): ...@@ -193,7 +204,7 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase):
self.assertEquals(organisation_config_item.getDefaultEmailText(), self.assertEquals(organisation_config_item.getDefaultEmailText(),
'me@example.com') 'me@example.com')
def stepSetupUserAccounNumberThree(self, sequence=None, sequence_list=None, **kw): def stepSetupUserAccountNumberThree(self, sequence=None, sequence_list=None, **kw):
""" Create one more user account """ """ Create one more user account """
next_dict = dict(field_your_user_number="3") next_dict = dict(field_your_user_number="3")
sequence.edit(next_dict=next_dict) sequence.edit(next_dict=next_dict)
...@@ -207,6 +218,12 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase): ...@@ -207,6 +218,12 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase):
self.assertEquals('Configure user accounts', response_dict['next']) self.assertEquals('Configure user accounts', response_dict['next'])
self.assertCurrentStep('Configuration of users', response_dict) self.assertCurrentStep('Configuration of users', response_dict)
def stepCheckUserAccountNumberThree(self, sequence=None, sequence_list=None, **kw):
""" """
business_configuration = sequence.get("business_configuration")
import ipdb;ipdb.set_trace()
organisation_config_save = business_configuration['3']
def stepSetupMultipleUserAccountThree(self, sequence=None, sequence_list=None, **kw): def stepSetupMultipleUserAccountThree(self, sequence=None, sequence_list=None, **kw):
""" Create multiple user account """ """ Create multiple user account """
user_list = [ user_list = [
...@@ -216,7 +233,8 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase): ...@@ -216,7 +233,8 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase):
field_your_reference="person_creator", field_your_reference="person_creator",
field_your_password='person_creator', field_your_password='person_creator',
field_your_password_confirm='person_creator', field_your_password_confirm='person_creator',
field_your_default_email_text='test@test.com', field_your_default_email_
text='test@test.com',
field_your_default_telephone_text='', field_your_default_telephone_text='',
), dict( ), dict(
field_your_first_name='Person', field_your_first_name='Person',
...@@ -288,6 +306,28 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase): ...@@ -288,6 +306,28 @@ class TestUNGConfiguratorWorkflow(ERP5TypeTestCase):
self.assertEquals('Previous', response_dict['previous']) self.assertEquals('Previous', response_dict['previous'])
self.assertEquals('Install', response_dict['next']) self.assertEquals('Install', response_dict['next'])
def stepSetupInstallConfiguration(self, sequence=None, sequence_list=None, **kw):
""" Install the Configuration """
sequence.edit(next_dict={})
def stepCheckInstallConfiguration(self, sequence=None, sequence_list=None, **kw):
""" Check the installation of the configuration """
response_dict = sequence.get("response_dict")
self.assertEquals('install', response_dict['command'])
def stepStartConfigurationInstallation(self, sequence=None, sequence_list=None, **kw):
""" Starts the installation """
business_configuration = sequence.get("business_configuration")
self.portal.portal_configurator.startInstallation(
business_configuration, REQUEST=self.portal.REQUEST)
def stepCheckUNGWebSiteAfterInstallation(self, sequence=None, sequence_list=None, **kw):
""" Check if UNG Web Site is published and your language"""
self.assertEquals(self.portal.web_site_module.ung.getValidationState(),
"published")
self.assertEquals(self.portal.web_site_module.ung.getDefaultAvailableLanguage(),
"pt-BR")
def test_standard_workflow_brazil(self): def test_standard_workflow_brazil(self):
""" Test the standard workflow with brazilian configuration """ """ Test the standard workflow with brazilian configuration """
sequence_list = SequenceList() sequence_list = SequenceList()
......
19 20
\ No newline at end of file \ No newline at end of file
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