diff --git a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml index 7f6c2a5ad759c44a159ead52df55ff6acc3bc337..b7d4e9b4658ada511b2ad0742aea7f3f1c3e972d 100644 --- a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml +++ b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml @@ -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 diff --git a/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_invokeSimulationAlarmList.xml b/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_invokeSimulationAlarmList.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f924c5a48d70dc0d18c0fd116a80b78eb3966e7 --- /dev/null +++ b/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_invokeSimulationAlarmList.xml @@ -0,0 +1,85 @@ +<?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> diff --git a/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.xml b/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.xml index 2189809dc733f14420eb82a86ebf26ce8c2299a2..d1e9eb4273287bed1aa31e72baaa54040f8bda33 100644 --- a/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.xml +++ b/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.xml @@ -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