Commit 5dfed131 authored by Gabriel Monnerat's avatar Gabriel Monnerat

- remove one step from UNG Configuration

- update spreadsheet with steps
- clean up test

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45117 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0fa4d67c
No related merge requests found
......@@ -28,7 +28,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/ung_configuration_workflow/68</string>
<string>destination/workflow_module/ung_configuration_workflow/14</string>
</tuple>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="State" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/ung_configuration_workflow/14</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>67</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>State</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Web Site</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Transition" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>after_script_id</string> </key>
<value> <string>BusinessConfiguration_setupUNGWebSite</string> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/ung_configuration_workflow/67</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>guard_expression</string> </key>
<value> <string>python: True</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>68</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Transition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Configure Web Site</string> </value>
</item>
<item>
<key> <string>transition_form_id</string> </key>
<value> <string>BusinessConfiguration_setupUNGWebSiteForm</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -52,20 +52,12 @@
<key> <string>_body</string> </key>
<value> <string>Base_translateString = context.Base_translateString\n
\n
return [\n
dict(id=\'fr\',\n
name=Base_translateString(\'French\'),\n
bt5=\'erp5_l10n_fr\',),\n
dict(id=\'pl\',\n
name=Base_translateString(\'Polish\'),\n
bt5=\'erp5_l10n_pl_PL\',),\n
dict(id=\'pt-BR\',\n
name=Base_translateString(\'Portuguese / Brazil\'),\n
bt5=\'erp5_l10n_pt-BR\',),\n
dict(id=\'ko\',\n
name=Base_translateString(\'Korean\'),\n
bt5=\'erp5_l10n_ko\',),\n
]\n
return {\n
\'fr\':dict(name=Base_translateString(\'French\'),bt5=\'erp5_l10n_fr\'),\n
\'pl\':dict(name=Base_translateString(\'Polish\'),bt5=\'erp5_l10n_pl_PL\'),\n
\'pt-BR\':dict(name=Base_translateString(\'Portuguese / Brazil\'),bt5=\'erp5_l10n_pt-BR\'),\n
\'ko\':dict(name=Base_translateString(\'Korean\'),bt5=\'erp5_l10n_ko\'),\n
}\n
</string> </value>
</item>
<item>
......
......@@ -56,7 +56,9 @@ portal = context.getPortalObject()\n
configuration_save_url = kw.get(\'configuration_save_url\', None)\n
preferred_event_sender_email = kw.get(\'preferred_event_sender_email\', \'\')\n
preferred_date_order = kw.get(\'preferred_date_order\', None)\n
preferred_language_list = kw.get(\'lang\', [])\n
default_available_language = kw.get(\'default_available_language\', \'en\')\n
\n
context.setGlobalConfigurationAttr(default_available_language=default_available_language)\n
\n
configuration_save = context.restrictedTraverse(configuration_save_url)\n
business_configuration = configuration_save.getParent()\n
......@@ -112,10 +114,12 @@ configuration_save.addConfigurationItem(\'System Preference Configurator Item\',
title="Default Configurator System Site Preference",\n
**system_prefs)\n
\n
# preferred_languages\n
for bt5_id in preferred_language_list:\n
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n
bt5_id=bt5_id)\n
if default_available_language and default_available_language != "en":\n
language_dict = context.BusinessConfiguration_getUNGAvailableL10NBusinessTemplateList()\n
bt5 = language_dict.get(default_available_language)\n
if bt5:\n
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n
bt5_id=bt5.get("bt5"))\n
]]></string> </value>
......
......@@ -95,7 +95,7 @@
<list>
<string>your_preferred_event_sender_email</string>
<string>your_preferred_date_order</string>
<string>your_lang</string>
<string>your_default_available_language</string>
</list>
</value>
</item>
......
......@@ -272,7 +272,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(x[\'name\'], x[\'id\']) for x in context.BusinessConfiguration_getUNGAvailableL10NBusinessTemplateList()] + [(context.Base_translateString(\'English\'), "en"),]</string> </value>
<value> <string>python: [(v[\'name\'], k) for k,v in context.BusinessConfiguration_getUNGAvailableL10NBusinessTemplateList().items()] + [(context.Base_translateString(\'English\'), "en"),]</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>default_available_language = kw.get("default_available_language", "en")\n
context.setGlobalConfigurationAttr(default_available_language=default_available_language)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessConfiguration_setupUNGWebSite</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>Default</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>Default</string> </key>
<value>
<list>
<string>your_default_available_language</string>
</list>
</value>
</item>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessConfiguration_setupUNGWebSiteForm</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_empty</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Web Site</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -87,10 +87,6 @@ class TestUNGConfiguratorWorkflowMixin(ERP5TypeTestCase):
stepSetupPreferenceConfiguration%(country)s
stepConfiguratorNext
stepTic
stepCheckConfigureWebSiteForm
stepSetupWebSiteConfiguration
stepConfiguratorNext
stepTic
stepCheckConfigureInstallationForm
stepSetupInstallConfiguration
stepConfiguratorNext
......@@ -115,13 +111,11 @@ class TestUNGConfiguratorWorkflowMixin(ERP5TypeTestCase):
def afterSetUp(self):
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
['http://www.erp5.org/dists/snapshot/bt5/'])
if not self.portal.portal_catalog.getResultValue(portal_types="System Preference",
title="global_system_preference"):
preference = self.portal.portal_preferences.newContent(portal_type="System Preference")
preference.setTitle("global_system_preference")
preference.setPreferredOoodocServerAddress("localhost")
preference.setPreferredOoodocServerPortNumber(8011)
preference.enable()
preference = self.portal.portal_preferences.newContent(portal_type="System Preference")
preference.setTitle("global_system_preference")
preference.setPreferredOoodocServerAddress("localhost")
preference.setPreferredOoodocServerPortNumber(8011)
preference.enable()
def stepCreateBusinessConfiguration(self, sequence=None, sequence_list=None, **kw):
""" Create one Business Configuration """
......@@ -240,20 +234,20 @@ class TestUNGConfiguratorWorkflowMixin(ERP5TypeTestCase):
self.assertEquals('show', response_dict['command'])
self.assertEquals('Previous', response_dict['previous'])
self.assertEquals('Configure ERP5 Preferences', response_dict['next'])
self.assertCurrentStep('ERP5 preferences', response_dict)
self.assertCurrentStep('UNG Preferences', response_dict)
def stepSetupPreferenceConfigurationBrazil(self, sequence=None, sequence_list=None, **kw):
""" Setup the Brazil preference configuration """
next_dict = dict(field_your_preferred_date_order='dmy',
field_your_lang='erp5_l10n_fr',
field_your_default_available_language='pt-BR',
field_your_preferred_event_sender_email="test@test.com",
default_field_your_lang=1)
sequence.edit(next_dict=next_dict)
def stepSetupPreferenceConfigurationFrance(self, sequence=None, sequence_list=None, **kw):
""" Setup the Brazil preference configuration """
""" Setup the France preference configuration """
next_dict = dict(field_your_preferred_date_order='ymd',
field_your_lang='erp5_l10n_pt-BR',
field_your_default_available_language='fr',
field_your_preferred_event_sender_email="test@test.com",
default_field_your_lang=1)
sequence.edit(next_dict=next_dict)
......@@ -263,7 +257,7 @@ class TestUNGConfiguratorWorkflowMixin(ERP5TypeTestCase):
response_dict = sequence.get("response_dict")
self.assertEquals('show', response_dict['command'])
self.assertEquals('Previous', response_dict['previous'])
self.assertEquals('Configure Web Site', response_dict['next'])
self.assertEquals('Install', response_dict['next'])
def stepCheckMultipleUserAccountThreeBrazil(self, sequence=None, sequence_list=None, **kw):
""" Check if the users were created correctly """
......@@ -291,8 +285,6 @@ class TestUNGConfiguratorWorkflowMixin(ERP5TypeTestCase):
""" Check the installation form """
response_dict = sequence.get("response_dict")
self.assertEquals('show', response_dict['command'])
self.assertEquals('Previous', response_dict['previous'])
self.assertEquals('Install', response_dict['next'])
def stepSetupInstallConfiguration(self, sequence=None, sequence_list=None, **kw):
""" Install the Configuration """
......@@ -311,14 +303,13 @@ class TestUNGConfiguratorWorkflowMixin(ERP5TypeTestCase):
def stepCheckSystemPreferenceAfterInstallation(self, sequence=None, sequence_list=None, **kw):
""" Check System Preference"""
import ipdb;ipdb.set_trace()
system_preference = self.portal.portal_catalog.getResultValue(portal_type="System Preference")
self.assertEquals(system_preference.getPreferredOoodocServerPortNumber(), 8011)
self.assertEquals(system_preference.getPreferredOoodocServerAddress(), "localhost")
def stepCheckUserPreferenceAfterInstallation(self, sequence=None, sequence_list=None, **kw):
""" Check System Preference"""
portal_catalog = portal.portal_catalog
portal_catalog = self.portal.portal_catalog
preference = portal_catalog.getResultValue(portal_type="Preference",
reference='Preference for Person Assignor')
self.assertEquals(preference.getPreferenceState(), "enabled")
......
35
\ No newline at end of file
36
\ 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