[Erp5-report] r34379 ivan - in /erp5/trunk/bt5/erp5_ui_test_core: ExtensionTemplateItem/ Sk...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 8 13:34:53 CEST 2010


Author: ivan
Date: Thu Apr  8 13:34:52 2010
New Revision: 34379

URL: http://svn.erp5.org?rev=34379&view=rev
Log:
Add general purpose scripts to determine file system tests documents location.
These scripts are useful to make a real user file upload in automated selenium tests (if respective browser security settings does allow it).

Added:
    erp5/trunk/bt5/erp5_ui_test_core/ExtensionTemplateItem/SeleniumTestUtils.py
    erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getFilenameLocation.xml
    erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getTestDocumentsHome.xml
Modified:
    erp5/trunk/bt5/erp5_ui_test_core/bt/revision
    erp5/trunk/bt5/erp5_ui_test_core/bt/template_extension_id_list

Added: erp5/trunk/bt5/erp5_ui_test_core/ExtensionTemplateItem/SeleniumTestUtils.py
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test_core/ExtensionTemplateItem/SeleniumTestUtils.py?rev=34379&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test_core/ExtensionTemplateItem/SeleniumTestUtils.py (added)
+++ erp5/trunk/bt5/erp5_ui_test_core/ExtensionTemplateItem/SeleniumTestUtils.py [utf8] Thu Apr  8 13:34:52 2010
@@ -1,0 +1,42 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2002-2009 Nexedi SA and Contributors. All Rights Reserved.
+#                  Ivan Tyagov <ivan at nexedi.com>
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+##############################################################################
+from App.config import getConfiguration
+from os import sep
+
+def Zuite_getTestDocumentsHome(self):
+  """
+    Get test documents folder as string.
+  """
+  instance_home_path = getConfiguration().instancehome
+  instance_home_elements = instance_home_path.split(sep)[:-1]
+  instance_home_elements.append('test_documents')
+  documents_home = sep.join(instance_home_elements)
+  return documents_home
+  
+  

Added: erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getFilenameLocation.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getFilenameLocation.xml?rev=34379&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getFilenameLocation.xml (added)
+++ erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getFilenameLocation.xml [utf8] Thu Apr  8 13:34:52 2010
@@ -1,0 +1,133 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </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>test_documents_home = context.Zuite_getTestDocumentsHome()\n
+return \'%s/%s\' %(test_documents_home, filename)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>filename</string> </value>
+        </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple>
+                <string>Manager</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>filename</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>test_documents_home</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Zuite_getFilenameLocation</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getTestDocumentsHome.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getTestDocumentsHome.xml?rev=34379&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getTestDocumentsHome.xml (added)
+++ erp5/trunk/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_getTestDocumentsHome.xml [utf8] Thu Apr  8 13:34:52 2010
@@ -1,0 +1,31 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_function</string> </key>
+            <value> <string>Zuite_getTestDocumentsHome</string> </value>
+        </item>
+        <item>
+            <key> <string>_module</string> </key>
+            <value> <string>SeleniumTestUtils</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Zuite_getTestDocumentsHome</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_ui_test_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test_core/bt/revision?rev=34379&r1=34378&r2=34379&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test_core/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_ui_test_core/bt/revision [utf8] Thu Apr  8 13:34:52 2010
@@ -1,1 +1,1 @@
-19
+20

Modified: erp5/trunk/bt5/erp5_ui_test_core/bt/template_extension_id_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test_core/bt/template_extension_id_list?rev=34379&r1=34378&r2=34379&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test_core/bt/template_extension_id_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_ui_test_core/bt/template_extension_id_list [utf8] Thu Apr  8 13:34:52 2010
@@ -1,1 +1,2 @@
-MailHostUtils
+MailHostUtils
+SeleniumTestUtils




More information about the Erp5-report mailing list