Commit 09884eaa authored by Romain Courteaud's avatar Romain Courteaud

Check that translated columns can be sorted in the UI.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33640 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7578d2a7
<?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 Quick Translated Sort</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Quick Translated Sort</td></tr>\n
</thead><tbody>\n
<!-- XXX Mobile listbox columns label are not clickable for quick sorting\n
So this test is skipped -->\n
<tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
<tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/init" />\n
\n
\n
<tr>\n
<td>open</td>\n
<td tal:content="string: ${here/portal_url}/portal_skins/erp5_ui_test/Base_createUITestLanguages"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>New Languages Added</td>\n
<td></td>\n
</tr>\n
\n
<tal:block tal:repeat="param_dict python: [\n
{\'message\': \'Draft\', \'translation\': \'Vraft\', \'language\': \'xh\'},\n
{\'message\': \'Validated\', \'translation\': \'Dalidated\', \'language\': \'xh\'},\n
]">\n
<tr tal:define="dummy python: param_dict.update({\'root\': here.portal_url()})">\n
<td>open</td>\n
<td tal:content="python: \'%(root)s/portal_skins/erp5_ui_test/Base_addUITestTranslation?message=%(message)s&translation=%(translation)s&language=%(language)s\' % param_dict"></td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td tal:content="python: \'Translation of %(message)s updated\' % param_dict"/>\n
<td></td>\n
</tr>\n
</tal:block>\n
\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 tal:content="string:${here/portal_url}/foo_module/1/Foo_validate">Validate the first document</td>\n
<td></td>\n
</tr> \n
<tr>\n
<td>assertTextPresent</td>\n
<td>Validated</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_columns:list=translated_simulation_state_title</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Set Successfully.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_language</td>\n
<td>label=English</td>\n
</tr> \n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/img[@alt="Ascending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/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[2]</td>\n
<td>Draft</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>Validated</td>\n
</tr>\n
<tr>\n
<td>verifyElementNotPresent</td>\n
<td>id=listbox_data_line_2</td>\n
<td></td>\n
</tr>\n
<!-- click the state -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/img[@alt="Ascending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/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[2]</td>\n
<td>Draft</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>Validated</td>\n
</tr>\n
<!-- click the state again -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/img[@alt="Ascending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/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[2]</td>\n
<td>Validated</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>Draft</td>\n
</tr>\n
\n
\n
\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?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 tal:content="string:${here/portal_url}/foo_module/1/Foo_validate">Validate the first document</td>\n
<td></td>\n
</tr> \n
<tr>\n
<td>assertTextPresent</td>\n
<td>Validated</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_columns:list=translated_simulation_state_title</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>selectAndWait</td>\n
<td>select_language</td>\n
<td>label=Xhosa</td>\n
</tr> \n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/img[@alt="Ascending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/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[2]</td>\n
<td>Vraft</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>Dalidated</td>\n
</tr>\n
<tr>\n
<td>verifyElementNotPresent</td>\n
<td>id=listbox_data_line_2</td>\n
<td></td>\n
</tr>\n
<!-- click the state -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/img[@alt="Ascending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/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[2]</td>\n
<td>Dalidated</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>Vraft</td>\n
</tr>\n
<!-- click the state again -->\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//button[@name=\'setSelectionQuickSortOrder:method\' and @value=\'listbox.translated_simulation_state_title\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementNotPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/img[@alt="Ascending Display"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertElementPresent</td>\n
<td>//tr[@id="listbox_label_line"]/td[2]/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[2]</td>\n
<td>Vraft</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tr[@id="listbox_data_line_1"]/td[2]</td>\n
<td>Dalidated</td>\n
</tr>\n
</tal:block>\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>testQuickTranslationSort</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
538 540
\ 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