Commit 97372377 authored by Romain Courteaud's avatar Romain Courteaud

Add a new test for listbox, which defines the expected behaviour of the domain...

Add a new test for listbox, which defines the expected behaviour of the domain tree when the selection domain is not available anymore.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20077 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bcd30328
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="Zuite" module="Products.Zelenium.zuite"/>
<string>Products.Zelenium.zuite</string> <tuple/>
<string>Zuite</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
<?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>__ac_local_roles__</string> </key>
<value>
<none/>
</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_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 Obsolete Tree</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Dynamic Domain Tree</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/init" />\n
<tr>\n
\t<td>open</td>\n
\t<td>${base_url}/foo_module/FooModule_createObjects</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>assertTextPresent</td>\n
\t<td>Created Successfully.</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>open</td>\n
\t<td>${base_url}/foo_module/ListBoxZuite_waitForActivities</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>assertTextPresent</td>\n
\t<td>Done.</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>open</td>\n
\t<td>${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_domain_tree=checked;field_domain_root_list=parent_domain%7CParent</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>assertTextPresent</td>\n
\t<td>Set Successfully.</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>open</td>\n
\t<td>${base_url}/foo_module/view</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>assertElementNotPresent</td>\n
\t<td>domain_root_url</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>clickAndWait</td>\n
\t<td>id=listbox_domain_tree_mode</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>verifySelected</td>\n
\t<td>domain_root_url</td>\n
\t<td>Parent</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a</td>\n
\t<td>+ Title 0</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//table[@id="listbox_domain_tree_table"]//tr[2]//a</td>\n
\t<td>+ Title 1</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>id=listbox_record_number</td>\n
\t<td>10 record(s)</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//tr[@id="listbox_data_line_0"]/td[2]</td>\n
\t<td>0</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
\t<td>1</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//tr[@id="listbox_data_line_2"]/td[2]</td>\n
\t<td>2</td>\n
</tr>\n
<!-- Click on + Title 0 -->\n
<tr>\n
\t<td>clickAndWait</td>\n
\t<td>link=+ Title 0</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>verifySelected</td>\n
\t<td>domain_root_url</td>\n
\t<td>Parent</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a</td>\n
\t<td>- Title 0</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//table[@id="listbox_domain_tree_table"]//tr[2]//a</td>\n
\t<td>+ Title 1</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//table[@id="listbox_domain_tree_table"]//tr[3]//a</td>\n
\t<td>+ Title 2</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//table[@id="listbox_domain_tree_table"]//tr[4]//a</td>\n
\t<td>+ Title 3</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>id=listbox_record_number</td>\n
\t<td>1 record(s)</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//tr[@id="listbox_data_line_0"]/td[2]</td>\n
\t<td>0</td>\n
</tr>\n
\n
<!-- Delete Title 0 -->\n
<tr>\n
\t<td>open</td>\n
\t<td>${base_url}/foo_module/FooModule_viewFooList/FooModule_deleteObjectList</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>assertTextPresent</td>\n
\t<td>Deleted Successfully.</td>\n
\t<td></td>\n
</tr>\n
\n
<!-- Open Foo Module view -->\n
<tr>\n
\t<td>open</td>\n
\t<td>${base_url}/foo_module/view</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//table[@id="listbox_domain_tree_table"]//tr[1]//a</td>\n
\t<td>+ Title 1</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//table[@id="listbox_domain_tree_table"]//tr[2]//a</td>\n
\t<td>+ Title 2</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>id=listbox_record_number</td>\n
\t<td>9 record(s)</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//tr[@id="listbox_data_line_0"]/td[2]</td>\n
\t<td>1</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
\t<td>2</td>\n
</tr>\n
\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>testDomainTreeObsoleteValue</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>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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>from DateTime import DateTime\n
\n
for i in range(start, start + num):\n
context.deleteContent(str(i))\n
\n
return \'Deleted Successfully.\'\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>start=0, num=1</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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>start</string>
<string>num</string>
<string>DateTime</string>
<string>_getiter_</string>
<string>range</string>
<string>i</string>
<string>_getattr_</string>
<string>context</string>
<string>str</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<int>0</int>
<int>1</int>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>FooModule_deleteObjectList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
333 334
\ No newline at end of file \ 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