Commit 74e40be9 authored by Romain Courteaud's avatar Romain Courteaud

Forgot to commit the form and script in r18896.

Finish tests.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18914 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 72d94702
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>select_bar</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>50.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Select Bar</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Foo_selectBarDialog?reset:int=1</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -184,7 +184,24 @@
\t<td>id=listbox_next_page</td>\n
\t<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/verify_dialog" />\n
\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Useless Field In Bar Selection Dialog</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>field_your_extra_text</td>\n
<td>Hardcoded text value</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>id=listbox_item_number</td>\n
\t<td> - 1 item(s) selected</td>\n
</tr>\n
<!--tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/verify_dialog" /-->\n
\n
<tr>\n
\t<td>verifySelected</td>\n
\t<td>id=listbox_page_selection</td>\n
......@@ -271,7 +288,22 @@
\t<td>id=listbox_page_selection</td>\n
\t<td>4 of 4</td>\n
</tr>\n
<tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/verify_dialog" />\n
<!--tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/verify_dialog" /-->\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Useless Field In Bar Selection Dialog</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>field_your_extra_text</td>\n
<td>Hardcoded text value</td>\n
</tr>\n
<tr>\n
\t<td>verifyText</td>\n
\t<td>id=listbox_item_number</td>\n
\t<td> - 1 item(s) selected</td>\n
</tr>\n
<tr>\n
\t<td>verifySelected</td>\n
\t<td>id=listbox_page_selection</td>\n
......@@ -317,32 +349,32 @@
<tr>\n
\t<td>verifySelected</td>\n
\t<td>id=listbox_page_selection</td>\n
\t<td>3 of 3</td>\n
\t<td>1 of 3</td>\n
</tr>\n
<tr>\n
\t<td>verifyElementNotPresent</td>\n
\t<td>verifyElementPresent</td>\n
\t<td>id=listbox_next_page</td>\n
\t<td></td>\n
</tr>\n
<tr>\n
\t<td>verifyElementPresent</td>\n
\t<td>verifyElementNotPresent</td>\n
\t<td>id=listbox_previous_page</td>\n
\t<td></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>6</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>7</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>8</td>\n
\t<td>2</td>\n
</tr>\n
<tr>\n
\t<td>verifyElementNotPresent</td>\n
......
......@@ -61,19 +61,35 @@
<tr>\n
\t<td>type</td>\n
\t<td>//tr[@id="listbox_search_line"]/td[2]//input</td>\n
\t<td>0</td>\n
\t<td>1</td>\n
</tr>\n
<tr>\n
\t<td>clickAndWait</td>\n
\t<td>Base_doSelect:method</td>\n
\t<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/verify_dialog" />\n
\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Useless Field In Bar Selection Dialog</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>field_your_extra_text</td>\n
<td>Hardcoded text value</td>\n
</tr>\n
<tr>\n
\t<td>verifyValue</td>\n
\t<td>//tr[@id="listbox_data_line_0"]/td[1]//input</td>\n
\t<td>on</td>\n
</tr>\n
\n
\n
<tr>\n
\t<td>verifyValue</td>\n
\t<td>//tr[@id="listbox_search_line"]/td[2]//input</td>\n
\t<td>0</td>\n
\t<td>1</td>\n
</tr>\n
\n
<tr>\n
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>OFS.Folder</string>
<string>Folder</string>
</tuple>
<none/>
<global name="Folder" module="OFS.Folder"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Foo_selectBar</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>your_extra_text</string>
<string>your_useless_field</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Foo_selectBarDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Foo_selectBarDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Select Bar</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string>Foo_updateBarDialogSelection</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>__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>_owner</string> </key>
<value>
<none/>
</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
\n
<tal:block metal:define-macro="init">\n
<tr>\n
<td>store</td>\n
<td tal:content="python: \'/\' + here.getPortalObject().getId()">erp5</td>\n
<td>base_url</td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/ListBoxDialogModeZuite_reset</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>${base_url}/foo_module/ListBoxZuite_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}/foo_module/FooModule_createObjects?num:int=1</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}/bar_module/FooModule_createObjects?num:int=3;portal_type=Bar</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/ListBoxZuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
\n
\n
<tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/goto_dialog" />\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
<tr>\n
<td>verifyElementNotPresent</td>\n
<td>id=listbox_data_line_3</td>\n
<td></td>\n
</tr>\n
\n
\n
</tal:block>\n
\n
<tal:block metal:define-macro="goto_dialog">\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/view</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>Select Bar</td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Useless Field In Bar Selection Dialog</td>\n
<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/enter_dialog_value" />\n
</tal:block>\n
\n
<tal:block metal:define-macro="enter_dialog_value">\n
<tr>\n
<td>type</td>\n
<td>field_your_extra_text</td>\n
<td>Hardcoded text value</td>\n
</tr>\n
\n
\n
<tr>\n
<td>click</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[1]/input</td>\n
<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/verify_dialog" />\n
\n
</tal:block>\n
\n
\n
<tal:block metal:define-macro="verify_dialog">\n
\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Useless Field In Bar Selection Dialog</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>field_your_extra_text</td>\n
<td>Hardcoded text value</td>\n
</tr>\n
<tr>\n
\t<td>verifyValue</td>\n
\t<td>//tr[@id="listbox_data_line_1"]/td[1]//input</td>\n
\t<td>on</td>\n
</tr>\n
\n
</tal:block>\n
\n
\n
</tal:block>\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>ListBoxDialogModeZuite_CommonTemplate</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># Reset everything for the test.\n
\n
# Clean up the contents.\n
for name in (\'foo_module\', \'bar_module\'):\n
module = getattr(context, name)\n
module.manage_delObjects(list(module.objectIds()))\n
module.setLastId(1)\n
\n
# Reset the foo module listbox\n
form = context.Foo_selectBarDialog\n
\n
default_columns = \'\\n\'.join(( \'id | ID\'\n
, \'title | Title\'\n
, \'quantity | Quantity\'\n
))\n
result = form.listbox.ListBox_setPropertyList( \n
field_title = \'Bars\'\n
, field_columns = default_columns\n
, field_sort = \'id\'\n
, field_editable_columns = default_columns\n
, field_list_method = \'portal_catalog\'\n
, field_count_method = \'\'\n
, field_selection_name = \'foo_bar_selection\'\n
, field_portal_types = \'Bar\'\n
, field_search = \'checked\'\n
, field_select = \'checked\'\n
, field_list_action = \'Folder_viewContentList\'\n
, field_editable = \'\'\n
)\n
\n
\n
# Reset the selection.\n
def resetSelection(selection_name):\n
selection_tool = context.portal_selections\n
if selection_tool.getSelectionFor(selection_name) is not None:\n
selection_tool.setSelectionToAll(selection_name, reset_domain_tree=True, reset_report_tree=True)\n
selection_tool.setSelectionSortOrder(selection_name, [])\n
selection_tool.setSelectionColumns(selection_name, [])\n
selection_tool.setSelectionStats(selection_name, [])\n
selection_tool.setListboxDisplayMode(context.REQUEST, \'FlatListMode\', selection_name)\n
selection_tool.setSelectionParamsFor(selection_name, dict())\n
\n
resetSelection(\'foo_selection\')\n
resetSelection(\'foo_line_selection\')\n
resetSelection(\'bar_selection\')\n
resetSelection(\'foo_bar_selection\')\n
\n
\n
pref = getattr(context.portal_preferences, "erp5_ui_test_preference", None)\n
if pref is None:\n
pref = context.portal_preferences.newContent(id="erp5_ui_test_preference")\n
pref.setPreferredListboxListModeLineCount(10)\n
pref.enable()\n
\n
return \'Reset 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></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>_getiter_</string>
<string>name</string>
<string>getattr</string>
<string>context</string>
<string>module</string>
<string>_getattr_</string>
<string>list</string>
<string>form</string>
<string>default_columns</string>
<string>result</string>
<string>resetSelection</string>
<string>None</string>
<string>pref</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>ListBoxDialogModeZuite_reset</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
319
\ No newline at end of file
322
\ No newline at end of file
......@@ -9,6 +9,7 @@ Foo Module | search
Foo Module | sort_on
Foo Module | view
Foo | list
Foo | select_bar
Foo | view
Foo | view_duration_field
Foo | view_planning
......
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