CVS: Products/Zelenium - CHANGES.txt:1.14 version.txt:1.9 zuite.py:1.9

Tres Seaver <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
Update of /cvs-repository/Products/Zelenium
In directory cvs.zope.org:/tmp/cvs-serv14794

Modified Files:
	CHANGES.txt version.txt zuite.py 
Log Message:


  - Compensate in display of test tables for non-padded integers
    in the IDs (make them sort properly).


=== Products/Zelenium/CHANGES.txt 1.13 => 1.14 ===
--- Products/Zelenium/CHANGES.txt:1.13	Wed Apr 27 21:29:42 2005
+++ Products/Zelenium/CHANGES.txt	Thu Apr 28 17:12:42 2005
@@ -1,5 +1,10 @@
 Zelenium Product Changelog
 
+  After Zelenium-0.4
+
+    - Compensate in display of test tables for non-padded integers
+      in the IDs (make them sort properly).
+
   Zelenium-0.4 (2005/04/27)
 
     - CVS tag:  'Zelenium-0_4'


=== Products/Zelenium/version.txt 1.8 => 1.9 ===
--- Products/Zelenium/version.txt:1.8	Wed Apr 27 21:29:42 2005
+++ Products/Zelenium/version.txt	Thu Apr 28 17:12:42 2005
@@ -1 +1 @@
-Zelenium-0.4
+Zelenium-0.4+


=== Products/Zelenium/zuite.py 1.8 => 1.9 ===
--- Products/Zelenium/zuite.py:1.8	Wed Apr 27 21:29:42 2005
+++ Products/Zelenium/zuite.py	Thu Apr 28 17:12:42 2005
@@ -103,14 +103,29 @@
  </tr>
 
 </table>
- 
-<h2> Test Cases </h2>
 
-<div style="padding-top: 10px;"
-     tal:repeat="item python:context.objectItems(['File'])">
 
- <div tal:condition="python: item[0].startswith('testTable')"
-      tal:replace="structure python: item[1]" />
+<div tal:define="raw_case_ids python: [x for x in context.objectIds(['File'])
+                                         if x.startswith('testTable')];
+                 tokenized python: [x.split('.') for x in raw_case_ids];
+                 normalized python: [(x[0], int(x[1])) for x in tokenized];
+                 ignored normalized/sort;
+                 case_ids python: [('%s.%d' % x) for x in normalized];
+                 test_cases python: [context.restrictedTraverse(case_id)
+                                        for case_id in case_ids];
+                ">
+ <h2> Test Cases </h2>
+
+ <div style="padding-top: 10px;"
+      tal:repeat="test_case test_cases">
+
+  <p><a href="#"
+        tal:attributes="href test_case/absolute_url"
+        tal:content="test_case/getId">TEST_CASE</a></p>
+
+  <div tal:replace="structure python: test_case" />
+ </div>
+
 </div>
 
 <h2> Remote Client Data </h2>

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.