[Checkins] SVN: zc.selenium/branches/wosc-zope2/src/zc/selenium/pytest.txt updated tests, registering as views now, not adapters

Wolfgang Schnerring wosc at wosc.de
Tue Feb 17 05:23:46 EST 2009


Log message for revision 96636:
  updated tests, registering as views now, not adapters
  

Changed:
  U   zc.selenium/branches/wosc-zope2/src/zc/selenium/pytest.txt

-=-
Modified: zc.selenium/branches/wosc-zope2/src/zc/selenium/pytest.txt
===================================================================
--- zc.selenium/branches/wosc-zope2/src/zc/selenium/pytest.txt	2009-02-17 10:17:11 UTC (rev 96635)
+++ zc.selenium/branches/wosc-zope2/src/zc/selenium/pytest.txt	2009-02-17 10:23:46 UTC (rev 96636)
@@ -494,20 +494,25 @@
 ------------
 
 To get our tests to be used in the Selenium test suite, we need to
-register them as request adapters.  We would normally use ZCML like
+register them as views for "*".  We would normally use ZCML like
 the following::
 
-    <adapter
-        factory=".Second"
+    <browser:page
+        for="*"
         name="some-url-for-the-second-test.html"
+        class=".Second"
         permission="zope.Public"
         />
 
 We'll illustrate this using the component API:
 
     >>> from zope import component
-    >>> component.provideAdapter(Test, name='first.html')
-    >>> component.provideAdapter(Second, name='second.html')
+    >>> from zope import interface
+    >>> from zope.publisher.interfaces.browser import IDefaultBrowserLayer
+    >>> component.provideAdapter(Test,
+    ...     (interface.Interface, IDefaultBrowserLayer), name='first.html')
+    >>> component.provideAdapter(Second,
+    ...     (interface.Interface, IDefaultBrowserLayer), name='second.html')
 
 The test suite used the zc.selenium.pytest.suite function to
 compute rows for the test suite:



More information about the Checkins mailing list