[KSS-checkins] r50488 - in kukit/kss.demo/trunk: . docs kss/demo kss/demo/browser kss/demo/selenium_utils

gotcha at codespeak.net gotcha at codespeak.net
Thu Jan 10 13:54:47 CET 2008


Author: gotcha
Date: Thu Jan 10 13:54:45 2008
New Revision: 50488

Removed:
   kukit/kss.demo/trunk/kss/demo/browser/demo.css
Modified:
   kukit/kss.demo/trunk/docs/HISTORY.txt
   kukit/kss.demo/trunk/kss/demo/browser/body_macros.pt
   kukit/kss.demo/trunk/kss/demo/browser/configure.zcml
   kukit/kss.demo/trunk/kss/demo/browser/header_macros.pt
   kukit/kss.demo/trunk/kss/demo/browser/kss_demo_index.pt
   kukit/kss.demo/trunk/kss/demo/browser/registry.py
   kukit/kss.demo/trunk/kss/demo/registry.py
   kukit/kss.demo/trunk/kss/demo/selenium_utils/builder.py
   kukit/kss.demo/trunk/setup.py
Log:
merge finish-closures branch; see HISTORY.txt for details

Modified: kukit/kss.demo/trunk/docs/HISTORY.txt
==============================================================================
--- kukit/kss.demo/trunk/docs/HISTORY.txt	(original)
+++ kukit/kss.demo/trunk/docs/HISTORY.txt	Thu Jan 10 13:54:45 2008
@@ -6,6 +6,13 @@
 
     - ...
 
+    - Use develui.css (style is inline with kssproject.org).
+      [gotcha]
+
+    - Added a logger macro that can be included in demo templates
+      to ease Selenium testing.
+      [gotcha]
+
     - Hooked zelenium into the demo index page.
       Made zelenium reuse the demo registry.
       [ree]

Modified: kukit/kss.demo/trunk/kss/demo/browser/body_macros.pt
==============================================================================
--- kukit/kss.demo/trunk/kss/demo/browser/body_macros.pt	(original)
+++ kukit/kss.demo/trunk/kss/demo/browser/body_macros.pt	Thu Jan 10 13:54:45 2008
@@ -29,4 +29,14 @@
 
     </metal:kss_mode>
 
+    <metal:kss_mode define-macro="logger">
+    
+      <div class="log">
+        <h3>Log</h3>
+        <p id="log-reset"><a class="clickable">Reset</a></p>
+        <div id="logger"></div>
+      </div>
+
+    </metal:kss_mode>
+
 </html>

Modified: kukit/kss.demo/trunk/kss/demo/browser/configure.zcml
==============================================================================
--- kukit/kss.demo/trunk/kss/demo/browser/configure.zcml	(original)
+++ kukit/kss.demo/trunk/kss/demo/browser/configure.zcml	Thu Jan 10 13:54:45 2008
@@ -53,11 +53,6 @@
     permission="zope.View"
     />
 
-  <resource
-    file="demo.css"
-    name="demo.css"
-    />
-
   <!-- View for accessing the utility -->
   <page
     for="kss.demo.interfaces.ISimpleContent"

Deleted: /kukit/kss.demo/trunk/kss/demo/browser/demo.css
==============================================================================
--- /kukit/kss.demo/trunk/kss/demo/browser/demo.css	Thu Jan 10 13:54:45 2008
+++ (empty file)
@@ -1,100 +0,0 @@
-body {
-  font-family: Verdana, Arial, sans-serif;
-  font-size: 11pt;
-}
-
-h3 {
-  font-size: 110%;
-  margin-top: 0.5em;
-  margin-bottom: 0.2em;
-}
-
-#global-links {
-  display: table;
-  font-size: 80%;
-}
-
-#global-links ul, #log-reset {
-  display: table-row;
-}
-
-#global-links ul li {
-  display: table-cell;
-}
-
-#global-links a, #log-reset a {
-  display: block;
-  padding: 0.25em;
-  margin: 0.25em;
-  border: 1px solid #FF8888;
-  color: #CC0000;
-  text-decoration: none;
-}
-
-#global-links a:hover {
-  border-color: #FF0000;
-  background-color: #FFCCCC;
-}
-
-#target {
-  padding: 1em;
-  margin: 0.5em 0;
-  border: 1px solid #CCCCCC;
-  background-color: #EEEEEE;
-}
-
-.cursorPointer {
-  cursor: pointer;
-}
-
-.click {
-  color: #880000;
-}
-
-radio.click {
-  background-color: #880000;
-}
-
-a.button,
-input[type="submit"] {
-  width: auto;
-  padding: 0.2em;
-  border: 1px solid #FF8888;
-  color: #CC0000;
-  text-decoration: none;
-}
-
-fieldset {
-  margin: 0.5em 0;
-}
-
-fieldset div {
-  margin: 0.3em 0;
-}
-
-.help {
-  font-size: 80%;
-  color: #AAAAAA;
-}
-
-.help pre {
-  color: black;
-  border: 1px solid #CCCCCC;
-  background-color: #EEEEEE;
-  padding: 0.5em;
-  margin: 0.25em;
-}
-
-.container {
-  padding : 1em;
-}
-
-.log {
-  margin: 0;
-  padding: 0.4em;
-  background: #CCC;
-  color: gray;
-  font-style: italic;
-}
-
-

Modified: kukit/kss.demo/trunk/kss/demo/browser/header_macros.pt
==============================================================================
--- kukit/kss.demo/trunk/kss/demo/browser/header_macros.pt	(original)
+++ kukit/kss.demo/trunk/kss/demo/browser/header_macros.pt	Thu Jan 10 13:54:45 2008
@@ -15,9 +15,6 @@
     
     <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 
-    <link rel="stylesheet" type="text/css"
-          tal:attributes="href string:${context/@@absolute_url}/++resource++demo.css"/>
-    
     <link rel="kinetic-stylesheet" type="text/css"
           tal:attributes="href mainkss"/>
     

Modified: kukit/kss.demo/trunk/kss/demo/browser/kss_demo_index.pt
==============================================================================
--- kukit/kss.demo/trunk/kss/demo/browser/kss_demo_index.pt	(original)
+++ kukit/kss.demo/trunk/kss/demo/browser/kss_demo_index.pt	Thu Jan 10 13:54:45 2008
@@ -1,8 +1,6 @@
 <html>
   <head>
     <link rel="stylesheet" type="text/css"
-          tal:attributes="href string:${context/@@absolute_url}/++resource++demo.css"/>
-    <link rel="stylesheet" type="text/css"
           tal:attributes="href string:${context/@@absolute_url}/@@kss_devel_mode/ui_css"/>
   </head>
   <body>

Modified: kukit/kss.demo/trunk/kss/demo/browser/registry.py
==============================================================================
--- kukit/kss.demo/trunk/kss/demo/browser/registry.py	(original)
+++ kukit/kss.demo/trunk/kss/demo/browser/registry.py	Thu Jan 10 13:54:45 2008
@@ -64,6 +64,12 @@
         elif filename.lower().endswith('.htm'):
             filename = filename[:-4]
         words = os.path.basename(filename).split('_')
+        # if the first word is a number: it is ignored in the title
+        # This can be used to somelimited ordering, since filenames
+        # are listed in alphabetical order, ie. 00_xxx.html will come first.
+        if not words[0] or '0' <= words[0][0] <= '9':
+            words = words[1:]
+        # Compile the result.
         result = ' '.join([word.capitalize() for word in words])
         return result
 

Modified: kukit/kss.demo/trunk/kss/demo/registry.py
==============================================================================
--- kukit/kss.demo/trunk/kss/demo/registry.py	(original)
+++ kukit/kss.demo/trunk/kss/demo/registry.py	Thu Jan 10 13:54:45 2008
@@ -140,7 +140,8 @@
     def registerSeleniumTestsFromPlugin(self, plugin, registration=None, event=None, new_event=None):
         """Add a demo collection to the registry.
         """
-        for test_filename in self._getSeleniumTestsFromPlugin(plugin):
+        test_filenames = self._getSeleniumTestsFromPlugin(plugin)
+        for test_filename in test_filenames:
             self.registerSeleniumTestFile(test_filename)
 
     @adapter(IKSSSeleniumTestResource, IUtilityRegistration, IUnregistered, IKSSDemoRegistrationEvent)

Modified: kukit/kss.demo/trunk/kss/demo/selenium_utils/builder.py
==============================================================================
--- kukit/kss.demo/trunk/kss/demo/selenium_utils/builder.py	(original)
+++ kukit/kss.demo/trunk/kss/demo/selenium_utils/builder.py	Thu Jan 10 13:54:45 2008
@@ -1,4 +1,3 @@
-
 import sys, os, re, textwrap
 from elementtree import HTMLTreeBuilder
 from string import Template
@@ -31,7 +30,11 @@
     for test_filename in os.listdir(tests_root_dir):
         if test_filename.lower().endswith('.html') or \
                 test_filename.endswith('.htm'):
-            test_filenames.append(os.path.join(tests_root_dir, test_filename))
+            test_filenames.append((test_filename, os.path.join(tests_root_dir, test_filename)))
+    # sort the testfilenames
+    test_filenames.sort()
+    # return only the absolute filenames
+    test_filenames = [filename[1] for filename in test_filenames]
     return test_filenames
 
 template = Template(textwrap.dedent('''\

Modified: kukit/kss.demo/trunk/setup.py
==============================================================================
--- kukit/kss.demo/trunk/setup.py	(original)
+++ kukit/kss.demo/trunk/setup.py	Thu Jan 10 13:54:45 2008
@@ -26,6 +26,7 @@
       zip_safe=False,
       install_requires=[
           # -*- Extra requirements: -*-
+          'setuptools',
           'kss.core>=dev',
       ],
       entry_points="""


More information about the Kukit-checkins mailing list