Commit 34539573 authored by Jérome Perrin's avatar Jérome Perrin

Tests that the jump dialog uses columns and title from the relation field configuration

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31637 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c37850c3
<?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 Relation Field Jump</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Relation Field Jump</td></tr>\n
</thead>\n
<tbody tal:define="is_selenium_0_8 python:here.getPortalObject().portal_tests.getZeleniumVersion() > \'Zelenium-0.8\'">\n
<tal:block metal:use-macro="here/RelationFieldZuite_CommonTemplate/macros/init" />\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=2</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
<!-- jump when there is exactly one relation, we jump directly to the object\n
-->\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Base_viewMetadata</td>\n
<td></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>field_my_category_list</td>\n
<td>bar_category/foo_module/1</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Save\']</td>\n
<td></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewRelationField</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//fieldset[@id=\'fieldset_left\']/div[4]/div/a/img[@alt="jump"]</td>\n
<td></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertAbsoluteLocation</td>\n
<td tal:content="string:glob:${here/portal_url}/foo_module/1/view"/>\n
<td></td>\n
<td></td>\n
</tr>\n
\n
<!-- jump when there are more than one relation, then an intermediate listbox\n
will be shown\n
-->\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Base_viewMetadata</td>\n
<td></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>field_my_category_list</td>\n
<tal:block tal:condition="is_selenium_0_8">\n
<td>bar_category/foo_module/0<br />bar_category/foo_module/1</td>\n
</tal:block>\n
<tal:block tal:condition="not:is_selenium_0_8">\n
<td>bar_category/foo_module/0\n
bar_category/foo_module/1</td>\n
</tal:block>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Save\']</td>\n
<td></td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewRelationField</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//fieldset[@id=\'fieldset_left\']/div[4]/div/a/img[@alt="jump"]</td>\n
<td></td>\n
<td></td>\n
</tr>\n
\n
<!-- this is the jump listbox -->\n
<tr>\n
<td>verifyText</td>\n
<td>listbox_record_number</td>\n
<td>2 records</td>\n
</tr>\n
\n
<!-- the title of the listbox is the title of the relation field -->\n
<tr>\n
<td>verifyText</td>\n
<td>id=listbox_title</td>\n
<td>exact:Bar Titles:</td>\n
</tr>\n
\n
<!-- the columns are the one defined in the relation field. -->\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_label_line"]/td[1]</td>\n
<td>Title</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]</td>\n
<td>Quantity</td>\n
</tr>\n
\n
<!-- it has links to the related objects -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[1]/a</td>\n
<td></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertAbsoluteLocation</td>\n
<td tal:content="string:glob:${here/portal_url}/foo_module/1/view"/>\n
<td></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>testRelationFieldJump</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -397,7 +397,16 @@
<item>
<key> <string>columns</string> </key>
<value>
<list/>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>quantity</string>
<string>Quantity</string>
</tuple>
</list>
</value>
</item>
<item>
......
521
\ No newline at end of file
522
\ 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