Commit 15c2a24d authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

2009-03-19 Mohamadou

* add functional tests for erp5_ooo_import .

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26095 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 66afc0bb
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Zuite" module="Products.Zelenium.zuite"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>filename_glob</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>filesystem_path</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ooo_import_zuite</string> </value>
</item>
<item>
<key> <string>test_case_metatypes</string> </key>
<value>
<tuple>
<string>File</string>
<string>Page Template</string>
</tuple>
</value>
</item>
<item>
<key> <string>testsuite_name</string> </key>
<value> <string>Testing the OOo import</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>
<tuple>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
<tuple/>
</tuple>
</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> <string 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>Test OOo Importing</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test OOo Importing </td></tr>\n
</thead><tbody>\n
<!-- <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/init" /> -->\n
<tr>\n
<td>store</td>\n
<td tal:content="python: \'/\' + here.getPortalObject().getId()">erp5</td>\n
<td>base_url</td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/OOoImportZuite_reset</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Reset Successfully.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/OOoImportZuite_importFile</td>\n
<td></td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>select</td>\n
<td>field_listbox_portal_type_property_list_new_0000001</td>\n
<td>title</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>field_listbox_portal_type_property_list_new_0000002</td>\n
<td>quantity</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>field_listbox_portal_type_property_list_new_0000003</td>\n
<td>description</td>\n
</tr>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>dialog_submit_button</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>OpenOffice document importing report.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>id=listbox_title</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyElementPresent</td>\n
<td>id=listbox_data_line_0</td>\n
<td></td>\n
</tr>\n
<tr> \n
<td>verifyElementPresent</td> \n
<td>id=listbox_data_line_1</td> \n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyElementPresent</td>\n
<td>id=listbox_data_line_2</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>id=listbox_record_number</td>\n
<td>101 record(s)</td>\n
</tr>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Report\']</td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>dialog_submit_button</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<tr>\n
<td>verifyText</td>\n
<td>id=listbox_record_number</td>\n
<td>101 record(s)</td>\n
</tr>\n
<tr>\n
<td>verifyElementPresent</td>\n
<td>id=listbox_data_line_0</td>\n
<td></td>\n
</tr>\n
<tr> \n
<td>verifyElementPresent</td> \n
<td>id=listbox_data_line_1</td> \n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyElementPresent</td>\n
<td>id=listbox_data_line_2</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[1]</td>\n
<td>Object created successfully - Type: Foo</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[1]</td>\n
<td>Object created successfully - Type: Foo</td>\n
</tr>\n
</tbody></table>\n
</body>\n
</html>\n
\n
]]></string> </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>testOOoImport</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>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
This script is an experimental version of what should be a generic OpenOffice importer,\n
which is a collection of scripts and UI to import lots of objects to ERP5\n
from a spreadsheet. The idea is to let the user map each spreadsheet column with\n
one portal type property.\n
"""\n
module = context.foo_module\n
\n
import_file = context.restrictedTraverse(\'foo_import_data_list\').data\n
return module.Base_importFile(import_file=import_file)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>module</string>
<string>import_file</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>OOoImportZuite_importFile</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Reset all datas \n
"""\n
module = context.getPortalObject().foo_module\n
\n
dummy_foo_list = module.contentValues(portal_type = \'Foo\')\n
\n
for foo in dummy_foo_list:\n
module.manage_delObjects(foo.getId())\n
\n
return "Reset Successfully."\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>module</string>
<string>dummy_foo_list</string>
<string>_getiter_</string>
<string>foo</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>OOoImportZuite_reset</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2009-03-19 Mohamadou
* add functional tests for erp5_ooo_import .
2008-10-01 fabien
* redefine Selenium.prototype.doType function in user-extensions.js. This is made to be able to test file upload.
* move all things used by other ui_test in erp5_ui_test_core framework
......
415
\ No newline at end of file
416
\ No newline at end of file
......@@ -27,6 +27,8 @@ portal_tests/listbox_zuite
portal_tests/listbox_zuite/**
portal_tests/matrixbox_zuite
portal_tests/matrixbox_zuite/**
portal_tests/ooo_import_zuite
portal_tests/ooo_import_zuite/**
portal_tests/page_templates_zuite
portal_tests/page_templates_zuite/**
portal_tests/planning_box_field_zuite
......
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