Commit ba0ad870 authored by Rafael Monnerat's avatar Rafael Monnerat

Include script for invoke simulation related alarms

As funcitional tests runs with alarms disabled, invoke alarms is needed
for make simulation work. This commit also includes a macro.
parent 361ba7a6
......@@ -361,6 +361,8 @@
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/invoke_simulation_alarms"> Invoke simulation alarms </span>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<tr>\n
<td>open</td>\n
......@@ -438,6 +440,8 @@ Wait for activities</span>\n
</tr>\n
\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities">Wait for activities</span>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/invoke_simulation_alarms"> Invoke simulation alarms </span>\n
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span>\n
\n
<tr>\n
<td>open</td>\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>alarm_id_list = [\'packing_list_builder_alarm\', \n
\'invoice_builder_alarm\']\n
\n
for alarm_id in alarm_id_list:\n
alarm = getattr(context.portal_alarms, alarm_id, None)\n
if alarm is not None:\n
alarm.activeSense()\n
elif strict:\n
raise ValueError("Alarm %s not found" % alarm_id) \n
\n
return "Done."\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>strict=False</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_invokeSimulationAlarmList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -118,6 +118,20 @@
</tr> \n
</tal:block>\n
\n
<tal:block metal:define-macro="invoke_simulation_alarms">\n
<!-- Wait for activities to finish -->\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/Zuite_invokeSimulationAlarmList</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr> \n
</tal:block>\n
\n
<tal:block metal:define-macro="login_as_functional_test_user">\n
<tr>\n
<td>openAndWait</td>\n
......
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