Commit 034508b3 authored by Rafael Monnerat's avatar Rafael Monnerat

Added test for block height at Planning Box.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17774 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 427d1eb7
<?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 Planning Box Field </title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test PlanningBox Data Info</td></tr>\n
</thead><tbody>\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=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}/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
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_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/ListBoxZuite_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/0/Foo_editObjectLineDates</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Modified 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
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewPlanningBox/planning_box/PlanningBox_setPropertyList?height_method=Foo_getHeightFromQuantity</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/0/view</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//img[@alt=\'Planning\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextNotPresent</td>\n
<td>PlanningBoxError</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//img[@name=\'JumpToCurrentDay\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_1"]</td>\n
<td>[+] Title 0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_2"]</td>\n
<td>[+] Title 1</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_1_Activity_1_Block_1"]/div[@class="planning_box_center"]</td>\n
<td>Title 0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_2_Activity_1_Block_1"]/div[@class="planning_box_center"]</td>\n
<td>Title 1</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_1_Activity_1_Block_1"]/a[@class="planning_box_topright"]</td>\n
<td>Title 0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_2_Activity_1_Block_1"]/a[@class="planning_box_topright"]</td>\n
<td>Title 1</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_1_Activity_1_Block_1"]/a[@class="planning_box_topleft"]</td>\n
<td>Title 0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_2_Activity_1_Block_1"]/a[@class="planning_box_topleft"]</td>\n
<td>Title 1</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_1_Activity_1_Block_1"]/a[@class="planning_box_botright"]</td>\n
<td>Title 0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_2_Activity_1_Block_1"]/a[@class="planning_box_botright"]</td>\n
<td>Title 1</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_1_Activity_1_Block_1"]/a[@class="planning_box_botleft"]</td>\n
<td>Title 0</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//div[@id="Group_2_Activity_1_Block_1"]/a[@class="planning_box_botleft"]</td>\n
<td>Title 1</td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewPlanningBox/planning_box/PlanningBox_setPropertyList</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Set Successfully.</td>\n
<td></td>\n
</tr>\n
</tbody></table>\n
</body>\n
</html>\n
\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>testPlanningBoxBlockHeight</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>q = context.getQuantity()\n
max_q = 0.0\n
for x in context.getParentValue().contentValues():\n
max_q += x.getTotalQuantity()\n
\n
try:\n
return q/max_q\n
except ZeroDivisionError:\n
# This means that the Quantity and the max quantity are 0\n
return 1.0\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>_getattr_</string>
<string>context</string>
<string>q</string>
<string>max_q</string>
<string>_getiter_</string>
<string>x</string>
<string>_inplacevar_</string>
<string>ZeroDivisionError</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>Foo_getHeightFromQuantity</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
280
\ No newline at end of file
281
\ 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