Author: jmorliaguet
Date: Wed May 10 20:53:09 2006
New Revision: 3097

Modified:
   
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/configure.zcml
   
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/cpsskins_panels.pt
   
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/form.pt
   
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/views.py

Log:

- more thorough test to make sure to all views controlled by a same remote
  scripting controller are getting refreshed.



Modified: 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/configure.zcml
==============================================================================
--- 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/configure.zcml
     (original)
+++ 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/configure.zcml
     Wed May 10 20:53:09 2006
@@ -29,6 +29,11 @@
         attribute="doSomething"
     />
 
+    <page
+        name="getDateTime"
+        attribute="getDateTime"
+    />
+
   </browser:pages>
 
 </configure>

Modified: 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/cpsskins_panels.pt
==============================================================================
--- 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/cpsskins_panels.pt
 (original)
+++ 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/cpsskins_panels.pt
 Wed May 10 20:53:09 2006
@@ -57,6 +57,22 @@
   }}
   </ins>
 
+  <ins class="model">
+  {"id": "panel3",
+   "data": {
+     "url": "@@panels-form.html",
+     "form": {}
+  }}
+  </ins>
+
+  <ins class="model">
+  {"id": "panel4",
+   "data": {
+     "url": "@@panels-form.html",
+     "form": {}
+  }}
+  </ins>
+
   <div class="box">
     <ins class="view">
     {"id": "panel-view",
@@ -88,6 +104,48 @@
     }}
     </ins>
   </div>
+  
+  <table>
+  <tr>
+  <td>
+  <div class="box">
+    <ins class="view">
+    {"id": "panel-view-3",
+     "model": "panel3",
+     "perspectives": ["default"],
+     "controllers": ["show-panel", "request3", "request4"],
+     "widget": {
+       "type": "panel"
+     },
+     "render_effect": {
+       "transition": "fadein",
+       "duration": 500
+    }}
+    </ins>
+  </div>
+
+  </td>
+  <td>
+
+  <div class="box">
+    <ins class="view">
+    {"id": "panel-view-4",
+     "model": "panel4",
+     "perspectives": ["default"],
+     "controllers": ["show-panel", "request3", "request4"],
+     "widget": {
+       "type": "panel"
+     },
+     "render_effect": {
+       "transition": "fadein",
+       "duration": 500
+    }}
+    </ins>
+  </div>
+
+  </td>
+  </tr>
+  </table>
 
   <ins class="controller">
   {"id": "request1",
@@ -102,6 +160,18 @@
   </ins>
 
   <ins class="controller">
+  {"id": "request3",
+   "type": "remote scripting"
+  }
+  </ins>
+
+  <ins class="controller">
+  {"id": "request4",
+   "type": "remote scripting"
+  }
+  </ins>
+
+  <ins class="controller">
   {"id": "show-panel",
    "type": "perspective selector",
    "initial": "default"

Modified: 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/form.pt
==============================================================================
--- 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/form.pt
    (original)
+++ 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/form.pt
    Wed May 10 20:53:09 2006
@@ -20,4 +20,6 @@
     <input type="hidden" name="param" value="1" />
   </p>
 
+  <em tal:content="view/@@getDateTime" />
+
 </form>

Modified: 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/views.py
==============================================================================
--- 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/views.py
   (original)
+++ 
cpsskins/branches/paris-sprint-2006/lib/cpsskins/tests/functional/panels/views.py
   Wed May 10 20:53:09 2006
@@ -1,4 +1,6 @@
 
+from time import gmtime, strftime
+
 from zope.publisher.browser import BrowserView
 
 from cpsskins import minjson as json
@@ -8,3 +10,6 @@
     def doSomething(self):
         self.request.response.setHeader('content-type', 'text/x-json')
         return json.write({'form': {'updated': 1}})
+
+    def getDateTime(self):
+        return strftime("%a, %d %b %Y %H:%M:%S", gmtime())
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to