Commit 8f02ca5e authored by Rafael Monnerat's avatar Rafael Monnerat

Include fixes, more tests, better svg support ...

This merge of "rafael" branch includes several commits for:

  - Fixes for Functional Tests
  - Use Remote URL for Tutorial Related tests (see testFunctionalConfigurator)
  - Fixes for Consulting Configurator Workflow tests
  - Several tests for SVG Conversion and better SVG support
parents 09cb059a 86e8bba5
......@@ -58,6 +58,14 @@ context.setGlobalConfigurationAttr(\n
configuration_save.setIntIndex(1000)\n
configuration_save.addConfigurationItem("Portal Type Roles Spreadsheet Configurator Item",\n
configuration_spreadsheet_file=portal_type_roles_spreadsheet)\n
\n
# Define standard module security. also.\n
configuration_save.addConfigurationItem("Permission Configurator Item",\n
filename="standard_module_permission_access.ods")\n
\n
# Create ERP5Site_getSecurityCategoryMapping\n
configuration_save.addConfigurationItem("Security Category Mapping Configurator Item")\n
</string> </value>
</item>
<item>
......
636
\ No newline at end of file
637
\ No newline at end of file
<?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_consulting_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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Standard Consulting Configuration</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Standard Consulting Configuration</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/init_test_environment" />\n
\n
<tr>\n
<td>store</td>\n
<td>${base_url}/portal_configurator</td>\n
<td>configurator_base_url</td>\n
</tr>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpConfigurationTest?workflow_path=workflow_module/erp5_consulting_workflow</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<!-- Set longer timeout as it takes time at configurator side to prepare everything needed. -->\n
<tr>\n
<td>setTimeout</td>\n
<td>120000000</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities" />\n
<!-- Restore defaults -->\n
<tr>\n
<td>setTimeout</td>\n
<td>30000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>pause</td>\n
<td>4000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${configurator_base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>ERP5 Configuration</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Welcome to Configurator</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>This tool will help you configure your fresh ERP5</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Language</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>ERP5 Configuration</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td tal:content="python: \'//button[@value=\\\'business_configuration_module/%s\\\']\' %\n
here.Zuite_getConfigurationTestDict()[\'business_configuration_id\']"></td>\n
<td></td>\n
</tr>\n
\n
<!-- Categories -->\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_page1_check"> Page 1 Checks</span>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_configuration_spreadsheet"]</td>\n
<td tal:content="python: here.Zuite_getConfiguratorFilenameLocation(\'consulting_configurator_sample_categories.ods\')"></td>\\n\n
</tr>\\n\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
\n
<!-- Roles -->\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_page2_check"> Page 2 Checks</span>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_portal_type_roles_spreadsheet"]</td>\n
<td tal:content="python: here.Zuite_getConfiguratorFilenameLocation(\'consulting_configurator_sample_roles_configuration_sheet.ods\')"></td>\\n\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
\n
<!-- First Page (Organisation) -->\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page1_check"> Page 1 Checks</span>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_title"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_email_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_email\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_telephone_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_telephone\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_your_default_address_street_address"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_street_address\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_address_zip_code"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_zip_code\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_default_address_region"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_region\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_group"]</td>\n
<td>My company</td>\n
</tr>\n
<!-- Next page to check validation works -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Input is required but no input given.</td>\n
<td></td>\n
</tr>\n
\n
\n
<!-- Check that what was previously entered is returned -->\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_title"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_email_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_email\']"></td>\n
\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_telephone_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_telephone\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//textarea[@name="field_your_default_address_street_address"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_street_address\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_address_zip_code"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_zip_code\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//select[@name="field_your_default_address_region"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_region_category\']"></td>\n
</tr>\n
<!-- Fill in rest details-->\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_address_city"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_city\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_group"]</td>\n
<td>My company</td>\n
</tr>\n
<!-- Go Second page (User Accounts)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page2_check"> Frame Checks</span>\n
\n
<!-- Go to Previous page (Organisation) and check that it\'s all saved-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="previous:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page1_check"> Page 1 Checks</span>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_title"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_email_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_email\']"></td>\n
\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_telephone_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_telephone\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//textarea[@name="field_your_default_address_street_address"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_street_address\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_address_zip_code"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_zip_code\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//select[@name="field_your_default_address_region"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_region_category\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_address_city"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_city\']"></td>\n
</tr>\n
\n
\n
<!-- Go to Next page (User Accounts)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page2_check"> Page 2 Checks</span>\n
\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_company_employees_number"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_company_employees_number\']"></td>\n
</tr>\n
\n
<!-- Go to Next page (User configurations)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page3_check"> Page 3 Checks</span>\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_first_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_first_name\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_last_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_last_name\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_reference"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_used_reference\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_password"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_password\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_password_confirm"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_password\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_function"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_function\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_email_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_email\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
\n
<!-- Check that it\'s impossible to use an user id which\n
exists already at server (witch) side)-->\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>User login is either already used or contains invalid characters</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Please try another one</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_reference"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_reference\']"></td>\n
</tr>\n
\n
\n
<!-- Go to Next page (Accounting)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page4_check"> Page 4 Checks</span>\n
\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_start_date_year"]</td>\n
<td tal:content="python:\n
modules[\'DateTime\'].DateTime(modules[\'DateTime\'].DateTime().year(), 1, 1).strftime(\'%Y\')"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_start_date_month"]</td>\n
<td>01</td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_start_date_day"]</td>\n
<td>01</td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_stop_date_year"]</td>\n
<td tal:content="python:\n
modules[\'DateTime\'].DateTime(modules[\'DateTime\'].DateTime().year(), 1, 1).strftime(\'%Y\')"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_stop_date_month"]</td>\n
<td>12</td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_stop_date_day"]</td>\n
<td>31</td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_period_title"]</td>\n
<td tal:content="python:\n
modules[\'DateTime\'].DateTime(modules[\'DateTime\'].DateTime().year(), 1, 1).strftime(\'%Y\')"></td>\n
</tr>\n
\n
\n
<!-- Go to Next page (Application preferences)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page5_check"> Page 5 Checks</span>\n
\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_price_currency"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_currency\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_preferred_date_order"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_datetime_format\']"></td>\n
</tr>\n
<tr>\n
<td>addSelection</td>\n
<td>//select[@name="field_your_lang"]</td>\n
<td>label=French</td>\n
</tr>\n
\n
<!-- Go to Next page (ERP5 Express installation)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_consulting_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page6_check"> Page 6 Checks</span>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForCondition</td>\n
<td>selenium.isTextPresent("ERP5 configuration process is running.")</td>\n
<td>10000</td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Please be patient and do not move from current page until you get</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>confirmation that the installation is over.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>It will last approximately 5 to 10 minutes.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>setTimeout</td>\n
<td>1200000</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities">\n
Wait for activities</span>\n
<tr>\n
<td>setTimeout</td>\n
<td>30000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_assertEndConfiguration</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>True</td>\n
<td></td>\n
</tr>\n
\n
<!-- login with functional test user -->\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/logout</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/login_form</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_username\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_password"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_password\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="logged_in:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>pause</td>\n
<td>5000</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities">\n
Wait for activities</span>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_username\']"></td>\n
<td></td>\n
</tr>\n
\n
\n
<!-- login with newly created user from Express configuration -->\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/logout</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/login_form</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_reference\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_password"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_password\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="logged_in:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_reference\']"></td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities" />\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/restore_test_environment" />\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/login_form</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_username\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_password"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_password\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="logged_in:method"]</td>\n
<td></td>\n
</tr>\n
\n
</tbody></table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testStandardConsultingConfigurationProcess</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Configuration Standard</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Standard Configuration</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/init_test_environment" />\n
\n
<tr>\n
<td>store</td>\n
<td>${base_url}/portal_configurator</td>\n
<td>configurator_base_url</td>\n
</tr>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpConfigurationTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<!-- Set longer timeout as it takes time at configurator side to prepare everything needed. -->\n
<tr>\n
<td>setTimeout</td>\n
<td>1200000</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities" />\n
<!-- Restore defaults -->\n
<tr>\n
<td>setTimeout</td>\n
<td>30000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>pause</td>\n
<td>4000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${configurator_base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>ERP5 Configuration</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Welcome to Configurator</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>This tool will help you configure your fresh ERP5</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Language</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>ERP5 Configuration</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td tal:content="python: \'//button[@value=\\\'business_configuration_module/%s\\\']\' %\n
here.Zuite_getConfigurationTestDict()[\'business_configuration_id\']"></td>\n
<td></td>\n
</tr>\n
\n
<!-- First Page (Organisation) -->\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page1_check"> Page 1 Checks</span>\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_title"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_email_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_email\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_telephone_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_telephone\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_your_default_address_street_address"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_street_address\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_address_zip_code"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_zip_code\']"></td>\n
</tr>\n
\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_default_address_region"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_region\']"></td>\n
</tr>\n
\n
<!-- Next page to check validation works -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Input is required but no input given.</td>\n
<td></td>\n
</tr>\n
\n
\n
<!-- Check that what was previously entered is returned -->\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_title"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_email_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_email\']"></td>\n
\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_telephone_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_telephone\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//textarea[@name="field_your_default_address_street_address"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_street_address\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_address_zip_code"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_zip_code\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//select[@name="field_your_default_address_region"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_region_category\']"></td>\n
</tr>\n
<!-- Fill in rest details-->\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_address_city"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_city\']"></td>\n
</tr>\n
\n
<!-- Go Second page (User Accounts)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page2_check"> Frame Checks</span>\n
\n
<!-- Go to Previous page (Organisation) and check that it\'s all saved-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="previous:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page1_check"> Page 1 Checks</span>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_title"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_email_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_email\']"></td>\n
\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_telephone_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_telephone\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//textarea[@name="field_your_default_address_street_address"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_street_address\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_address_zip_code"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_zip_code\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//select[@name="field_your_default_address_region"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_region_category\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_default_address_city"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_city\']"></td>\n
</tr>\n
\n
\n
<!-- Go to Next page (User Accounts)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page2_check"> Page 2 Checks</span>\n
\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_company_employees_number"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_company_employees_number\']"></td>\n
</tr>\n
\n
<!-- Go to Next page (User configurations)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page3_check"> Page 3 Checks</span>\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_first_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_first_name\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_last_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_last_name\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_reference"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_used_reference\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_password"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_password\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_password_confirm"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_password\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_function"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_function\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_default_email_text"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_email\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
\n
<!-- Check that it\'s impossible to use an user id which\n
exists already at server (witch) side)-->\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>User login is either already used or contains invalid characters</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Please try another one</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_reference"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_reference\']"></td>\n
</tr>\n
\n
\n
<!-- Go to Next page (Accounting)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page4_check"> Page 4 Checks</span>\n
\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_start_date_year"]</td>\n
<td tal:content="python:\n
modules[\'DateTime\'].DateTime(modules[\'DateTime\'].DateTime().year(), 1, 1).strftime(\'%Y\')"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_start_date_month"]</td>\n
<td>01</td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_start_date_day"]</td>\n
<td>01</td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_stop_date_year"]</td>\n
<td tal:content="python:\n
modules[\'DateTime\'].DateTime(modules[\'DateTime\'].DateTime().year(), 1, 1).strftime(\'%Y\')"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_stop_date_month"]</td>\n
<td>12</td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="subfield_field_your_period_stop_date_day"]</td>\n
<td>31</td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_your_period_title"]</td>\n
<td tal:content="python:\n
modules[\'DateTime\'].DateTime(modules[\'DateTime\'].DateTime().year(), 1, 1).strftime(\'%Y\')"></td>\n
</tr>\n
\n
\n
<!-- Go to Next page (Application preferences)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page5_check"> Page 5 Checks</span>\n
\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_price_currency"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_organisation_currency\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_preferred_date_order"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_datetime_format\']"></td>\n
</tr>\n
<tr>\n
<td>addSelection</td>\n
<td>//select[@name="field_your_lang"]</td>\n
<td>label=French</td>\n
</tr>\n
\n
<!-- Go to Next page (ERP5 Express installation)-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_frame_check"> Frame Checks</span>\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/configurator_page6_check"> Page 6 Checks</span>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="next:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForCondition</td>\n
<td>selenium.isTextPresent("ERP5 configuration process is running.")</td>\n
<td>10000</td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Please be patient and do not move from current page until you get</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>confirmation that the installation is over.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>It will last approximately 5 to 10 minutes.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>setTimeout</td>\n
<td>1200000</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities">\n
Wait for activities</span>\n
<tr>\n
<td>setTimeout</td>\n
<td>30000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_assertEndConfiguration</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>True</td>\n
<td></td>\n
</tr>\n
\n
<!-- login with functional test user -->\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/logout</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/login_form</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_username\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_password"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_password\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="logged_in:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>pause</td>\n
<td>5000</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities">\n
Wait for activities</span>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_username\']"></td>\n
<td></td>\n
</tr>\n
\n
\n
<!-- login with newly created user from Express configuration -->\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/logout</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/login_form</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_reference\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_password"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_password\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="logged_in:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'customer_user1_reference\']"></td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities" />\n
<span metal:use-macro="container/Zuite_viewConfiguratorTestMacroLibrary/macros/restore_test_environment" />\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/login_form</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_name"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_username\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_password"]</td>\n
<td tal:content="python:\n
here.Zuite_getConfigurationTestDict()[\'functional_test_password\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="logged_in:method"]</td>\n
<td></td>\n
</tr>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testStandardConfigurationProcess</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal_tests/configurator_consulting_standard_zuite
portal_tests/configurator_consulting_standard_zuite/**
portal_tests/configurator_standard_zuite
portal_tests/configurator_standard_zuite/**
\ No newline at end of file
......@@ -152,7 +152,7 @@
</tr>\n
<tr>\n
<td>type</td>\n
<td>listbox_start_date</td>\n
<td>listbox_movement.start_date</td>\n
<td>2009/01/01</td>\n
</tr>\n
<tr>\n
......
......@@ -73,6 +73,7 @@
<value>
<list>
<string>listbox</string>
<string>listbox_delivery_start_date</string>
</list>
</value>
</item>
......
682
\ No newline at end of file
683
<?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>user_tutorial_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Tests configured instance </string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Create Campaigns</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-To Create Campaigns</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpCampaignTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Campaigns</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Add Campaign</td>\n
</tr>\n
<tr>\n
<td>waitForCondition</td>\n
<td>selenium.isTextPresent("Title")</td>\n
<td>60000</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'campaign_howto_campaign_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_reference"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'campaign_howto_campaign_reference\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_source_section_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'campaign_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_source_decision_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'campaign_howto_person_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_source_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'campaign_howto_person2_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_destination_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'campaign_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_my_source_trade_title_list"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'campaign_howto_person2_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_start_date_year"]</td>\n
<td>2000</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_start_date_month"]</td>\n
<td>10</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_start_date_day"]</td>\n
<td>10</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_stop_date_year"]</td>\n
<td>3000</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_stop_date_month"]</td>\n
<td>11</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_stop_date_day"]</td>\n
<td>11</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_quantity"]</td>\n
<td>0.9</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_quantity_unit"]</td>\n
<td>Time/Day</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_price"]</td>\n
<td>20.00</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_price_currency"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'campaign_howto_currency_tag\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Data updated.</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Open Ticket</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Open</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_tearDownCampaignTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToCampaign</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Create Events in Campaigns</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-To Create Events in Campaigns</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpCreateEventTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Campaigns</td>\n
</tr>\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'create_event_howto_campaign_title\']],), enter_object=True)"/>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Campaigns</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_campaign_title\']"></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Create New Event</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_portal_type"]</td>\n
<td>Mail Message</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_event_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_your_text_content"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_event_description\']"></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//input[@name="field_your_direction" and @value="outgoing"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Created and associated a new Mail Message to the ticket.</td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_my_default_follow_up_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_campaign_title\']"></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_my_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_event_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_source_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_person_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_my_destination_title_list"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_person2_title\']"></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//input[@name="field_my_content_type" and @value="text/plain"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_my_text_content"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_event_content\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>storeAttribute</td>\n
<td>//div[@id="breadcrumb"]/a[3]@href</td>\n
<td>event_url</td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
<tr>\n
<td>openAndWait</td>\n
<td>${event_url}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Preview</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_event_content\']"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//span[contains(text(),\'View\')]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="field_my_default_follow_up_title"]/../a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Campaigns</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_campaign_title\']"></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>1 records</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-0 DataA\']/td[1]/</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'create_event_howto_event_title\']" ></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_tearDownCreateEventTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToCreateEvent</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Full Text Search</title>\n
</head>\n
<body tal:define="configuration python: here.Zuite_getHowToInfo();\n
search_name_string python: configuration[\'full_text_person_title\'];\n
search_organisation_string python: configuration[\'full_text_organisation_title\'];">\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-To Full Text Search</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpFullTextSearchTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<!-- Search with empty string -->\n
<tr>\n
<td>type</td>\n
<td>field_your_search_text</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>ERP5Site_viewQuickSearchResultList:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextNotPresent</td>\n
<td>Search Results</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyElementPresent</td>\n
<td>id=transition_message</td>\n
<td></td>\n
</tr>\n
<!-- Search persons by full name -->\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>field_your_search_text</td>\n
<td tal:content="search_name_string"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>ERP5Site_viewQuickSearchResultList:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Search Results</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="search_name_string"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="python: configuration[\'full_text_person_reference\']">reference</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Person</td>\n
<td></td>\n
</tr>\n
\n
<!-- Search Organisation -->\n
<tr>\n
<td>type</td>\n
<td>field_your_search_text</td>\n
<td tal:content="search_organisation_string"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>ERP5Site_viewQuickSearchResultList:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Search Results</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="search_organisation_string"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Organisation</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/Zuite_tearDownFullTextSearchTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToFullTextSearch</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Process Incoming Events in Campaigns</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-To Process Incoming Events in Campaigns</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpIncomingEventTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Persons</td>\n
</tr>\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'incoming_event_howto_person_title\']],), enter_object=True)"/>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Persons</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'incoming_event_howto_person_title\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Events</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>0 records</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Create New Event</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_portal_type"]</td>\n
<td>Mail Message</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'incoming_event_howto_event_title\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_resource"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'incoming_event_howto_service_title\']"></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//input[@name="field_your_direction" and @value="incoming"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>New event created.</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Draft</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_my_text_content"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'incoming_event_howto_event_content\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>storeValue</td>\n
<td>//textarea[@name="field_my_destination_title_list"]</td>\n
<td>user_title</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Declare as Received</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Received</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Create Follow Up Ticket</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_your_follow_up_ticket_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'incoming_event_howto_ticket_title\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_follow_up_ticket_type"]</td>\n
<td>Support Request</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@name="field_my_default_follow_up_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'incoming_event_howto_ticket_title\']"></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Base_clearCache</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Cleared.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Events</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Events</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>1 records</td>\n
</tr>\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'incoming_event_howto_event_title\']],), enter_object=True)"/>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Create Response</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_your_response_event_text_content"]</td>\n
<td>Some response</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>storeAttribute</td>\n
<td>//div[@id="breadcrumb"]/a[3]@href</td>\n
<td>waitack</td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
<tr>\n
<td>openAndWait</td>\n
<td>${waitack}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Related Events</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>1 records</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td tal:content="python: \'link=Re: %s\' % here.Zuite_getHowToInfo()[\'incoming_event_howto_event_title\']"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_resource"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'incoming_event_howto_service_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_source_title"]</td>\n
<td>${user_title}</td>\n
</tr>\n
<!--\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_my_text_content"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'incoming_event_howto_ticket_content\']"></td>\n
</tr>\n
-->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Deliver</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Delivered</td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Support Requests</td>\n
</tr>\n
\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'incoming_event_howto_ticket_title\']],), enter_object=True)"/>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>2 records</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_tearDownIncomingEventTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToIncomingEvent</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Instance I18n</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-To Instance I18n</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<!-- test switching to French -->\n
<!--\n
XXX: This is the way user would have done but it fails for FF in some conditions\n
which we can not reproduce. Therefore we use set cookie approach.\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_language</td>\n
<td>label=Français</td>\n
</tr>\n
<tr>\n
<td>pause</td>\n
<td>5000</td>\n
<td></td>\n
</tr>\n
-->\n
<tr>\n
<td>deleteCookie</td>\n
<td>LOCALIZER_LANGUAGE</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>createCookie</td>\n
<td>LOCALIZER_LANGUAGE=fr</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Mes favoris</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Personnes</td>\n
</tr>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>listbox_translated_validation_state_title</td>\n
<td>Valid%</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@class=\'listbox-select-action\']</td>\n
<td></td>\n
</tr>\n
<!--\n
<tr>\n
<td>verifyTextNotPresent</td>\n
<td>Brouillon</td>\n
<td></td>\n
</tr>\n
-->\n
<tr>\n
<td>type</td>\n
<td>listbox_translated_validation_state_title</td>\n
<td>Brouillon</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@class=\'listbox-select-action\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextNotPresent</td>\n
<td>Valid</td>\n
<td></td>\n
</tr>\n
<!--\n
XXX: This is the way user would have done but it fails for FF in some conditions\n
which we can not reproduce. Therefore we use set cookie approach.\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_language</td>\n
<td>label=English</td>\n
</tr>\n
<tr>\n
<td>pause</td>\n
<td>5000</td>\n
<td></td>\n
</tr>\n
-->\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>deleteCookie</td>\n
<td>LOCALIZER_LANGUAGE</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>createCookie</td>\n
<td>LOCALIZER_LANGUAGE=en</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToInstanceI18N</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Organisation</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-To Organisation</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpOrganisationTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Organisations</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Organisations</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Add Organisation</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Object created.</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//li[@class="selected"]/a/span</td>\n
<td>View</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'organisation_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_corporate_name"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'organisation_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="subfield_field_my_role_list_default:list"]</td>\n
<td>Client</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_function"]</td>\n
<td>Sales</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//textarea[@name="field_my_default_address_street_address"]</td>\n
<td>12 Zorro Street</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_default_address_city"]</td>\n
<td>Beverly Hills</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_default_address_zip_code"]</td>\n
<td>90210</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_default_address_region"]</td>\n
<td>Brazil</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_default_email_coordinate_text"]</td>\n
<td>info@zcompany.com</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_default_telephone_my_default_telephone_coordinate_text"]</td>\n
<td>+55(0)22 2222 2222</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextNotPresent</td>\n
<td>Input data has errors. Please look at the error messages below.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Details</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Validate</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//li[@class="selected"]/a/span</td>\n
<td>Details</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Status changed.</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=View</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@title="The current state of the document."]/div[1]</td>\n
<td>Validated</td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/organisation_module/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[1]</td>\n
<td>ERP5</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Organisations</td>\n
</tr>\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'organisation_howto_organisation_title\']],), enter_object=True)"/>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'organisation_howto_organisation_title\']"></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_tearDownOrganisationTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToOrganisation</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Request to post an outgoing event</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-To Request to post an outgoing event</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpOutgoingEventTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Campaigns</td>\n
</tr>\n
\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'outgoing_event_howto_campaign_title\']],), enter_object=True)"/>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'outgoing_event_howto_campaign_title\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td tal:content="python: \'link=%s\' % here.Zuite_getHowToInfo()[\'outgoing_event_howto_event_title\']"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Planned</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Confirm</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="field_my_default_follow_up_title"]/../a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-0 DataA\']/td[7]/</td>\n
<td>Confirmed</td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Base_clearCache</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Cleared.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Events</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Events</td>\n
</tr>\n
<!--\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>1 records</td>\n
</tr>\n
-->\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'outgoing_event_howto_event_title\']],), enter_object=True)"/>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Send</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Sent</td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Base_clearCache</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Cleared.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/event_module?simulation_state=ordered</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>0 records</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_tearDownOutgoingEventTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToOutgoingEvent</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Person - Tutorial Reference -user-Howto.Create.Persons</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr>\n
<td rowspan="1" colspan="3">How-To Person - Tutorial Reference -user-Howto.Create.Persons</td>\n
</tr>\n
</thead>\n
\n
<tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpPersonTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
\n
<!-- Screenshot on slide 3 of user-Howto.Create.Persons -->\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Persons</td>\n
</tr>\n
\n
\n
<!-- Screenshot on slide 4 of user-Howto.Create.Persons -->\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Add Person</td>\n
</tr>\n
\n
\n
<!-- Screenshot on slide 5 of user-Howto.Create.Persons -->\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Object created.</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//li[@class="selected"]/a/span</td>\n
<td>View</td>\n
</tr>\n
\n
\n
<!-- Screenshot on slide 6 of user-Howto.Create.Persons -->\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_first_name"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_first_name\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_last_name"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_last_name\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_career_subordination_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_gender"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_gender\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="subfield_field_my_career_role_list_default:list"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_role\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_career_function"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_career_function\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_career_activity"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_career_activity\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_nationality"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_nationality\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_default_email_coordinate_text"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_email\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_default_telephone_my_default_telephone_coordinate_text"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'person_howto_telephone\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
\n
\n
<!-- Screenshot on slide 7 of user-Howto.Create.Persons -->\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="information_area"]</td>\n
<td>Input data has errors. Please look at the error messages below.</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="error"]</td>\n
<td>No such document was found.</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="subfield_field_my_career_subordination_title_relation"]</td>\n
<td>Add Organisation</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextNotPresent</td>\n
<td>Input data has errors. Please look at the error messages below.</td>\n
<td></td>\n
</tr>\n
\n
\n
<!-- Screenshot on slide 8 and 9 of user-Howto.Create.Persons -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Details</td>\n
<td></td>\n
</tr>\n
\n
<!-- Screenshot on slide 10-11 of user-Howto.Create.Persons -->\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Validate</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//li[@class="selected"]/a/span</td>\n
<td>Details</td>\n
</tr>\n
\n
\n
<!-- Screenshot on slide 12 of user-Howto.Create.Persons -->\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Status changed.</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=View</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@title="The current state of the document."]/div[1]</td>\n
<td>Validated</td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
\n
\n
<!-- Screenshot on slide 13 of user-Howto.Create.Persons -->\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Persons</td>\n
</tr>\n
\n
\n
<!-- Screenshot on slide 14 of user-Howto.Create.Persons -->\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[1]</td>\n
<td>ERP5</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Persons</td>\n
</tr>\n
\n
\n
<!-- Screenshot on slide 15 of user-Howto.Create.Persons -->\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'person_howto_title\']],), enter_object=True)"/>\n
<tr>\n
<td>pause</td>\n
<td>5000</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_tearDownPersonTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToPerson</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-to Person and Organisation linking</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-to Person and Organisation linking</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpPersonAndOrganisationLinkingTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Persons</td>\n
</tr>\n
\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'link_howto_person_title\']],), enter_object=True)"/>\n
<tr>\n
<td>assertValue</td>\n
<td>//input[@name="field_my_first_name"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'link_howto_person_first_name\']"></td>\n
</tr>\n
<tr>\n
<td>assertValue</td>\n
<td>//input[@name="field_my_last_name"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'link_howto_person_last_name\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="portal_selections/viewSearchRelatedDocumentDialog0:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>listbox_title</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'link_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>dialog_update_button</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'link_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>assertValue</td>\n
<td>//input[@name="field_my_career_subordination_title"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="portal_selections/viewSearchRelatedDocumentDialog0:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>listbox_title</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'link_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>dialog_update_button</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td tal:content="python: \'//a[text()=\\\'%s\\\']/../../td[1]/input\' % (here.Zuite_getHowToInfo()[\'link_howto_organisation_title\'])"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Data updated.</td>\n
</tr>\n
<tr>\n
<td>assertValue</td>\n
<td>//input[@name="field_my_career_subordination_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'link_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="field_my_career_subordination_title"]/following-sibling::*[2]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertValue</td>\n
<td>//input[@name="field_my_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'link_howto_organisation_title\']"></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_tearDownPersonAndOrganisationLinkingTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToPersonAndOrganisationLinking</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Post Events in Campaigns</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-To Post Events in Campaigns</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpPostEventTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Events</td>\n
</tr>\n
\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'post_event_howto_event_title\']],), enter_object=True)"/>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Send</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Status changed.</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Sent</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@name="field_my_default_follow_up_title"]/../a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Campaigns</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'post_event_howto_campaign_title\']"></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="listbox-current-page-total-number"]</td>\n
<td>1 records</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@class=\'listbox-data-line-0 DataA\']/td[7]/</td>\n
<td>Sent</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Persons</td>\n
</tr>\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'post_event_howto_person_title\']],), enter_object=True)"/>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'post_event_howto_person_title\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Events</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'post_event_howto_event_title\']"></td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_tearDownPostEventTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToPostEvent</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-To Product</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-To Product</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpProductTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Products</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Add Product</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Object created.</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//li[@class="selected"]/a/span</td>\n
<td>View</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'product_howto_product_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_reference"]</td>\n
<td>RL 01</td>\n
</tr>\n
<!--\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_product_line"]</td>\n
<td>Equipment/Construction</td>\n
</tr>\n
-->\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_base_contribution_list"]</td>\n
<td>Taxable</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Purchase</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_purchase_supply_line_source_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'product_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_purchase_supply_line_start_date_range_max_year"]</td>\n
<td>2010</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_purchase_supply_line_start_date_range_max_month"]</td>\n
<td>10</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_purchase_supply_line_start_date_range_max_day"]</td>\n
<td>01</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_purchase_supply_line_base_price"]</td>\n
<td>0.50</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_purchase_supply_line_priced_quantity"]</td>\n
<td>1</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Sale</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_sale_supply_line_base_price"]</td>\n
<td>1</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_sale_supply_line_priced_quantity"]</td>\n
<td>1</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Validate</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//li[@class="selected"]/a/span</td>\n
<td>Sale</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Status changed.</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=View</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@title="The current state of the document."]/div[1]</td>\n
<td>Validated</td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Products</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[1]</td>\n
<td>ERP5</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Products</td>\n
</tr>\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'product_howto_product_title\']],), enter_object=True)"/>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'product_howto_product_title\']"></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_tearDownProductTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToProduct</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>How-to Sale Order / Packing List / Invoices / Payment (expected failure)</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">How-to Sale Order / Packing List / Invoices / Payment</td></tr>\n
</thead><tbody>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment">init</span>\n
\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_setUpSaleOrderTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Init Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span>\n
\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Sale Orders</td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Add Sale Order</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Object created.</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//li[@class="selected"]/a/span</td>\n
<td>View</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_product_title\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_source_section"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_source_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_source_decision_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_order"]</td>\n
<td>Normal</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_price_currency"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_currency_tag\']"></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_price_currency"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_currency_tag\']">EUR</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_delivery_mode"]</td>\n
<td>By Air</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_incoterm"]</td>\n
<td>Carriage Paid To</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_specialise_title"]</td>\n
<td>General Sale Trade Condition</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_destination_section_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation2_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_destination_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation2_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_destination_decision_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation2_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_start_date_year"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'now\'].strftime(\'%Y\')"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_start_date_month"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'now\'].strftime(\'%m\')">01</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_start_date_day"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'now\'].strftime(\'%d\')">01</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_stop_date_year"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'now\'].strftime(\'%Y\')"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_stop_date_month"]</td>\n
<td>12</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_stop_date_day"]</td>\n
<td>31</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Payment</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_payment_condition_payment_mode"]</td>\n
<td>Credit Card</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_payment_condition_trade_date"]</td>\n
<td>Invoice</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_payment_condition_payment_term"]</td>\n
<td>30</td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//input[@name="field_my_payment_condition_payment_end_of_month"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>link=Profile</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_source_administration_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_destination_administration_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_person_title\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Add Sale Order Line</td>\n
</tr>\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@name=\'field_my_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>storeAttribute</td>\n
<td>//div[@id="breadcrumb"]/a[4]@href</td>\n
<td>waitactivities</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<tr>\n
<td>open</td>\n
<td>${waitactivities}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_product_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_reference"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_product_reference\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_resource_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_product_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_quantity"]</td>\n
<td>100000</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_quantity_unit"]</td>\n
<td>Unit/Piece</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_price"]</td>\n
<td>1</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextNotPresent</td>\n
<td>Input data has errors. Please look at the error messages below.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[1]</td>\n
<td>ERP5</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Sale Orders</td>\n
</tr>\n
<!--\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_product_title\']"></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[4]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_product_title\']"></td>\n
</tr>\n
-->\n
<tr>\n
<td>storeAttribute</td>\n
<td>//div[@id="breadcrumb"]/a[3]@href</td>\n
<td>waitconfirm</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
<tr>\n
<td>open</td>\n
<td>${waitconfirm}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Confirm Order</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Confirmed</td>\n
</tr>\n
<tr>\n
<td>storeAttribute</td>\n
<td>//div[@id="breadcrumb"]/a[3]@href</td>\n
<td>product</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/invoke_simulation_alarms"> Invoke simulation alarms </span>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<tr>\n
<td>open</td>\n
<td>${product}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_jump"]</td>\n
<td>Related Sale Packing List</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[1]</td>\n
<td>ERP5</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Sale Packing Lists</td>\n
</tr>\n
<!--\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_product_title\']"></td>\n
</tr>\n
-->\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Ship Packing List</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Shipped</td>\n
</tr>\n
<tr>\n
<td>storeAttribute</td>\n
<td>//div[@id="breadcrumb"]/a[3]@href</td>\n
<td>wait</td>\n
</tr>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">\n
Wait for activities</span>\n
<tr>\n
<td>open</td>\n
<td>${wait}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Deliver Packing List</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Delivered</td>\n
</tr>\n
<tr>\n
<td>storeAttribute</td>\n
<td>//div[@id="breadcrumb"]/a[3]@href</td>\n
<td>spl</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/invoke_simulation_alarms"> Invoke simulation alarms </span>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<tr>\n
<td>open</td>\n
<td>${spl}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_jump"]</td>\n
<td>Related Sale Invoice Transaction</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[1]</td>\n
<td>ERP5</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Accounting</td>\n
</tr>\n
<!--\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_product_title\']"></td>\n
</tr>\n
-->\n
<tr>\n
<td>storeAttribute</td>\n
<td>//div[@id="breadcrumb"]/a[3]@href</td>\n
<td>invoice</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
<tr>\n
<td>open</td>\n
<td>${invoice}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Journalise Transaction</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Journalised</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
<tr>\n
<td>open</td>\n
<td>${invoice}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Post Transaction to General Ledger</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Posted to General Ledger</td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/organisation_module/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Organisations</td>\n
</tr>\n
<tal:block tal:content="structure python: here.Zuite_generateListboxBrowsing(listbox_selection=([\'title\', here.Zuite_getHowToInfo()[\'sale_howto_organisation_title\']],), enter_object=True)"/>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation_title\']"></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Add Bank Account</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="transition_message"]</td>\n
<td>Object created.</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_title"]</td>\n
<td>Main account</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_source_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation3_title\']"></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_start_date_year"]</td>\n
<td>2000</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_start_date_month"]</td>\n
<td>01</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_start_date_day"]</td>\n
<td>01</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_stop_date_year"]</td>\n
<td>3000</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_stop_date_month"]</td>\n
<td>01</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="subfield_field_my_stop_date_day"]</td>\n
<td>01</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_my_price_currency"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_currency_tag\']"></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//input[@name="field_my_overdraft_facility"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_bank_account_number"]</td>\n
<td>0123456789</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_bank_account_key"]</td>\n
<td>0123456789</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="information_area"]</td>\n
<td>Input data has errors. Please look at the error messages below.</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//span[@class="error"]</td>\n
<td>No such document was found.</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="subfield_field_my_source_title_relation"]</td>\n
<td>Add Organisation</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>field_my_source_title</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation3_title\']"></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Validate</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//div[@id="breadcrumb"]/a[3]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_organisation_title\']"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//span[text()="Financial Information"]/../</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//li[@class="selected"]/a/span</td>\n
<td>Financial Information</td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>1 records</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_module"]</td>\n
<td>Sale Packing Lists</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="breadcrumb"]/a[2]</td>\n
<td>Sale Packing Lists</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td tal:content="python: \'link=\' + here.Zuite_getHowToInfo()[\'sale_howto_product_title\']"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_jump"]</td>\n
<td>Related Sale Invoice Transaction</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//li[@class="selected"]/a/span</td>\n
<td>Accounting View</td>\n
</tr>\n
<tr>\n
<td>storeAttribute</td>\n
<td>//div[@id="breadcrumb"]/a[3]@href</td>\n
<td>acc</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
<tr>\n
<td>open</td>\n
<td>${acc}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Create Related Payment</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/select_cash_account">Select Cash Account</span>\n
\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_payment_mode"]</td>\n
<td>Credit Card</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//select[@name="field_your_payment"]</td>\n
<td> 0123456789 0123456789 - Main account</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="field_my_title"]</td>\n
<td tal:content="python: here.Zuite_getHowToInfo()[\'sale_howto_payment_title\']"></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name="Base_edit:method"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>//select[@name="select_action"]</td>\n
<td>Confirm Transaction</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@id="dialog_submit_button"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//label[normalize-space(text())=\'State\']/../div</td>\n
<td>Confirmed</td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_manager">Login As Manager</span>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/Zuite_tearDownSaleOrderTest</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Clean Ok</td>\n
<td></td>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testHowToSaleOrder</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -19,5 +19,5 @@ portal_categories/quantity_unit/unit/**
portal_categories/region/brazil
portal_categories/role/**
portal_categories/use/test_functional_incoming_service
portal_tests/user_tutorial_zuite
portal_tests/user_tutorial_zuite/**
sale_trade_condition_module/1
sale_trade_condition_module/1/**
......@@ -69,8 +69,8 @@ FIXED_PROPERTY_IDS = ('id', 'uid', 'rid', 'sid')
VALID_TEXT_FORMAT_LIST = ('text', 'txt', 'html', 'base_html',
'stripped-html')
VALID_IMAGE_FORMAT_LIST = ('jpg', 'jpeg', 'png', 'gif', 'pnm', 'ppm', 'tiff')
VALID_TRANSPARENT_IMAGE_FORMAT_LIST = ('png', 'gif', 'tiff')
VALID_IMAGE_FORMAT_LIST = ('jpg', 'jpeg', 'png', 'gif', 'pnm', 'ppm', 'tiff', 'svg')
VALID_TRANSPARENT_IMAGE_FORMAT_LIST = ('png', 'gif', 'tiff', 'svg')
DEFAULT_DISPLAY_ID_LIST = ('nano', 'micro', 'thumbnail',
'xsmall', 'small', 'medium',
......
......@@ -31,6 +31,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Base import WorkflowMethod
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Document import Document, VALID_TEXT_FORMAT_LIST
from Products.ERP5.Document.Document import VALID_IMAGE_FORMAT_LIST
from Products.ERP5.Document.Document import ConversionError
from Products.ERP5Type.Base import Base, removeIContentishInterface
from Products.CMFDefault.File import File as CMFFile
......@@ -241,16 +242,27 @@ class File(Document, CMFFile):
return (mime_type, content)
def _convert(self, format, **kw):
"""File is not convertable.
Only original format and text formats are allowed.
"""File is only convertable if it is an image.
Only Image conversion, original format and text formats are allowed.
However this document can migrate to another portal_type which support
conversions.
others conversions.
"""
content_type = self.getContentType() or ''
if format is None:
if (format in VALID_IMAGE_FORMAT_LIST + (None, "")) and \
content_type.startswith("image/"):
# The file should behave like it is an Image for convert
# the content to target format.
from Products.ERP5Type.Document import newTempImage
return newTempImage(self, self.getId(),
data=self.getData(),
content_type=content_type,
filename=self.getFilename())._convert(format, **kw)
elif format in (None, ""):
# No conversion is asked,
# we can return safely the file content itself
return content_type, self.getData()
elif format in VALID_TEXT_FORMAT_LIST:
# This is acceptable to return empty string
# for a File we can not convert
......
......@@ -51,6 +51,8 @@ from OFS.Image import Image as OFSImage
from OFS.Image import getImageInfo
from zLOG import LOG, WARNING
from Products.ERP5Type.ImageUtil import transformUrlToDataURI
# import mixin
from Products.ERP5.mixin.text_convertable import TextConvertableMixin
......@@ -330,6 +332,10 @@ class Image(TextConvertableMixin, File, OFSImage):
else:
parameter_list.append('-')
data = str(self.getData())
if self.getContentType() == "image/svg+xml":
data = transformUrlToDataURI(data)
process = subprocess.Popen(parameter_list,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
......@@ -338,7 +344,7 @@ class Image(TextConvertableMixin, File, OFSImage):
try:
# XXX: The only portable way is to pass what stdin.write can accept,
# which is a string for PIPE.
image, err = process.communicate(str(self.getData()))
image, err = process.communicate(data)
finally:
del process
if image:
......
......@@ -48,6 +48,8 @@ from Products.ERP5Type.Utils import guessEncodingFromText
from lxml import html as etree_html
from lxml import etree
from Products.ERP5Type.ImageUtil import transformUrlToDataURI
class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin,
TextContent, File):
"""A TextDocument impletents IDocument, IFile, IBaseConvertable, ICachedconvertable
......@@ -156,19 +158,21 @@ class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin,
filename = self.getFilename()
if mime_type == 'text/html':
mime_type = 'text/x-html-safe'
result = portal_transforms.convertToData(mime_type, text_content,
if src_mimetype != "image/svg+xml":
result = portal_transforms.convertToData(mime_type, text_content,
object=self, context=self,
filename=filename,
mimetype=src_mimetype,
**convert_kw)
if result is None:
raise ConversionError('TextDocument conversion error. '
'portal_transforms failed to convert '
'from %r to %s: %r' %
(src_mimetype, mime_type, self))
if result is None:
raise ConversionError('TextDocument conversion error. '
'portal_transforms failed to convert '
'from %r to %s: %r' %
(src_mimetype, mime_type, self))
else:
result = text_content
if format in VALID_IMAGE_FORMAT_LIST:
# do resize by temporary image
# Include extra parameter for image conversions
temp_image = self.portal_contributions.newContent(
portal_type='Image',
file=cStringIO.StringIO(),
......@@ -176,6 +180,7 @@ class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin,
temp_object=1)
temp_image._setData(result)
mime, result = temp_image.convert(**kw)
self.setConversion(result, original_mime_type, **kw)
else:
mime_type, result = self.getConversion(**kw)
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Transform" module="Products.PortalTransforms.Transform"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_config</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="UserDict" module="UserDict"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>__allow_access_to_unprotected_subobjects__</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_config_metadata</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>image_to_svg</string> </value>
</item>
<item>
<key> <string>inputs</string> </key>
<value>
<tuple>
<string>image/*</string>
</tuple>
</value>
</item>
<item>
<key> <string>module</string> </key>
<value> <string>Products.PortalTransforms.transforms.image_to_svg</string> </value>
</item>
<item>
<key> <string>output</string> </key>
<value> <string>image/svg</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -79,8 +79,8 @@
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_delivery_start_date</string>
<string>listbox_delivery_stop_date</string>
<string>listbox_movement_start_date</string>
<string>listbox_movement_stop_date</string>
</list>
</value>
</item>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>anchor</string>
<string>columns</string>
<string>lines</string>
<string>list_action</string>
<string>list_method</string>
......@@ -114,6 +115,33 @@
<key> <string>anchor</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>translated_portal_type</string>
<string>Type</string>
</tuple>
<tuple>
<string>movement.start_date</string>
<string>Start Date</string>
</tuple>
<tuple>
<string>constant_string_field</string>
<string>Constant</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>listbox</string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_movement_start_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Date</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -17,7 +17,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_delivery_stop_date</string> </value>
<value> <string>listbox_movement_stop_date</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -30,6 +30,7 @@
import unittest
import os
import transaction
from StringIO import StringIO
from lxml import etree
from AccessControl import Unauthorized
......@@ -38,7 +39,14 @@ from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\
_getConversionServerDict
from Products.ERP5Type.tests.utils import FileUpload, createZODBPythonScript
from Products.ERP5.Document.Document import ConversionError
try:
from PIL import Image
except ImportError:
# When the PIL eggs is developed it seems to use an different
# way to import it.
import Image
LANGUAGE_LIST = ('en', 'fr', 'de', 'bg',)
......@@ -51,6 +59,20 @@ def makeFileUpload(name, as_name=None):
path = makeFilePath(name)
return FileUpload(path, as_name)
def process_image(image, size=(40, 40)):
# open the images to compare, resize them, and convert to grayscale
# get the rgb values of the pixels in the image
image = Image.open(image)
return list(image.resize(size).convert("L").getdata())
def compare_image(image_data_1, image_data_2):
""" Find the total difference in RGB value for all pixels in the images
and return the "amount" of differences that the 2 images contains. """
data1 = process_image(image_data_1)
data2 = process_image(image_data_2)
return abs(sum([data1[x] - data2[x] for x in range(len(data1))]))
class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
"""Test for erp5_web business template.
"""
......@@ -60,7 +82,6 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
manager_password = 'zope'
website_id = 'test'
def getTitle(self):
return "ERP5WebWithDms"
......@@ -666,7 +687,13 @@ return True
self.assertEquals(1, len(img_list))
src = img_list[0].get('src')
def test_ImageConversionThroughWebSite(self):
def test_ImageConversionThroughWebSite_using_file(self):
"""Check that conversion parameters pass in url
are hounoured to display an image in context of a website
"""
self.test_ImageConversionThroughWebSite("File")
def test_ImageConversionThroughWebSite(self, image_portal_type="Image"):
"""Check that conversion parameters pass in url
are hounoured to display an image in context of a website
"""
......@@ -687,9 +714,9 @@ return True
image_reference = 'NXD-IMAGE'
image_module = portal.getDefaultModule(portal_type='Image')
module = portal.getDefaultModule(portal_type=image_portal_type)
upload_file = makeFileUpload('tiolive-ERP5.Freedom.TioLive.Logo-001-en.png')
image = image_module.newContent(portal_type='Image',
image = module.newContent(portal_type=image_portal_type,
file=upload_file,
reference=image_reference)
image.publish()
......@@ -713,6 +740,11 @@ return True
image_reference + '?format=jpg', credential)
self.assertEquals(response.getHeader('content-type'), 'image/jpeg')
# testing Image conversions, svg
response = self.publish(website.absolute_url_path() + '/' +\
image_reference + '?format=svg', credential)
self.assertEquals(response.getHeader('content-type'), 'image/svg+xml')
# testing Image conversions, resizing
response = self.publish(website.absolute_url_path() + '/' +\
image_reference + '?display=large', credential)
......@@ -752,6 +784,229 @@ return True
self._test_document_publication_workflow('Web Page',
'share_alive_action')
def _testImageConversionFromSVGToPNG(self, portal_type="Image",
filename="user-TESTSVG-CASE-EMBEDDEDDATA"):
""" Test Convert one SVG Image (Image, TextDocument, File ...) to
PNG and compare the generated image is well generated.
"""
portal = self.portal
module = portal.getDefaultModule(portal_type=portal_type)
upload_file = makeFileUpload('%s.svg' % filename)
image = module.newContent(portal_type=portal_type,
file=upload_file,
reference="NXD-DOCUMENT")
image.publish()
transaction.commit()
self.tic()
self.assertEquals(image.getContentType(), 'image/svg+xml')
mime, converted_data = image.convert("png")
self.assertEquals(mime, 'image/png')
expected_image = makeFileUpload('%s.png' % filename)
# Compare images and accept some minimal difference,
difference_value = compare_image(StringIO(converted_data), expected_image)
self.assertTrue(difference_value < 100,
"Conversion from svg to png create one too small image, " + \
"so it failed to download the image. (%s >= 100)" % difference_value)
def _testImageConversionFromSVGToPNG_file_url(self, portal_type="Image"):
""" Test Convert one SVG Image with an image using local path (file)
at the url of the image tag. ie:
<image xlink:href="file:///../../user-XXX-XXX"
This is not used by ERP5 in production, but this is way that
prooves that conversion from SVG to PNG can use external images.
"""
portal = self.portal
module = portal.getDefaultModule(portal_type=portal_type)
upload_file = makeFileUpload('user-TESTSVG-CASE-FULLURL-TEMPLATE.svg')
svg_content = upload_file.read().replace("REPLACE_THE_URL_HERE",
"file://" + makeFilePath("user-TESTSVG-BACKGROUND-IMAGE.png"))
# Add image using data instead file this time as it is not the goal of
# This test assert this topic.
image = module.newContent(portal_type=portal_type,
data=svg_content,
filename=upload_file.filename,
content_type="image/svg+xml",
reference="NXD-DOCYMENT")
image.publish()
transaction.commit()
self.tic()
self.assertEquals(image.getContentType(), 'image/svg+xml')
mime, converted_data = image.convert("png")
self.assertEquals(mime, 'image/png')
expected_image = makeFileUpload('user-TESTSVG-CASE-FULLURL.png')
# Compare images and accept some minimal difference,
difference_value = compare_image(StringIO(converted_data), expected_image)
self.assertTrue(difference_value < 100,
"Conversion from svg to png create one too small image, " + \
"so it failed to download the image. (%s >= 100)" % difference_value)
def _testImageConversionFromSVGToPNG_broken_url(self, portal_type="Image"):
""" Test Convert one broken SVG into PNG. The expected outcome is a
conversion error when an SVG contains one unreacheble xlink:href like.
at the url of the image tag. ie:
<image xlink:href="http://soidjsoidjqsoijdqsoidjqsdoijsqd.idjsijds/../user-XXX-XXX"
This is not used by ERP5 in production, but this is way that
prooves that conversion from SVG to PNG can use external images.
"""
portal = self.portal
module = portal.getDefaultModule(portal_type=portal_type)
upload_file = makeFileUpload('user-TESTSVG-CASE-FULLURL-TEMPLATE.svg')
svg_content = upload_file.read().replace("REPLACE_THE_URL_HERE",
"http://soidjsoidjqsoijdqsoidjqsdoijsqd.idjsijds/../user-XXX-XXX")
upload_file = makeFileUpload('user-TESTSVG-CASE-FULLURL-TEMPLATE.svg')
svg2_content = upload_file.read().replace("REPLACE_THE_URL_HERE",
"https://www.erp5.com/usXXX-XXX")
# Add image using data instead file this time as it is not the goal of
# This test assert this topic.
image = module.newContent(portal_type=portal_type,
data=svg_content,
filename=upload_file.filename,
content_type="image/svg+xml",
reference="NXD-DOCYMENT")
# Add image using data instead file this time as it is not the goal of
# This test assert this topic.
image2 = module.newContent(portal_type=portal_type,
data=svg2_content,
filename=upload_file.filename,
content_type="image/svg+xml",
reference="NXD-DOCYMENT2")
image.publish()
image2.publish()
transaction.commit()
self.tic()
self.assertEquals(image.getContentType(), 'image/svg+xml')
self.assertEquals(image2.getContentType(), 'image/svg+xml')
self.assertRaises(ConversionError, image.convert, "png")
self.assertRaises(ConversionError, image2.convert, "png")
def _testImageConversionFromSVGToPNG_empty_file(self, portal_type="Image"):
""" Test Convert one empty SVG into PNG. The expected outcome is ???
"""
portal = self.portal
module = portal.getDefaultModule(portal_type=portal_type)
# Add image using data instead file this time as it is not the goal of
# This test assert this topic.
image = module.newContent(portal_type=portal_type,
content_type="image/svg+xml",
reference="NXD-DOCYMENT")
image.publish()
transaction.commit()
self.tic()
self.assertEquals(image.getContentType(), 'image/svg+xml')
self.assertRaises(ConversionError, image.convert, "png")
def test_ImageConversionFromSVGToPNG_embeeded_data(self):
""" Test Convert one SVG Image with an image with the data
at the url of the image tag.ie:
<image xlink:href="data:...." >
"""
self._testImageConversionFromSVGToPNG("Image")
def test_FileConversionFromSVGToPNG_embeeded_data(self):
""" Test Convert one SVG Image with an image with the data
at the url of the image tag.ie:
<image xlink:href="data:...." >
"""
self._testImageConversionFromSVGToPNG("File")
def test_WebPageConversionFromSVGToPNG_embeeded_data(self):
""" Test Convert one SVG Image with an image with the data
at the url of the image tag.ie:
<image xlink:href="data:...." >
"""
self._testImageConversionFromSVGToPNG("Web Page")
def test_ImageConversionFromSVGToPNG_broken_url(self):
""" Test Convert one SVG Image with an broken image href
"""
self._testImageConversionFromSVGToPNG_broken_url("Image")
def test_FileConversionFromSVGToPNG_broken_url(self):
""" Test Convert one SVG Image with an broken image href
"""
self._testImageConversionFromSVGToPNG_broken_url("File")
def test_WebPageConversionFromSVGToPNG_broken_url(self):
""" Test Convert one SVG Image with an broken image href
"""
self._testImageConversionFromSVGToPNG_broken_url("Web Page")
def test_ImageConversionFromSVGToPNG_empty_file(self):
""" Test Convert one SVG Image with an empty svg
"""
self._testImageConversionFromSVGToPNG_empty_file("Image")
def test_FileConversionFromSVGToPNG_empty_file(self):
""" Test Convert one SVG Image with an empty svg
"""
self._testImageConversionFromSVGToPNG_empty_file("File")
def test_ImageConversionFromSVGToPNG_file_url(self):
""" Test Convert one SVG Image with an image using local path (file)
at the url of the image tag. ie:
<image xlink:href="file:///../../user-XXX-XXX"
This is not used by ERP5 in production, but this is way that
prooves that conversion from SVG to PNG can use external images.
"""
self._testImageConversionFromSVGToPNG_file_url("Image")
def test_FileConversionFromSVGToPNG_file_url(self):
""" Test Convert one SVG Image with an image using local path (file)
at the url of the image tag. ie:
<image xlink:href="file:///../../user-XXX-XXX"
This is not used by ERP5 in production, but this is way that
prooves that conversion from SVG to PNG can use external images.
"""
self._testImageConversionFromSVGToPNG_file_url("File")
def test_WebPageConversionFromSVGToPNG_file_url(self):
""" Test Convert one SVG Image with an image using local path (file)
at the url of the image tag. ie:
<image xlink:href="file:///../../user-XXX-XXX"
This is not used by ERP5 in production, but this is way that
prooves that conversion from SVG to PNG can use external images.
"""
self._testImageConversionFromSVGToPNG_file_url("Web Page")
def test_ImageConversionFromSVGToPNG_http_url(self):
""" Test Convert one SVG Image with an image with a full
url at the url of the image tag. ie:
<image xlink:href="http://www.erp5.com/user-XXX-XXX"
"""
self._testImageConversionFromSVGToPNG(
"Image", "user-TESTSVG-CASE-FULLURL")
def test_FileConversionFromSVGToPNG_http_url(self):
""" Test Convert one SVG Image with an image with a full
url at the url of the image tag. ie:
<image xlink:href="http://www.erp5.com/user-XXX-XXX"
"""
self._testImageConversionFromSVGToPNG(
"File", "user-TESTSVG-CASE-FULLURL")
def test_WebPageConversionFromSVGToPNG_http_url(self):
""" Test Convert one SVG Image with an image with a full
url at the url of the image tag. ie:
<image xlink:href="http://www.erp5.com/user-XXX-XXX"
"""
self._testImageConversionFromSVGToPNG(
"Web Page", "user-TESTSVG-CASE-FULLURL")
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestERP5WebWithDms))
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg2"
version="1.1"
inkscape:version="0.48.2 r9819"
width="524.40942"
height="372.04724"
sodipodi:docname="user-howto.manage.support.requests.assign.event.to.ticket.create.follow.up.ticket-002-en.svg">
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1024"
inkscape:window-height="718"
id="namedview4"
showgrid="false"
inkscape:zoom="1.3707937"
inkscape:cx="270.63548"
inkscape:cy="273.56415"
inkscape:window-x="-3"
inkscape:window-y="-3"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<image
y="0.99838382"
x="0.11206181"
id="image3065"
xlink:href="REPLACE_THE_URL_HERE"
height="369.32098"
width="523.56" />
<rect
style="fill:none;stroke:#ff0000;stroke-width:2.696;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2987"
width="81.987816"
height="11.938368"
x="64.116737"
y="43.860283"
rx="2.5779424"
ry="0.29129499" />
<rect
style="fill:none;stroke:#ff0000;stroke-width:2.81803679;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2989"
width="82.598396"
height="9.534873"
x="64.417244"
y="68.28804"
rx="2.4387791"
ry="0.28804284" />
<path
sodipodi:type="arc"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3898"
sodipodi:cx="303.51724"
sodipodi:cy="155.48277"
sodipodi:rx="25.13793"
sodipodi:ry="25.13793"
d="m 328.65517,155.48277 a 25.13793,25.13793 0 1 1 -50.27586,0 25.13793,25.13793 0 1 1 50.27586,0 z"
transform="matrix(0.63956863,0,0,0.63956863,-19.039052,-62.99123)" />
<text
xml:space="preserve"
style="font-size:23px;font-style:normal;font-weight:bold;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
x="166.65985"
y="45.086403"
id="text3900"
sodipodi:linespacing="125%"
transform="scale(1.0034798,0.99653226)"><tspan
sodipodi:role="line"
id="tspan3902"
x="166.65985"
y="45.086403">1</tspan></text>
<path
sodipodi:type="arc"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3898-3"
sodipodi:cx="303.51724"
sodipodi:cy="155.48277"
sodipodi:rx="25.13793"
sodipodi:ry="25.13793"
d="m 328.65517,155.48277 a 25.13793,25.13793 0 1 1 -50.27586,0 25.13793,25.13793 0 1 1 50.27586,0 z"
transform="matrix(0.63956863,0,0,0.63956863,-17.252115,-25.057001)" />
<text
xml:space="preserve"
style="font-size:23px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
x="168.57806"
y="83.152695"
id="text3900-2"
sodipodi:linespacing="125%"
transform="scale(1.0034798,0.99653226)"><tspan
sodipodi:role="line"
id="tspan3902-0"
x="168.57806"
y="83.152695">2</tspan></text>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg2"
version="1.1"
inkscape:version="0.48.2 r9819"
width="524.40942"
height="372.04724"
sodipodi:docname="user-howto.manage.support.requests.assign.event.to.ticket.create.follow.up.ticket-002-en.svg">
<metadata
id="metadata8">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs6" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1024"
inkscape:window-height="718"
id="namedview4"
showgrid="false"
inkscape:zoom="1.3707937"
inkscape:cx="270.63548"
inkscape:cy="273.56415"
inkscape:window-x="-3"
inkscape:window-y="-3"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<image
y="0.99838382"
x="0.11206181"
id="image3065"
xlink:href="http://www.erp5.com/user-howto.manage.support.requests.assign.event.to.ticket.create.follow.up.ticket.screenshot?format=png"
height="369.32098"
width="523.56" />
<rect
style="fill:none;stroke:#ff0000;stroke-width:2.696;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2987"
width="81.987816"
height="11.938368"
x="64.116737"
y="43.860283"
rx="2.5779424"
ry="0.29129499" />
<rect
style="fill:none;stroke:#ff0000;stroke-width:2.81803679;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="rect2989"
width="82.598396"
height="9.534873"
x="64.417244"
y="68.28804"
rx="2.4387791"
ry="0.28804284" />
<path
sodipodi:type="arc"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3898"
sodipodi:cx="303.51724"
sodipodi:cy="155.48277"
sodipodi:rx="25.13793"
sodipodi:ry="25.13793"
d="m 328.65517,155.48277 a 25.13793,25.13793 0 1 1 -50.27586,0 25.13793,25.13793 0 1 1 50.27586,0 z"
transform="matrix(0.63956863,0,0,0.63956863,-19.039052,-62.99123)" />
<text
xml:space="preserve"
style="font-size:23px;font-style:normal;font-weight:bold;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
x="166.65985"
y="45.086403"
id="text3900"
sodipodi:linespacing="125%"
transform="scale(1.0034798,0.99653226)"><tspan
sodipodi:role="line"
id="tspan3902"
x="166.65985"
y="45.086403">1</tspan></text>
<path
sodipodi:type="arc"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3898-3"
sodipodi:cx="303.51724"
sodipodi:cy="155.48277"
sodipodi:rx="25.13793"
sodipodi:ry="25.13793"
d="m 328.65517,155.48277 a 25.13793,25.13793 0 1 1 -50.27586,0 25.13793,25.13793 0 1 1 50.27586,0 z"
transform="matrix(0.63956863,0,0,0.63956863,-17.252115,-25.057001)" />
<text
xml:space="preserve"
style="font-size:23px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0000ff;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
x="168.57806"
y="83.152695"
id="text3900-2"
sodipodi:linespacing="125%"
transform="scale(1.0034798,0.99653226)"><tspan
sodipodi:role="line"
id="tspan3902-0"
x="168.57806"
y="83.152695">2</tspan></text>
</svg>
......@@ -30,42 +30,35 @@ import unittest
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import \
ERP5TypeFunctionalTestCase
from Products.ERP5Type.tests.testFunctionalStandaloneUserTutorial import \
BASE_REMOTE_SELENIUM_TEST_URL_LIST
class TestZeleniumConfiguratorStandard(ERP5TypeFunctionalTestCase):
foreground = 0
run_only = "configurator_standard_zuite"
def setupVirtualTestZuite(self):
"""
After execute the configuration, it is also required to
run all user tutorial tests in order to validate the
configuration. This copy user tutorial zuite to same
place as Configurator test.
"""
portal_tests = self.portal.portal_tests
configurator_zuite = getattr(portal_tests, self.run_only)
if getattr(configurator_zuite, "user_tutorial_zuite", None) is not None:
clipboard = portal_tests.manage_copyObjects(ids=['user_tutorial_zuite'])
configurator_zuite.manage_pasteObjects(cb_copy_data=clipboard)
self.stepTic()
public_bt5_repository_list = ['http://www.erp5.org/dists/snapshot/bt5/']
template_list = self._getBTPathAndIdList(["erp5_base"])
if len(template_list) > 0:
bt5_repository_path = "/".join(template_list[0][0].split("/")[:-1])
try:
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
[bt5_repository_path], None)
except (RuntimeError, IOError):
# If bt5 repository is not a repository use public one.
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
public_bt5_repository_list)
else:
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
public_bt5_repository_list)
remote_code_url_list = [
"http://www.erp5.com/user-Howto.Configure.ERP5.for.SMB.With.Configurator/TestPage_viewSeleniumTest"
] + BASE_REMOTE_SELENIUM_TEST_URL_LIST
def afterSetUp(self):
self.setupVirtualTestZuite()
ERP5TypeFunctionalTestCase.afterSetUp(self)
# information to know if a business template is a standard business
# template or a custom one
public_bt5_repository_list = ['http://www.erp5.org/dists/snapshot/bt5/']
template_list = self._getBTPathAndIdList(["erp5_base"])
if len(template_list) > 0:
bt5_repository_path = "/".join(template_list[0][0].split("/")[:-1])
try:
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
[bt5_repository_path], None)
except (RuntimeError, IOError):
# If bt5 repository is not a repository use public one.
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
public_bt5_repository_list)
else:
self.portal.portal_templates.updateRepositoryBusinessTemplateList(
public_bt5_repository_list)
print self.portal.portal_templates.getRepositoryList()
ERP5TypeFunctionalTestCase.afterSetUp(self)
def getBusinessTemplateList(self):
"""
......@@ -76,7 +69,8 @@ class TestZeleniumConfiguratorStandard(ERP5TypeFunctionalTestCase):
'erp5_configurator', 'erp5_configurator_standard',
# Test suite
'erp5_ui_test_core', 'erp5_configurator_standard_ui_test',
'erp5_user_tutorial_ui_test')
'erp5_user_tutorial_ui_test'
)
def test_suite():
suite = unittest.TestSuite()
......
......@@ -28,13 +28,18 @@
import unittest
from Products.ERP5Configurator.tests.testFunctionalConfigurator import \
TestZeleniumConfiguratorStandard
TestZeleniumConfiguratorStandard
from Products.ERP5Type.tests.testFunctionalStandaloneUserTutorial import \
BASE_REMOTE_SELENIUM_TEST_URL_LIST
class TestZeleniumConfiguratorConsulting(TestZeleniumConfiguratorStandard):
run_only = "configurator_consulting_standard_zuite"
run_only = "configurator_consulting_standard_zuite"
remote_code_url_list = [
"http://www.erp5.com/user-Howto.Configure.ERP5.for.SMB.With.Consultant.Configurator/TestPage_viewSeleniumTest"
] + BASE_REMOTE_SELENIUM_TEST_URL_LIST
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestZeleniumConfiguratorConsulting))
return suite
#############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Rafael Monnerat <rafael@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import urllib2
from lxml import etree
from Products.ERP5.Document.Document import ConversionError
def getDataURI(url):
try:
data = urllib2.urlopen(url)
except Exception, e:
raise ConversionError("Error to transform url (%s) into data uri. ERROR = %s" % (url, Exception(e)))
return 'data:%s;base64,%s' % (data.info()["content-type"],
data.read().encode("base64").replace('\n', ""))
def transformUrlToDataURI(content):
if content is None or len(content) == 0:
return content
root = etree.fromstring(content)
# Prevent namespace contains "None" included into svg by mistake
namespace_dict = root.nsmap.copy()
namespace_dict.pop(None, "discard")
# Get all images which uses xlink:href
image_list = root.xpath("//svg:image[@xlink:href]", namespaces=namespace_dict)
xlink_href = "{%s}href" % namespace_dict.get("xlink", None)
# Transform all images which uses url, into data URI
for image in image_list:
url_value = image.get(xlink_href)
if url_value.startswith("http"):
image.set(xlink_href, getDataURI(image.get(xlink_href)))
return """<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n""" + \
etree.tostring(root)
......@@ -71,6 +71,8 @@ from Products.ERP5Type.patches import OFSHistory
from Products.ERP5Type.patches import OFSItem
from Products.ERP5Type.patches import ExternalMethod
from Products.ERP5Type.patches import User
from Products.ERP5Type.patches import zopecontenttype
from Products.ERP5Type.patches import OFSImage
# These symbols are required for backward compatibility
from Products.ERP5Type.patches.PropertyManager import ERP5PropertyManager
......
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
"""
Monkey-patch to fix OFS.Image, which is not capable to detect the SVG
Content Type format.
Monkey patch uses 2.12.3 original code.
"""
import OFS.Image
import struct
from cStringIO import StringIO
def getImageInfo_with_svg_fix(data):
data = str(data)
size = len(data)
height = -1
width = -1
content_type = ''
# handle GIFs
if (size >= 10) and data[:6] in ('GIF87a', 'GIF89a'):
# Check to see if content_type is correct
content_type = 'image/gif'
w, h = struct.unpack("<HH", data[6:10])
width = int(w)
height = int(h)
# See PNG v1.2 spec (http://www.cdrom.com/pub/png/spec/)
# Bytes 0-7 are below, 4-byte chunk length, then 'IHDR'
# and finally the 4-byte width, height
elif ((size >= 24) and (data[:8] == '\211PNG\r\n\032\n')
and (data[12:16] == 'IHDR')):
content_type = 'image/png'
w, h = struct.unpack(">LL", data[16:24])
width = int(w)
height = int(h)
# Maybe this is for an older PNG version.
elif (size >= 16) and (data[:8] == '\211PNG\r\n\032\n'):
# Check to see if we have the right content type
content_type = 'image/png'
w, h = struct.unpack(">LL", data[8:16])
width = int(w)
height = int(h)
# handle JPEGs
elif (size >= 2) and (data[:2] == '\377\330'):
content_type = 'image/jpeg'
jpeg = StringIO(data)
jpeg.read(2)
b = jpeg.read(1)
try:
while (b and ord(b) != 0xDA):
while (ord(b) != 0xFF): b = jpeg.read(1)
while (ord(b) == 0xFF): b = jpeg.read(1)
if (ord(b) >= 0xC0 and ord(b) <= 0xC3):
jpeg.read(3)
h, w = struct.unpack(">HH", jpeg.read(4))
break
else:
jpeg.read(int(struct.unpack(">H", jpeg.read(2))[0])-2)
b = jpeg.read(1)
width = int(w)
height = int(h)
except: pass
# MONKEY PATCH START HERE
# Handle SVG
elif ("</svg>" in data):
content_type = 'image/svg+xml'
# MONKEY PATCH ENDS HERE
return content_type, width, height
OFS.Image.getImageInfo = getImageInfo_with_svg_fix
# Monkey Patch the zope.contenttype to be able to detect svg image format.
try:
import zope.contenttype
original_text_type = zope.contenttype.text_type
def svg_fix_text_type(s):
s = s.strip()
if '<html>' not in s and "<svg" in s:
return 'image/svg+xml'
# If it is not an svg, just try original behaviour.
# This preserve the further improvements on zope.contenttype
# and preserve the fix.
return original_text_type(s)
# Overwrite original method with the SVG detection fix.
zope.contenttype.text_type = svg_fix_text_type
except ImportError:
print "Skip to patch zope.contenttype, because it is not present."
......@@ -91,7 +91,7 @@ class Xvfb:
result = check_process.communicate()[0]
if result == 'Free':
# Xvfb did not start properly so stop here
raise NotImplementedError, "Can not start Xvfb, stop test execution"
raise NotImplementedError, "Can not start Xvfb, stop test execution"
def run(self):
for display_try in self.display_list:
......@@ -294,20 +294,12 @@ class FunctionalTestRunner:
while self.getStatus() is None:
time.sleep(10)
if (time.time() - start) > float(self.timeout):
self.verboseErrorLog()
raise TimeoutError("Test took more them %s seconds" % self.timeout)
finally:
self.browser.quit()
xvfb.quit()
def verboseErrorLog(self, size=10):
for entry in self.portal.error_log.getLogEntries()[:size]:
print "="*20
print "ERROR ID : %s" % entry["id"]
print "TRACEBACK :"
print entry["tb_text"]
def processResult(self):
file_content = self.getStatus().encode("utf-8", "replace")
sucess_amount = TEST_PASS_RE.search(file_content).group(1)
......@@ -362,6 +354,21 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
# XXX Memcached is missing
# XXX Persistent cache setup is missing
def _verboseErrorLog(self, size=10):
for entry in self.portal.error_log.getLogEntries()[:size]:
print "="*20
print "ERROR ID : %s" % entry["id"]
print "TRACEBACK :"
print entry["tb_text"]
def _hasActivityFailure(self):
""" Return True if the portal has any Activity Failure
"""
for m in self.portal.portal_activities.getMessageList():
if m.processing_node < -1:
return True
return False
def testFunctionalTestRunner(self):
# first of all, abort to get rid of the mysql participation inn this
# transaction
......@@ -374,7 +381,16 @@ class ERP5TypeFunctionalTestCase(ERP5TypeTestCase):
debug = self.foreground or os.environ.get("erp5_debug_mode")
self.runner.test(debug=debug)
detail, success, failure, error_title_list = self.runner.processResult()
try:
detail, success, failure, error_title_list = self.runner.processResult()
except TimeoutError, e:
self._verboseErrorLog(20)
raise TimeoutError(e)
# In case of failure, verbose the error_log entries in order to collect
# appropriated information to debug the system.
if self._hasActivityFailure():
self._verboseErrorLog(20)
self.logMessage("-" * 79)
total = success + failure
......
......@@ -34,9 +34,32 @@ import transaction
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import \
ERP5TypeFunctionalTestCase
BASE_REMOTE_SELENIUM_TEST_URL_LIST = [
"http://www.erp5.com/user-Howto.Create.Person-HTML5/TestPage_viewSeleniumTest",
"http://www.erp5.com/user-Howto.Create.Organisations-HTML5/TestPage_viewSeleniumTest",
"http://www.erp5.com/user-Howto.Link.Persons.and.Organisations-HTML5/TestPage_viewSeleniumTest",
"http://www.erp5.com/user-Howto.Create.Campaigns-HTML5/TestPage_viewSeleniumTest",
"http://www.erp5.com/user-Howto.Create.Outgoing.Events-HTML5/TestPage_viewSeleniumTest",
"http://www.erp5.com/user-Howto.Post.Outgoing.Events-HTML5/TestPage_viewSeleniumTest",
# DO NOT CONTAINS TEST YET "http://www.erp5.com/user-Howto.Manage.Support.Request-HTML5/TestPage_viewSeleniumTest",
"http://www.erp5.com/user-Howto.Process.Incoming.Events-TESTONLY/TestPage_viewSeleniumTest",
# Part 2 - PDM, Trade and simulation related tests
"http://www.erp5.com/user-Howto.Create.and.Manage.Products-HTML5/TestPage_viewSeleniumTest",
# DO NOT CONTAINS TEST YET "http://www.erp5.com/user-Howto.Create.Trade.Conditions-HTML5/TestPage_viewSeleniumTest",
# The test bellow should be splited because it handle several tutorials at
# once which is what it is wanted.
"http://www.erp5.com/user-Howto.Create.Sale.Orders-TESTONLY/TestPage_viewSeleniumTest",
# Extra Tests, Additional Tests not yet related to any previous tutorial
"http://www.erp5.com/user-HowTo.Use.FullText.Search-TESTONLY/TestPage_viewSeleniumTest",
"http://www.erp5.com/user-HowTo.Change.Language-TESTONLY/TestPage_viewSeleniumTest"
]
class TestZeleniumStandaloneUserTutorial(ERP5TypeFunctionalTestCase):
run_only = "user_tutorial_zuite"
remote_code_url_list = BASE_REMOTE_SELENIUM_TEST_URL_LIST
def getBusinessTemplateList(self):
"""
......
from Products.PortalTransforms.libtransforms.imagemagick_transform import ImageMagickTransforms
class image_to_svg(ImageMagickTransforms):
__name__ = "image_to_svg"
inputs = ('image/*', )
output = 'image/svg+xml'
format = 'svg'
def register():
return image_to_svg()
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