Commit 07563682 authored by Rafael Monnerat's avatar Rafael Monnerat

Initial upload of bt5.

This Business Template contains a Zelenium test for configurator.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42102 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eaad9306
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>configurator_standard_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>51.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_configurator_standard_ui_test</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>"""\n
Return the configuration used during test.\n
\n
There is a difference between configuration and upgrader for\n
this values. This informations should be unified later but \n
for now it is better keep the difference here.\n
"""\n
from DateTime import DateTime\n
\n
configuration_dict = {\n
\'configuration_key\': \'a\', # XXX: fill as appropriate for test env\n
\'customer_organisation_title\': \'Nexedi SA\',\n
\'customer_organisation_email\': \'webproject-report@erp5.org\',\n
\'customer_organisation_telephone\': \'+123 234 567 891\',\n
\'customer_organisation_street_address\': \n
\'270 bd Clémenceau, 59700 Marcq-en-Baroeul\',\n
\'customer_organisation_city\': \'Lille\',\n
\'customer_organisation_zip_code\': \'59700\',\n
\'customer_organisation_region\': \'France\',\n
\'customer_organisation_region_category\': \'europe/western_europe/france\',\n
\'customer_company_employees_number\': 1, # employees\n
\'customer_user1_first_name\': \'Ivan\',\n
\'customer_user1_last_name\': \'Petrov\',\n
\'customer_user1_reference\': \'PERSON_USER_REFERENCE\',\n
\'customer_user1_used_reference\' : \'PERSON_RESERVED_REFERENCE\',\n
\'customer_user1_password\' : \'secret\',\n
\'customer_user1_function\': \'Company/Manager\',\n
\'customer_user1_email\': \'webproject-report@erp5.org\',\n
\'customer_organisation_currency\' : \'Euro\',\n
\'customer_datetime_format\': \'Day / Month / Year\',\n
\n
# XXX FIXME The follow configuration are not related to configuration itself\n
# but related to system or inicial setup. Split this script later in order\n
# To have a clean definition of what is the User Configuration Values only.\n
"functional_test_username" : "zope", \n
"functional_test_password" : "zope",\n
\n
"business_configuration_id": "STANDARD_CONFIGURATOR_TEST",\n
\'bt_repository_list\':[\'http://www.erp5.org/dists/snapshot/bt5/\'],\n
\n
# Release management\n
\'erp5_instance_version\': \'5.4.1\',\n
\n
\'now\': DateTime(),\n
# server side group\n
\'tiolive_group_relative_url\': \'nexedi/tio\',\n
# More configurations\n
"oood_hostname": "localhost", \n
"oood_port": 8008, \n
\n
# Valid Assignment Date\n
"assignment_start_date_year": 2010,\n
"assignment_start_date_month": 07,\n
"assignment_start_date_day":13,\n
"assignment_stop_date_year": 2999,\n
"assignment_stop_date_month": 07,\n
"assignment_stop_date_day":13,\n
}\n
\n
is_upgrader = context.portal_templates.getInstalledBusinessTemplate("erp5_upgrader") is not None\n
\n
if not is_upgrader:\n
if "tiolive_server" in context.erp5_sql_connection.connection_string or \\\n
"test_client" in context.erp5_sql_connection.connection_string:\n
configuration_dict[\'oood_port\'] = 48009\n
configuration_dict[\'tiolive_virtual_database_string\'] = \'tiolive_virtual@127.0.0.1:43307 root\'\n
configuration_dict[\'witch_server_url\'] = \'http://localhost:48090/erp5/\'\n
\n
return configuration_dict\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_getConfigurationTestDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>"""\n
Return the configuration for use into\n
preferences.\n
"""\n
return context.ExpressZuite_getExpressConfigurationInfo()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_getConversionServerDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>portal = context.getPortalObject()\n
\n
# set url, user/password\n
configuration_info = context.Zuite_getConfigurationTestDict()\n
\n
# setup preferences\n
preference_id = \'default_initial_configurator_system_preference\'\n
\n
default_site_preference = getattr(portal.portal_preferences, preference_id, None)\n
\n
if default_site_preference is None:\n
default_site_preference = portal.portal_preferences.newContent(\n
id = \'default_initial_configurator_system_preference\',\n
portal_type=\'System Preference\', priority = 1)\n
\n
default_site_preference.setPreferredHtmlStyleUnsavedFormWarning(False)\n
default_site_preference.setPreferredHtmlStyleDevelopperMode(None)\n
default_site_preference.setPreferredHtmlStyleAccessTab(\'1\')\n
\n
default_site_preference.setPreferredOoodocServerAddress(configuration_info.get("oood_hostname",\'localhost\'))\n
default_site_preference.setPreferredOoodocServerPortNumber(configuration_info.get("oood_port",8008))\n
\n
if default_site_preference.getPreferenceState() != \'global\':\n
default_site_preference.enable()\n
\n
# update repository info of Configurator site\n
portal.portal_templates.updateRepositoryBusinessTemplateList(\n
repository_list = configuration_info[\'bt_repository_list\'])\n
\n
# (Re)Create the Business Configurator\n
bc_id = configuration_info[\'business_configuration_id\']\n
business_configuration = getattr(context.business_configuration_module, bc_id, None)\n
if business_configuration is not None:\n
context.business_configuration_module.manage_delObjects([bc_id])\n
\n
business_configuration = context.business_configuration_module.newContent(\n
portal_type="Business Configuration",\n
id=bc_id, \n
title=bc_id,\n
reference=configuration_info[\'configuration_key\'])\n
\n
business_configuration.setResource("workflow_module/erp5_standard_workflow")\n
\n
# (Re)Create the Person with already used login.\n
kw = dict(portal_type="Person",\n
reference=configuration_info[\'customer_user1_used_reference\'])\n
person = context.portal_catalog.getResultValue(**kw)\n
if person is None:\n
context.person_module.newContent(**kw)\n
\n
kw[\'reference\'] = configuration_info[\'customer_user1_reference\']\n
person = context.portal_catalog.getResultValue(**kw)\n
if person is not None:\n
context.person_module.manage_delObjects([person.getId()])\n
\n
portal.portal_caches.clearAllCache()\n
return "### Init Ok ###"\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_setUpConfigurationTest</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
Copyright 2010, Nexedi SA
\ No newline at end of file
erp5_crm
erp5_configurator_standard
\ No newline at end of file
This contains zelenium tests for express instances. That includes:
* tests for configurator
* tests for basic configuration expected
\ No newline at end of file
portal_tests/configurator_standard_zuite
portal_tests/configurator_standard_zuite/**
\ No newline at end of file
erp5_configurator_standard_ui_test
\ No newline at end of file
erp5_configurator_standard_ui_test
\ 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