From 827dc5dc617083073fdc066cc7cf5e2acd34483f Mon Sep 17 00:00:00 2001 From: Boxiang Sun <boxiang.sun@nexedi.com> Date: Fri, 15 Sep 2017 11:58:42 +0000 Subject: [PATCH] erp5_officejs_support_request_ui_test: Add test for homepage "support request" only search. --- .../testHomepageSearch.xml | 58 +++++++++++++++++++ .../testHomepageSearch.zpt | 54 +++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testHomepageSearch.xml create mode 100644 bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testHomepageSearch.zpt diff --git a/bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testHomepageSearch.xml b/bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testHomepageSearch.xml new file mode 100644 index 0000000000..b677dec612 --- /dev/null +++ b/bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testHomepageSearch.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </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> + <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>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>testHomepageSearch</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testHomepageSearch.zpt b/bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testHomepageSearch.zpt new file mode 100644 index 0000000000..e8c9960b4a --- /dev/null +++ b/bt5/erp5_officejs_support_request_ui_test/PathTemplateItem/portal_tests/officejs_support_request_ui_zuite/testHomepageSearch.zpt @@ -0,0 +1,54 @@ +<html> + <head> + <title tal:content="template/title">The title</title> + <meta http-equiv="content-type" content="text/html;charset=utf-8"> + </head> + <body> + <table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Support Request Zuite</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> +<tr> + <td>open</td> + <td>${base_url}/web_site_module/erp5_officejs_support_request_ui/</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//input[@data-i18n='[value]Submit New Support Request']</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//button[@class="search_button ui-shadow-inset ui-btn ui-btn-inline ui-corner-all ui-btn-icon-notext ui-icon-search ui-override-theme ui-input-btn"]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//button[@class="search_button ui-shadow-inset ui-btn ui-btn-inline ui-corner-all ui-btn-icon-notext ui-icon-search ui-override-theme ui-input-btn"]</td> + <td></td> +</tr> +<tr> + <td>pause</td> + <td>5000</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Documents</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Support Request</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@role='main']//input[@name='search']</td> + <td></td> +</tr> +</tbody></table> + </body> +</html> \ No newline at end of file -- 2.30.9