Commit 51a43113 authored by Aurel's avatar Aurel

test that complex domain tree (category+category) works

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32788 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a41fbfc2
<?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 Domain Tree</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Complex Domain Tree</td></tr>\n
</thead><tbody>\n
<!-- Domain tree are not avalaible in mobile skin \n
So this part is skipped -->\n
<tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
\n
<tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/init" />\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?big_category_related=True</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created 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/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked;field_domain_root_list=foo_category/foo_big_category%7CFoo%20and%20Big%20Category</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Set Successfully.</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>assertElementNotPresent</td>\n
<td>domain_root_url</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>id=listbox_domain_tree_mode</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>domain_root_url</td>\n
<td>Foo and Big Category</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a[@class="tree_closed"]</td>\n
<td>a</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[2]//a[@class="tree_closed"]</td>\n
<td>b</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>id=listbox_record_number</td>\n
<td>10 records</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[2]</td>\n
<td>0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>1</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_2"]/td[2]</td>\n
<td>2</td>\n
</tr>\n
<!-- Click on + a -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a[@class="tree_closed"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>domain_root_url</td>\n
<td>Foo and Big Category</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a[@class="tree_open"]</td>\n
<td>a</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[2]//a[@class="tree_closed"]</td>\n
<td>c1</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[3]//a[@class="tree_closed"]</td>\n
<td>c10</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[4]//a[@class="tree_closed"]</td>\n
<td>c11</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[26]//a[@class="tree_closed"]</td>\n
<td>b</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>id=listbox_record_number</td>\n
<td>7 records</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[2]</td>\n
<td>0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>2</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_2"]/td[2]</td>\n
<td>3</td>\n
</tr>\n
<!-- Click on + c1 -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[2]//a[@class="tree_closed"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>domain_root_url</td>\n
<td>Foo and Big Category</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a[@class="tree_open"]</td>\n
<td>a</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[2]//a[@class="tree_open"]</td>\n
<td>c1</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[3]//a[@class="tree_closed"]</td>\n
<td>c10</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[4]//a[@class="tree_closed"]</td>\n
<td>c11</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[26]//a[@class="tree_closed"]</td>\n
<td>b</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>id=listbox_record_number</td>\n
<td>3 records</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[2]</td>\n
<td>0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>4</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_2"]/td[2]</td>\n
<td>8</td>\n
</tr>\n
<!-- Click on - a -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a[@class="tree_open"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>domain_root_url</td>\n
<td>Foo and Big Category</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a[@class="tree_closed"]</td>\n
<td>a</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[2]//a[@class="tree_closed"]</td>\n
<td>b</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>id=listbox_record_number</td>\n
<td>10 records</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[2]</td>\n
<td>0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>1</td>\n
</tr>\n
<!-- Reset -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>Folder_show:method</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifySelected</td>\n
<td>domain_root_url</td>\n
<td>Foo and Big Category</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a[@class="tree_closed"]</td>\n
<td>a</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table[@id="listbox_domain_tree_table"]//tr[2]//a[@class="tree_closed"]</td>\n
<td>b</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>id=listbox_record_number</td>\n
<td>10 records</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_0"]/td[2]</td>\n
<td>0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>1</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_2"]/td[2]</td>\n
<td>2</td>\n
</tr>\n
</tal:block>\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>testComplexDomainTree</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -56,6 +56,7 @@
<value> <string>"""Create objects with given parameters"""\n
from DateTime import DateTime\n
category_list = (\'a\', \'b\', \'a/a1\', \'a/a2\')\n
big_category_list = (\'c1\', \'c10\', \'c2\', \'c20\', \'c3\', \'c4\')\n
\n
for i in range(start, start + num):\n
category = category_list[i % len(category_list)]\n
......@@ -65,6 +66,9 @@ for i in range(start, start + num):\n
foo.setStartDate(DateTime(i, i, i))\n
if create_line:\n
foo.newContent()\n
if big_category_related:\n
big_category = big_category_list[i %len(category_list)]\n
foo.setFooBigCategory(big_category)\n
\n
return \'Created Successfully.\'\n
</string> </value>
......@@ -77,7 +81,7 @@ return \'Created Successfully.\'\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>start=0, num=10, set_dates=0, portal_type=\'Foo\', create_line=0</string> </value>
<value> <string>start=0, num=10, set_dates=0, portal_type=\'Foo\', create_line=0, big_category_related=False</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -97,7 +101,7 @@ return \'Created Successfully.\'\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>5</int> </value>
<value> <int>6</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -108,8 +112,10 @@ return \'Created Successfully.\'\n
<string>set_dates</string>
<string>portal_type</string>
<string>create_line</string>
<string>big_category_related</string>
<string>DateTime</string>
<string>category_list</string>
<string>big_category_list</string>
<string>_getiter_</string>
<string>range</string>
<string>i</string>
......@@ -121,6 +127,7 @@ return \'Created Successfully.\'\n
<string>str</string>
<string>float</string>
<string>foo</string>
<string>big_category</string>
</tuple>
</value>
</item>
......@@ -138,6 +145,7 @@ return \'Created Successfully.\'\n
<int>0</int>
<string>Foo</string>
<int>0</int>
<int>0</int>
</tuple>
</value>
</item>
......
529
\ No newline at end of file
530
\ 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