[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container/ftests - test_contents.py:1.2

Jim Fulton jim@zope.com
Wed, 18 Jun 2003 12:03:33 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/container/ftests
In directory cvs.zope.org:/tmp/cvs-serv17617/src/zope/app/browser/container/ftests

Modified Files:
	test_contents.py 
Log Message:
Fixed collector entry 169

==============================================================
= Request - Entry #1 by Anonymous User on Jun 18, 2003 1:07 am

Go to a folder, check NO boxes and press the "Rename" button.

The view does not detect the lack of items checked (i.e. nothing to be
renamed) and goes in "rename mode".

This means only the "Apply" and "Canel" buttons are visible (until
such time as one or these buttons is pressed and normality returns)
==============================================================

Also:

- The error message was not being displayed.

- The error wasn't being displayed with a distinctive style.

- Removed unused contents_table macro.


=== Zope3/src/zope/app/browser/container/ftests/test_contents.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/browser/container/ftests/test_contents.py:1.1	Thu Jun 12 05:30:49 2003
+++ Zope3/src/zope/app/browser/container/ftests/test_contents.py	Wed Jun 18 12:03:33 2003
@@ -56,6 +56,24 @@
         root.setObject('foo', File())
         self.assert_('foo' in root)
         get_transaction().commit()
+
+        # Check that we don't change mode if there are no items selected
+        
+        response = self.publish('/@@contents.html',
+                                basic='mgr:mgrpw',
+                                form={'container_rename_button': u''})
+        body = ' '.join(response.getBody().split())
+        self.assert_(body.find('input name="new_value:list"') < 0)
+        self.assert_(body.find('type="submit" name="container_cancel_button"')
+                     < 0)
+        self.assert_(body.find('type="submit" name="container_rename_button"')
+                     >= 0)
+        self.assert_(body.find('div class="error"')
+                     >= 0)
+
+
+        # Check normal multiple select
+
         
         response = self.publish('/@@contents.html',
                                 basic='mgr:mgrpw',