Commit 60b4d3e2 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Initial commit of erp5_project_ui_test.

* test if we can sort projects by start_date.
* test if we can search projects by start_date.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34455 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4f1eedc4
<?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>id</string> </key>
<value> <string>project_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Project Zuite</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>\n
<head><title>Test quick search on the project module.</title></head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="4">\n
Test quick search on the project module.\n
</td></tr>\n
</thead>\n
<tbody tal:define="init_method string:Zuite_createDataForProjectZuite;">\n
\n
<!-- Setup {{{ -->\n
<tal:block metal:use-macro="here/Zuite_CommonTemplateForProjectZuite/macros/init" />\n
<!-- }}} -->\n
\n
<tr>\n
<td>verifyEditable</td>\n
<td>//tr[@id="listbox_search_line"]/td[6]//input</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//tr[@id="listbox_search_line"]/td[6]//input</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//tr[@id="listbox_search_line"]/td[6]//input</td>\n
<td>&gt;==2010/02/01</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>Base_doSelect:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyEditable</td>\n
<td>//tr[@id="listbox_search_line"]/td[6]//input</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//tr[@id="listbox_search_line"]/td[6]//input</td>\n
<td>&gt;=2010/02/01</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[6]</td>\n
<td>2010/02/01</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[6]</td>\n
<td>2010/03/01</td>\n
</tr>\n
<tr>\n
<td>verifyElementNotPresent</td>\n
<td>id=listbox_data_line_2</td>\n
<td></td>\n
</tr>\n
\n
</tbody></table>\n
</body>\n
</html> \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>testSearchByStartDate</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>\n
<head><title>Test quick sort on the project module.</title></head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="4">\n
Test quick sort on the project module.\n
</td></tr>\n
</thead>\n
<tbody tal:define="init_method string:Zuite_createDataForProjectZuite;">\n
\n
<!-- Setup {{{ -->\n
<tal:block metal:use-macro="here/Zuite_CommonTemplateForProjectZuite/macros/init" />\n
<!-- }}} -->\n
\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @title=\'Begin Date\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @title=\'End Date\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @title=\'Begin Date\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @title=\'Begin Date\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[6]/img[@alt="Ascending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[6]/img[@alt="Descending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[6]</td>\n
<td>2010/01/01</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[6]</td>\n
<td>2010/02/01</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_2"]/td[6]</td>\n
<td>2010/03/01</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @title=\'Begin Date\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @title=\'Begin Date\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[6]/img[@alt="Ascending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[6]/img[@alt="Descending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[6]</td>\n
<td>2010/03/01</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[6]</td>\n
<td>2010/02/01</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_2"]/td[6]</td>\n
<td>2010/01/01</td>\n
</tr>\n
\n
</tbody></table>\n
</body>\n
</html> \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>testSortByStartDate</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="Folder" module="OFS.Folder"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_project_ui_test</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<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[
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<tal:block metal:define-macro="init"\n
tal:define="global is_selenium_0_8 python: here.getPortalObject().portal_tests.getZeleniumVersion() &gt; \'Zelenium-0.8\'">\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
<tr tal:condition="is_selenium_0_8">\n
<td>setTimeout</td>\n
<td>600000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/Zuite_deleteDataForProjectZuite</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Deleted Successfully.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/Zuite_resetForProjectZuite</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 tal:content="string:$${base_url}/project_module/$init_method" />\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Projects Created.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/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}/project_module/view</td>\n
<td></td>\n
</tr>\n
</tal:block>\n
</tal:block>
]]></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>Zuite_CommonTemplateForProjectZuite</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>project_module = context.getPortalObject().project_module\n
for month in (1, 2, 3):\n
project_module.newContent(portal_type=\'Project\',\n
id=\'test_project_%s\' % month,\n
title=\'test_project_%s\' % month,\n
start_date=DateTime(2010, month, 1))\n
return "Projects Created."\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>_getattr_</string>
<string>context</string>
<string>project_module</string>
<string>_getiter_</string>
<string>month</string>
<string>DateTime</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>Zuite_createDataForProjectZuite</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>project_module = context.getPortalObject().project_module\n
for month in (1, 2, 3):\n
try:\n
project_module.manage_delObjects(ids=[\'test_project_%s\' % month])\n
except:\n
pass\n
return "Deleted Successfully."\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>_getattr_</string>
<string>context</string>
<string>project_module</string>
<string>_getiter_</string>
<string>month</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>Zuite_deleteDataForProjectZuite</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># Reset selections\n
selection_tool = context.getPortalObject().portal_selections\n
selection_tool.setSelectionFor(\'project_module_selection\', None)\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></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>_getattr_</string>
<string>context</string>
<string>selection_tool</string>
<string>None</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>Zuite_resetForProjectZuite</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2010-04-12 kazuhiko
* test if we can sort projects by start_date.
* test if we can search projects by start_date.
\ No newline at end of file
Contains sample data as path items that may overwrite your existing data. Use at your own risks.
\ No newline at end of file
Copyright (c) 2010 Nexedi SA
\ No newline at end of file
erp5_project
erp5_ui_test
\ No newline at end of file
Functional test suites for erp5_project.
\ No newline at end of file
GPL
\ No newline at end of file
kazuhiko
\ No newline at end of file
1
\ No newline at end of file
portal_tests/project_zuite
portal_tests/project_zuite/**
\ No newline at end of file
erp5_project_ui_test
\ No newline at end of file
erp5_project_ui_test
\ No newline at end of file
0.1
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment