r13723 - MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget/tests

"Hanno Schlichting" <[email protected]> Wed, 13 Jul 2011 14:46:53 +0000
Newsgroups gmane.comp.web.zope.plone.archetypes.cvs
Message-ID <[email protected]>
Author: hannosch
Date: Wed Jul 13 14:46:45 2011
New Revision: 13723

Modified:
   MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget/tests/integration.txt
Log:
Change test assertion to be independent of HTML markup: "<strong id=...>1</strong> items matching..."


Modified: MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget/tests/integration.txt
==============================================================================
--- MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget/tests/integration.txt	(original)
+++ MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget/tests/integration.txt	Wed Jul 13 14:46:45 2011
@@ -4,7 +4,7 @@
 This package contains the archetypes field and widget used in
 plone.app.collection to select the search criteria of the collection.
 
-First login as portal owner
+First login as portal owner:
 
     >>> app = self.layer['app']
     >>> from plone.testing.z2 import Browser
@@ -13,7 +13,7 @@
     >>> browser.addHeader('Authorization', 'Basic admin:secret')
 
 We added a collection in the test layer, so we check if the query field
-is there, and see if it's rendered
+is there, and see if it's rendered:
 
     >>> portal = self.layer['portal']
     >>> field = portal.collection.getField('query')
@@ -26,7 +26,7 @@
     >>> 'class="field ArchetypesQueryWidget' in browser.contents
     True
 
-Ok, now let's add a simple criteria so we now the control is doing something actually
+Ok, now let's add a simple criteria so we know the control is doing something:
 
     >>> browser.getControl(name='addindex').value = ["portal_type"]
     >>> browser.getControl(name='form.button.addcriteria').click()
@@ -34,6 +34,6 @@
     >>> browser.getControl(name='form.button.addcriteria').click()
     >>> browser.getControl(name='query.v:records:list').value = ["Document"]
     >>> browser.getControl(name='form.button.save').click()
-    >>> browser.open(portal.collection.absolute_url()+'/edit')
-    >>> "1 items matching your search terms" in browser.contents
+    >>> browser.open(portal.collection.absolute_url() + '/edit')
+    >>> "Document Test Page" in browser.contents
     True

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev