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
master allow_login_change allow_login_change_differentiate_id_and_login allow_login_change_wip arnau arnau-TM-components-products-migration arnau-TM-jabber-client-desktop-notifications arnau-kns arnau-kns-without-property-mapping arnau-merge arnau-poc arnau-real-time-inventory-accounting auto_extend_select_list autoflake backup_erp5_workflow bk_erp5ish_actions_tool bk_sqlcatalog boc-interaction-drop bt5_config cache callable-jupyter-storage catalog_filter catalog_fulltext catalog_fulltext_old cedric cedriclen cedriclen-eos certificate_authority cherry-pick-243c2f03 cherry-pick-4a8e045d cleanJSByJSLint clean_up_upgrader cleanup_acquisition_base_category cmfactivity-getcurrentnode-getserveraddress compact_title_no_reference credential_update_action datetimefield deferred_listbox delivery_item_barcode douglas_forum dream_distributor drop-legacy-simulation dsn-phase3 eos-dev erp5-component erp5-data-notebook erp5-forum erp5-preference erp5-release erp5-slapos-upgrade erp5-util-testing erp5-vifib erp5-vifib-cleanup erp5_calendar erp5_catalog erp5_catalog_final erp5_free_subscription erp5_workflow erp5testnode_max_timeout experiment/coding_style_test_suite feat/accounting_stop_using_getObject feat/accounting_translate_gap feat/olapy feat/pdm_content_translation feat/test_inventory_api_domain_selection feat/trade_shipment_report feat/wendelin-py-data feature/accounting-reports-stats feature/hal-actions-support feature/hal-support-update feature/jio-accounting-reports feature/jio-action-accounting feature/jio-selection-actions feature/jio-selection-actions-with-history feature/json-allows-all-jio-actions feature/renderjs-matrixbox feature/renderjs-ui-no-header feature/rjs-listbox-stats feature/rjs-mass-transition feature/rjs-print-action fix/consistency_check_alarm fix/full_text_script_conflict fix/login_validate_check_consistency fix/multiple_small_fixes_to_zodb_history_tab fix_system_processes_ownership for_testrunner_1 for_testrunner_2 for_testrunner_3 gabriel gabriel-fix-rounding-in-accounting-generation gabriel-fix-rounding-in-accounting-generation2 gadget-json-value heads/fix/notification_tool_unauthorized hotfix/accounting-test-timeout hotfix/callable_tool hotfix/field-keeps-request hotfix/jio-mass-transition hotfix/jio_view hotfix/pdm-test hotfix/rjs-accounting-tests hotfix/rjs-editability hotfix/rjs-form-less-invasive hotfix/rjs-formfields-padding hotfix/rjs-listbox-mutex hotfix/rjs-replace-query-with-uids hotfix/tests-cleanup http_cache_fix improve_default_caching_policy_manager initsite intentionaly_broken_cloudooo interaction-drop isDeletable item_tracking_graph_editor ivan jerome-bt-reference-doc jerome_graph_editor_renderjs jerome_new_style_solve_divergence jerome_user_preference_time_zone jio jm/form-action-guard joblib-activity js-ui kns kns-kr lazy_simulation_causality lignan lingnan listbox-generator listbox_url macros_fix mame mame-bt5-cleanup mame-erp5_project-cleanup mame-naming-convention mame-naming-convention-list_method mame-test-stock-indexation mame-work mame2 maste_copy master-erp5-test-result-scalability master-erp5-test-result-scalability-rebase master-test master-test-fix-additionalbt5path master_calendar_wip_patches master_calendar_wip_patches_extend_security master_no_guard_on_workflow_transition master_no_guard_on_workflow_transition_plus_calendar_wip_patchs merge_xhtml_jquery mmariani-inventory monitoring monitoring-graph mrp new-notebook new-notebook-test new-render-presentation nexedi-erp5-jp no_longer_simulated_state notebook notebook3 officejs officejs_clean officejs_zip ojs_wip pere portal_callables portal_solver_process_security_configuration presentation rebased_mrp refactor/base_edit refactor/renderjs reindex_calendar_after_change_calendar_exception reverse_logistics revert-38554dbe revert-6c89fe9b rewrite_test_21_AcquiredPortalType romain-fulltext scalability-master scalability-master2 scalability-master2-rebase scalability-rebase scalability-roque scalability-roque-2 scalability-run-command shop-box simulation sms_more_than_140_characters strict_catalog sws_fix syncml taskdistribution-xmlrpc-binary test_page testnode_software_link timezones tmp/getInstalledBusinessTemplate_never_installed_bt tristan tristan-merge tristan-performance ttrm updatePyodide upgradeSite view-aggregated-amounts vivekpab_erp5webrenderjs_layoutconfig vivekpab_jabberclient vivekpab_renderjs_interfaces wenjie wenjie_branch wip yryr yryr-components-cp yryr-inventory-cache yryr-test yryr-with-components yusei test-ui test-rjsacc test-rjs renderjs-test erp5.util-0.4.49 erp5.util-0.4.46 erp5.util-0.4.44 erp5.util-0.4.43 erp5.util-0.4.41 erp5.util-0.4.40 erp5.util-0.4.37 erp5.util-0.4.1 erp5.util-0.4 erp5.util-0.3 erp5.util-0.2 erp5.util-0.1
No related merge requests found
<?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