From 704da9a366ece12b24fbe6c1249bc01c2c932838 Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Wed, 14 May 2008 16:32:12 +0000
Subject: [PATCH] Initial zuite for access tab

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20968 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_tests/access_tab_zuite.xml         |  35 ++++
 .../testAccessTabPreference.xml               | 182 ++++++++++++++++++
 bt5/erp5_ui_test/bt/change_log                |   3 +
 bt5/erp5_ui_test/bt/revision                  |   2 +-
 bt5/erp5_ui_test/bt/template_path_list        |   2 +
 5 files changed, 223 insertions(+), 1 deletion(-)
 create mode 100644 bt5/erp5_ui_test/PathTemplateItem/portal_tests/access_tab_zuite.xml
 create mode 100644 bt5/erp5_ui_test/PathTemplateItem/portal_tests/access_tab_zuite/testAccessTabPreference.xml

diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/access_tab_zuite.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/access_tab_zuite.xml
new file mode 100644
index 0000000000..662794f413
--- /dev/null
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/access_tab_zuite.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="Zuite" module="Products.Zelenium.zuite"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_objects</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>access_tab_zuite</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/access_tab_zuite/testAccessTabPreference.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/access_tab_zuite/testAccessTabPreference.xml
new file mode 100644
index 0000000000..4e382e7c26
--- /dev/null
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/access_tab_zuite/testAccessTabPreference.xml
@@ -0,0 +1,182 @@
+<?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>_owner</string> </key>
+            <value>
+              <none/>
+            </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 Bread Crumbs</title>\n
+</head>\n
+<body>\n
+<table cellpadding="1" cellspacing="1" border="1">\n
+<thead>\n
+<tr><td rowspan="1" colspan="3">Test Access Tab Front Page Preference</td></tr>\n
+</thead><tbody>\n
+<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" />\n
+<tr>\n
+  <td>open</td>\n
+  <td>${base_url}/portal_preferences/BTZuite_setPreference</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>assertTextPresent</td>\n
+  <td>Set Preference Successfully.</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>open</td>\n
+  <td>${base_url}/portal_preferences/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}/portal_preferences/erp5_ui_test_preference/view</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>clickAndWait</td>\n
+  <td>link=User Interface</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>click</td>\n
+  <td>//input[@name=\'field_my_preferred_html_style_access_tab\']</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>clickAndWait</td>\n
+  <td>//button[@name=\'Base_edit:method\']</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>open</td>\n
+  <td>${base_url}/view</td>\n
+  <td></td>\n
+</tr>\n
+<!-- \n
+  Asserts goes here \n
+  Notes that access tab are visible only if dms, base or express are installed.\n
+  So it can be included here different conditions and assert for all cases.\n
+-->\n
+<tal:block tal:condition="python:getattr(context,\'document_module\',None)" >\n
+  <tr>\n
+    <td>assertText</td>\n
+    <td>//li[@id="quick_search_tab"]/a/span</td>\n
+    <td>Quick Search</td>\n
+  </tr>\n
+</tal:block>\n
+<tr>\n
+  <td>open</td>\n
+  <td>${base_url}/portal_preferences/erp5_ui_test_preference/view</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>clickAndWait</td>\n
+  <td>link=User Interface</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>click</td>\n
+  <td>//input[@name=\'field_my_preferred_html_style_access_tab\']</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>clickAndWait</td>\n
+  <td>//button[@name=\'Base_edit:method\']</td>\n
+  <td></td>\n
+</tr>\n
+<tr>\n
+  <td>open</td>\n
+  <td>${base_url}/view</td>\n
+  <td></td>\n
+</tr>\n
+<!-- Asserts goes here -->\n
+<tr>\n
+  <td>assertText</td>\n
+  <td>//div[@class="index_html"]/h2</td>\n
+  <td>Welcome to ERP5</td>\n
+</tr>\n
+\n
+\n
+</tbody></table>\n
+</body>\n
+</html>\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>testAccessTabPreference</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_ui_test/bt/change_log b/bt5/erp5_ui_test/bt/change_log
index d36fc26a03..d6c55004cf 100644
--- a/bt5/erp5_ui_test/bt/change_log
+++ b/bt5/erp5_ui_test/bt/change_log
@@ -1,3 +1,6 @@
+2008-05-14 rafael
+* Initial zuite for access tab
+
 2008-05-13 jerome
 * Initial zuite for matrixbox
 
diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision
index 0dbf139f8d..b2786cdcdc 100644
--- a/bt5/erp5_ui_test/bt/revision
+++ b/bt5/erp5_ui_test/bt/revision
@@ -1 +1 @@
-350
\ No newline at end of file
+351
\ No newline at end of file
diff --git a/bt5/erp5_ui_test/bt/template_path_list b/bt5/erp5_ui_test/bt/template_path_list
index 37a636e6e8..1625f9648d 100644
--- a/bt5/erp5_ui_test/bt/template_path_list
+++ b/bt5/erp5_ui_test/bt/template_path_list
@@ -1,6 +1,8 @@
 portal_categories/foo_big_category/**
 portal_categories/foo_category/**
 portal_domains/foo_domain
+portal_tests/access_tab_zuite
+portal_tests/access_tab_zuite/**
 portal_tests/business_template_zuite
 portal_tests/business_template_zuite/**
 portal_tests/check_box_field_zuite
-- 
2.30.9