From 46b27465d9f78f8bff21c4f6b210dd709ecb2b43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 30 Oct 2006 08:41:35 +0000
Subject: [PATCH] Checks that clicking on the filter button toggle invert mode
 on and off while remembering selected items and search parameters.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11001 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_tests/listbox_zuite/testFilter.xml | 101 ++++++++++++++++++
 bt5/erp5_ui_test/bt/revision                  |   2 +-
 2 files changed, 102 insertions(+), 1 deletion(-)

diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testFilter.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testFilter.xml
index 1638577634..364055c506 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testFilter.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testFilter.xml
@@ -44,6 +44,12 @@
               </object>
             </value>
         </item>
+        <item>
+            <key> <string>_dav_writelocks</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
         <item>
             <key> <string>_text</string> </key>
             <value> <string encoding="cdata"><![CDATA[
@@ -438,6 +444,80 @@
 \t<td>off</td>\n
 </tr>\n
 \n
+<!-- Clicking again on the filter button reset the filter, and selected items\n
+and search parameters are remembered -->\n
+<tr>\n
+\t<td>type</td>\n
+\t<td>title</td>\n
+\t<td>Title</td>\n
+</tr>\n
+<tr>\n
+\t<td>clickAndWait</td>\n
+\t<td>Base_doSelect:method</td>\n
+\t<td></td>\n
+</tr>\n
+<tr>\n
+\t<td>click</td>\n
+\t<td>//tr[@id="listbox_data_line_0"]/td//input</td>\n
+\t<td></td>\n
+</tr>\n
+<tr>\n
+\t<td>click</td>\n
+\t<td>//tr[@id="listbox_data_line_2"]/td//input</td>\n
+\t<td></td>\n
+</tr>\n
+<tr>\n
+\t<td>clickAndWait</td>\n
+\t<td>Folder_filter:method</td>\n
+\t<td></td>\n
+</tr>\n
+<tr>\n
+\t<td>verifyText</td>\n
+\t<td>id=listbox_record_number</td>\n
+\t<td>2 record(s)</td>\n
+</tr>\n
+<tr>\n
+\t<td>verifyText</td>\n
+\t<td>id=listbox_item_number</td>\n
+\t<td> - 2 item(s) selected</td>\n
+</tr>\n
+<!-- reset the filter -->\n
+<tr>\n
+\t<td>clickAndWait</td>\n
+\t<td>Folder_filter:method</td>\n
+\t<td></td>\n
+</tr>\n
+<tr>\n
+\t<td>verifyText</td>\n
+\t<td>id=listbox_record_number</td>\n
+\t<td>10 record(s)</td>\n
+</tr>\n
+<tr>\n
+\t<td>verifyText</td>\n
+\t<td>id=listbox_item_number</td>\n
+\t<td> - 2 item(s) selected</td>\n
+</tr>\n
+<tr>\n
+\t<td>verifyValue</td>\n
+\t<td>//tr[@id="listbox_data_line_0"]/td//input</td>\n
+\t<td>on</td>\n
+</tr>\n
+<tr>\n
+\t<td>verifyValue</td>\n
+\t<td>//tr[@id="listbox_data_line_1"]/td//input</td>\n
+\t<td>off</td>\n
+</tr>\n
+<tr>\n
+\t<td>verifyValue</td>\n
+\t<td>//tr[@id="listbox_data_line_2"]/td//input</td>\n
+\t<td>on</td>\n
+</tr>\n
+<tr>\n
+\t<td>verifyValue</td>\n
+\t<td>title</td>\n
+\t<td>Title</td>\n
+</tr>\n
+\n
 </tbody></table>\n
 </body>\n
 </html>\n
@@ -464,4 +544,25 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Persistence</string>
+          <string>PersistentMapping</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_container</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>
diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision
index 3fbd193e4a..d25720879e 100644
--- a/bt5/erp5_ui_test/bt/revision
+++ b/bt5/erp5_ui_test/bt/revision
@@ -1 +1 @@
-106
\ No newline at end of file
+112
\ No newline at end of file
-- 
2.30.9