Commit 3003b7bb authored by Romain Courteaud's avatar Romain Courteaud

Check that the 'Change State' action available on modules correctly handle...

Check that the 'Change State' action available on modules correctly handle domain selection: it should only modify objects matching the current domain.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31315 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4f2dcac6
<?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 Folder Workflow Action 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 Folder Workflow Action Domain Tree</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=2&amp;start: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
<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%7CFoo%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/1/getSimulationState</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>draft</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td tal:content="string: ${here/portal_url}/foo_module/view">/erp5/foo_module/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>3 records</td>\n
</tr>\n
\n
<!-- Select elements by the domain tree -->\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 Category</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>3 records</td>\n
</tr>\n
\n
<!-- Click on the \'a\' domain tree -->\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>assertText</td>\n
<td>listbox_record_number</td>\n
<td>2 records</td>\n
</tr>\n
\n
<!-- Change Stat of this element list -->\n
<tr>\n
<td>selectAndWait</td>\n
<td>select_action</td>\n
<td>Change State</td>\n
</tr>\n
\n
<!-- we have a listbox with 1 line for 2 Draft Foos -->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>1 records</td>\n
</tr>\n
<!-- It\'s the number of element which will be validate -->\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[1]/a</td>\n
<td>2</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[2]/a</td>\n
<td>Foo</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[3]/a</td>\n
<td>Draft</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[4]/a</td>\n
<td>Foo Workflow</td>\n
</tr>\n
<tr>\n
<td>select</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[5]/select</td>\n
<td>label=Validate Action</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<td>field_your_comment</td>\n
<td>Comment !</td>\n
</tr>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>Base_callDialogMethod:method</td>\n
<td></td>\n
</tr>\n
\n
<!-- Now we are on a listbox showing *all* documents we are about to process.\n
Note that if a document cannot be processed, it\'s not shown in this list\n
-->\n
<!-- List of element which will validate -->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_record_number</td>\n
<td>2 records</td>\n
</tr>\n
<!-- This listbox is a proxy to the module listbox, so it has the same title\n
and the same columns. -->\n
<tr>\n
<td>assertText</td>\n
<td>listbox_title</td>\n
<td>exact:Foos:</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[2]</td>\n
<td>Title 2</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_0\']/td[4]</td>\n
<td>Validate Action</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[2]</td>\n
<td>Title 3</td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>//tr[@id=\'listbox_data_line_1\']/td[4]</td>\n
<td>Validate Action</td>\n
</tr>\n
<tr>\n
<td>assertValue</td>\n
<td>field_your_comment</td>\n
<td>Comment !</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>Base_callDialogMethod:method</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>assertPortalStatusMessage</td>\n
<td>Workflow modification in progress.</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
\n
<!-- We\'ll check everything else (workflow history, comments, etc) in a python\n
script. -->\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_testFolderWorkflowActionCheckWorkflowHistory</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertText</td>\n
<td>result</td>\n
<td>OK</td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/1/getSimulationState</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>draft</td>\n
<td></td>\n
</tr>\n
\n
\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>testFolderWorkflowActionDomainTree</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
510
\ No newline at end of file
513
\ 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