[Checkins] SVN: gocept.selenium/trunk/ added tests for Zope 2.12 and Plone 4

Godefroid Chapelle gotcha at bubblenet.be
Tue Oct 19 09:20:47 EDT 2010


Log message for revision 117759:
  added tests for Zope 2.12 and Plone 4
  added corresponding buildouts
  

Changed:
  U   gocept.selenium/trunk/plone.cfg
  A   gocept.selenium/trunk/plone4.cfg
  A   gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone3/
  A   gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone3/__init__.py
  A   gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone3/test_plone3.py
  A   gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4/
  A   gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4/__init__.py
  A   gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4/test_plone4.py
  D   gocept.selenium/trunk/src/gocept/selenium/plone/tests/test_plone.py
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/testing.py
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/testing.zcml
  D   gocept.selenium/trunk/src/gocept/selenium/zope2/tests/test_zope2.py
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope210/
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope210/__init__.py
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope210/test_zope210.py
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/__init__.py
  A   gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/test_zope212.py
  U   gocept.selenium/trunk/zope2.cfg
  A   gocept.selenium/trunk/zope212.cfg

-=-
Modified: gocept.selenium/trunk/plone.cfg
===================================================================
--- gocept.selenium/trunk/plone.cfg	2010-10-19 13:15:45 UTC (rev 117758)
+++ gocept.selenium/trunk/plone.cfg	2010-10-19 13:20:47 UTC (rev 117759)
@@ -15,7 +15,7 @@
 [test]
 recipe = collective.recipe.z2testrunner
 zope2part = instance
-defaults = --ignore_dir=ztk --ignore_dir=zope2 --ignore_dir=static
+defaults = --ignore_dir=ztk --ignore_dir=zope2 --ignore_dir=static --tests-pattern=plone3
 packages = ${buildout:package}
 
 [instance]

Copied: gocept.selenium/trunk/plone4.cfg (from rev 117578, gocept.selenium/trunk/plone.cfg)
===================================================================
--- gocept.selenium/trunk/plone4.cfg	                        (rev 0)
+++ gocept.selenium/trunk/plone4.cfg	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1,23 @@
+[buildout]
+extends = http://dist.plone.org/release/4.0-latest/versions.cfg
+develop = .
+parts = test instance
+package = gocept.selenium
+find-links = http://download.gocept.com/packages
+versions = versions
+
+[versions]
+PILwoTK = 1.1.6.4
+
+[test]
+recipe = zc.recipe.testrunner
+defaults = ["--ignore_dir=ztk", "--ignore_dir=zope",  "--ignore_dir=static", "--tests-pattern=plone4"]
+eggs = ${instance:eggs}
+
+[instance]
+recipe = plone.recipe.zope2instance
+user = admin:admin
+eggs = ${buildout:package}
+    Plone
+    PILwoTK
+zcml = gocept.selenium.tests.fixture

Copied: gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone3/__init__.py (from rev 117578, gocept.selenium/trunk/src/gocept/selenium/plone/tests/__init__.py)
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone3/__init__.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone3/__init__.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1 @@
+# python package

Copied: gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone3/test_plone3.py (from rev 117578, gocept.selenium/trunk/src/gocept/selenium/plone/tests/test_plone.py)
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone3/test_plone3.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone3/test_plone3.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1,38 @@
+#############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
+import unittest
+import gocept.selenium.zope2
+import gocept.selenium.tests.isolation
+import Products.PloneTestCase.PloneTestCase
+
+
+Products.PloneTestCase.PloneTestCase.setupPloneSite(id='plone')
+
+
+class PloneTests(gocept.selenium.tests.isolation.IsolationTests,
+                 gocept.selenium.plone.TestCase):
+
+    def test_plone_login(self):
+        sel = self.selenium
+        sel.open('/plone')
+        sel.type('name=__ac_name', 'portal_owner')
+        sel.type('name=__ac_password', 'secret')
+        sel.click('name=submit')
+        sel.waitForPageToLoad()
+        sel.assertTextPresent('Welcome! You are now logged in.')
+
+
+def test_suite():
+    return unittest.makeSuite(PloneTests)

Copied: gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4/__init__.py (from rev 117578, gocept.selenium/trunk/src/gocept/selenium/plone/tests/__init__.py)
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4/__init__.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4/__init__.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1 @@
+# python package

Copied: gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4/test_plone4.py (from rev 117578, gocept.selenium/trunk/src/gocept/selenium/plone/tests/test_plone.py)
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4/test_plone4.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/plone/tests/plone4/test_plone4.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1,44 @@
+#############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
+import unittest
+import gocept.selenium.zope2
+from gocept.selenium.zope2 import testing
+import gocept.selenium.tests.isolation
+import Products.PloneTestCase.PloneTestCase
+
+from Products.PloneTestCase.layer import PloneSiteLayer
+
+Products.PloneTestCase.PloneTestCase.setupPloneSite(id='plone')
+
+
+class Plone4Tests(gocept.selenium.tests.isolation.IsolationTests,
+                 gocept.selenium.plone.TestCase):
+
+    layer = gocept.selenium.zope2.Layer(PloneSiteLayer, testing.fixtureLayer)
+
+    def test_plone_login(self):
+        sel = self.selenium
+        sel.open('/plone')
+        sel.click('link=Log in')
+        sel.waitForElementPresent('name=__ac_name')
+        sel.type('name=__ac_name', 'portal_owner')
+        sel.type('name=__ac_password', 'secret')
+        sel.click('name=submit')
+        sel.waitForPageToLoad()
+        sel.assertTextPresent('portal_owner')
+
+
+def test_suite():
+    return unittest.makeSuite(Plone4Tests)

Deleted: gocept.selenium/trunk/src/gocept/selenium/plone/tests/test_plone.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plone/tests/test_plone.py	2010-10-19 13:15:45 UTC (rev 117758)
+++ gocept.selenium/trunk/src/gocept/selenium/plone/tests/test_plone.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -1,38 +0,0 @@
-#############################################################################
-#
-# Copyright (c) 2009 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-
-import unittest
-import gocept.selenium.zope2
-import gocept.selenium.tests.isolation
-import Products.PloneTestCase.PloneTestCase
-
-
-Products.PloneTestCase.PloneTestCase.setupPloneSite(id='plone')
-
-
-class PloneTests(gocept.selenium.tests.isolation.IsolationTests,
-                 gocept.selenium.plone.TestCase):
-
-    def test_plone_login(self):
-        sel = self.selenium
-        sel.open('/plone')
-        sel.type('name=__ac_name', 'portal_owner')
-        sel.type('name=__ac_password', 'secret')
-        sel.click('name=submit')
-        sel.waitForPageToLoad()
-        sel.assertTextPresent('Welcome! You are now logged in.')
-
-
-def test_suite():
-    return unittest.makeSuite(PloneTests)

Added: gocept.selenium/trunk/src/gocept/selenium/zope2/testing.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/zope2/testing.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/zope2/testing.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1,16 @@
+from Products.Five import zcml
+
+from gocept.selenium import zope2
+
+
+class FixtureLayer(object):
+
+    __name__ = "gocept.selenium.tests.fixture"
+    __bases__ = ()
+
+    def setUp(cls):
+        zcml.load_config('testing.zcml',
+            package=zope2)
+    setUp = classmethod(setUp)
+
+fixtureLayer = FixtureLayer()

Added: gocept.selenium/trunk/src/gocept/selenium/zope2/testing.zcml
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/zope2/testing.zcml	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/zope2/testing.zcml	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1,7 @@
+<configure
+  xmlns="http://namespaces.zope.org/zope">
+
+  <include package="Products.Five" />
+  <include package="gocept.selenium.tests.fixture" />
+
+</configure>

Deleted: gocept.selenium/trunk/src/gocept/selenium/zope2/tests/test_zope2.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/zope2/tests/test_zope2.py	2010-10-19 13:15:45 UTC (rev 117758)
+++ gocept.selenium/trunk/src/gocept/selenium/zope2/tests/test_zope2.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -1,29 +0,0 @@
-#############################################################################
-#
-# Copyright (c) 2009 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-
-import unittest
-import gocept.selenium.zope2
-import gocept.selenium.tests.isolation
-import Testing.ZopeTestCase
-
-Testing.ZopeTestCase.installProduct('Five')
-
-
-class Zope2Tests(gocept.selenium.tests.isolation.IsolationTests,
-                 gocept.selenium.zope2.TestCase):
-    pass
-
-
-def test_suite():
-    return unittest.makeSuite(Zope2Tests)

Added: gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope210/__init__.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope210/__init__.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope210/__init__.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1 @@
+# python package

Added: gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope210/test_zope210.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope210/test_zope210.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope210/test_zope210.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1,29 @@
+#############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
+import unittest
+import gocept.selenium.zope2
+import gocept.selenium.tests.isolation
+import Testing.ZopeTestCase
+
+Testing.ZopeTestCase.installProduct('Five')
+
+
+class Zope2Tests(gocept.selenium.tests.isolation.IsolationTests,
+                 gocept.selenium.zope2.TestCase):
+    pass
+
+
+def test_suite():
+    return unittest.makeSuite(Zope2Tests)

Added: gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/__init__.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/__init__.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/__init__.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1 @@
+# python package

Added: gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/test_zope212.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/test_zope212.py	                        (rev 0)
+++ gocept.selenium/trunk/src/gocept/selenium/zope2/tests/zope212/test_zope212.py	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1,32 @@
+#############################################################################
+#
+# Copyright (c) 2009 Zope Foundation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
+import unittest
+import gocept.selenium.zope2
+from gocept.selenium.zope2 import testing
+from gocept.selenium.zope2 import BASE_LAYERS
+import gocept.selenium.tests.isolation
+import Testing.ZopeTestCase
+
+Testing.ZopeTestCase.installProduct('Five')
+
+
+class Zope212Tests(gocept.selenium.tests.isolation.IsolationTests,
+                 gocept.selenium.zope2.TestCase):
+
+    layer = gocept.selenium.zope2.Layer(testing.fixtureLayer, *BASE_LAYERS)
+
+
+def test_suite():
+    return unittest.makeSuite(Zope212Tests)

Modified: gocept.selenium/trunk/zope2.cfg
===================================================================
--- gocept.selenium/trunk/zope2.cfg	2010-10-19 13:15:45 UTC (rev 117758)
+++ gocept.selenium/trunk/zope2.cfg	2010-10-19 13:20:47 UTC (rev 117759)
@@ -1,12 +1,15 @@
 [buildout]
+extends = http://dist.plone.org/release/3.3.5/versions.cfg
 develop = .
-parts = test instance
+parts = zope2 instance test
 package = gocept.selenium
+versions = versions
 
 [test]
 recipe = collective.recipe.z2testrunner
 zope2part = instance
-defaults = --ignore_dir=ztk --ignore_dir=plone --ignore_dir=static
+defaults = test --ignore_dir=ztk --ignore_dir=plone --ignore_dir=static --tests-pattern=zope210
+#--module=test_zope2 --module=!test_zope212
 packages = ${buildout:package}
 
 [instance]
@@ -21,4 +24,4 @@
 fake-zope-eggs = true
 additional-fake-eggs =
     ZODB3
-url = http://www.zope.org/Products/Zope/2.11.4/Zope-2.11.4-final.tgz
+url = ${versions:zope2-url}

Copied: gocept.selenium/trunk/zope212.cfg (from rev 117578, gocept.selenium/trunk/zope2.cfg)
===================================================================
--- gocept.selenium/trunk/zope212.cfg	                        (rev 0)
+++ gocept.selenium/trunk/zope212.cfg	2010-10-19 13:20:47 UTC (rev 117759)
@@ -0,0 +1,18 @@
+[buildout]
+extends = http://dist.plone.org/release/4.0-latest/versions.cfg
+develop = .
+parts = test instance
+package = gocept.selenium
+versions = versions
+
+[test]
+recipe = zc.recipe.testrunner
+defaults = ["--ignore_dir=ztk", "--ignore_dir=plone",  "--ignore_dir=static", "--tests-pattern=zope212"]
+eggs = ${instance:eggs}
+       Zope2
+
+[instance]
+recipe = plone.recipe.zope2instance
+user = admin:admin
+eggs = ${buildout:package}
+zcml = gocept.selenium.tests.fixture



More information about the checkins mailing list