From 7ebce20b778963b41424ae75002785a10d4d2048 Mon Sep 17 00:00:00 2001 From: Rafael Monnerat <rafael@nexedi.com> Date: Tue, 6 Mar 2012 00:50:55 -0300 Subject: [PATCH] Include action to preview Selenium Test code embedded on Test Page --- .../Test%20Page/export_selenium_test.xml | 102 +++++++++++ .../TestPage_viewExportSeleniumTestDialog.xml | 124 +++++++++++++ .../selenium_test_content.xml | 164 ++++++++++++++++++ bt5/erp5_run_my_doc/bt/revision | 2 +- .../bt/template_action_path_list | 1 + 5 files changed, 392 insertions(+), 1 deletion(-) create mode 100644 bt5/erp5_run_my_doc/ActionTemplateItem/portal_types/Test%20Page/export_selenium_test.xml create mode 100644 bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPage_viewExportSeleniumTestDialog.xml create mode 100644 bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPage_viewExportSeleniumTestDialog/selenium_test_content.xml diff --git a/bt5/erp5_run_my_doc/ActionTemplateItem/portal_types/Test%20Page/export_selenium_test.xml b/bt5/erp5_run_my_doc/ActionTemplateItem/portal_types/Test%20Page/export_selenium_test.xml new file mode 100644 index 0000000000..859e43e418 --- /dev/null +++ b/bt5/erp5_run_my_doc/ActionTemplateItem/portal_types/Test%20Page/export_selenium_test.xml @@ -0,0 +1,102 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_local_properties</string> </key> + <value> + <tuple> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>priority</string> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>float</string> </value> + </item> + </dictionary> + </tuple> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>action_type/object_exchange</string> + </tuple> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_exchange</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>export_selenium_test</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Action Information</string> </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>22.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Export Selenium Test</string> </value> + </item> + <item> + <key> <string>visible</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="Expression" module="Products.CMFCore.Expression"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${object_url}/TestPage_viewExportSeleniumTestDialog</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPage_viewExportSeleniumTestDialog.xml b/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPage_viewExportSeleniumTestDialog.xml new file mode 100644 index 0000000000..fc8998bb93 --- /dev/null +++ b/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPage_viewExportSeleniumTestDialog.xml @@ -0,0 +1,124 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ERP5Form" module="Products.ERP5Form.Form"/> + </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/> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> <string>TestPage_viewSeleniumTest</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>edit_order</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>enctype</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>group_list</string> </key> + <value> + <list> + <string>center</string> + </list> + </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <dictionary> + <item> + <key> <string>center</string> </key> + <value> + <list> + <string>selenium_test_content</string> + </list> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>TestPage_viewExportSeleniumTestDialog</string> </value> + </item> + <item> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>TestPage_viewExportSeleniumTestDialog</string> </value> + </item> + <item> + <key> <string>pt</string> </key> + <value> <string>form_dialog</string> </value> + </item> + <item> + <key> <string>row_length</string> </key> + <value> <int>4</int> </value> + </item> + <item> + <key> <string>stored_encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>See as Selenium Test</string> </value> + </item> + <item> + <key> <string>unicode_mode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>update_action</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>update_action_title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPage_viewExportSeleniumTestDialog/selenium_test_content.xml b/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPage_viewExportSeleniumTestDialog/selenium_test_content.xml new file mode 100644 index 0000000000..49a7aa2373 --- /dev/null +++ b/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/TestPage_viewExportSeleniumTestDialog/selenium_test_content.xml @@ -0,0 +1,164 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>css_class</string> + <string>default</string> + <string>text_editor</string> + <string>title</string> + <string>whitespace_preserve</string> + <string>width</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>selenium_test_content</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>text_editor</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>css_class</string> </key> + <value> <string>page</string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_text_content</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewWebFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>text_editor</string> </key> + <value> <string>text_area</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Selenium Test HTML</string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <int>200</int> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +python:\'<iframe width="100%%" height="600" src="%s/TestPage_viewSeleniumTest" name="selenium_test" style="background-color:#FFFFFF;"></iframe>\' % here.absolute_url() + +]]></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_run_my_doc/bt/revision b/bt5/erp5_run_my_doc/bt/revision index 4800c7da68..fc9afb48e0 100644 --- a/bt5/erp5_run_my_doc/bt/revision +++ b/bt5/erp5_run_my_doc/bt/revision @@ -1 +1 @@ -58 \ No newline at end of file +59 \ No newline at end of file diff --git a/bt5/erp5_run_my_doc/bt/template_action_path_list b/bt5/erp5_run_my_doc/bt/template_action_path_list index 43beb5d41e..4e46bf1917 100644 --- a/bt5/erp5_run_my_doc/bt/template_action_path_list +++ b/bt5/erp5_run_my_doc/bt/template_action_path_list @@ -10,6 +10,7 @@ Test Page | edit_test Test Page | export_book Test Page | export_chapter Test Page | export_report +Test Page | export_selenium_test Test Page | launch Test Page | list Test Page | local_permission -- 2.30.9