From 5decb3bb976c8230183e155437a6bb4620d310a8 Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Tue, 7 Sep 2010 08:27:21 +0000
Subject: [PATCH] Listbox uses no longer Ids but CSS classes. Adjust tests
 accordingly after r38122.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38164 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../testListActionListboxProxy.xml            | 15 +++++-------
 .../testListModeListboxProxy.xml              | 23 ++++++++-----------
 bt5/erp5_ui_test/bt/revision                  |  2 +-
 3 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testListActionListboxProxy.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testListActionListboxProxy.xml
index 7c4c7e87d8..7b1429403a 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testListActionListboxProxy.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testListActionListboxProxy.xml
@@ -2,10 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <tuple>
-        <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
-        <tuple/>
-      </tuple>
+      <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -92,7 +89,7 @@
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>//input[@id=\'listbox_next_page\']</td>\n
+  <td>//button[@class=\'listbox_next_page\']</td>\n
   <td></td>\n
 </tr>\n
 \n
@@ -100,12 +97,12 @@
 \n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=listbox_title</td>\n
+  <td>//a[@class="listbox_title"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementNotPresent</td>\n
-  <td>//input[@id=\'listbox_next_page\']</td>\n
+  <td>//button[@class=\'listbox_next_page\']</td>\n
   <td></td>\n
 </tr>\n
 \n
@@ -113,12 +110,12 @@
 \n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=listbox_title</td>\n
+  <td>//a[@class="listbox_title"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>//input[@id=\'listbox_next_page\']</td>\n
+  <td>//button[@class=\'listbox_next_page\']</td>\n
   <td></td>\n
 </tr>\n
 </tal:block>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testListModeListboxProxy.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testListModeListboxProxy.xml
index a08ec175d8..361932d09f 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testListModeListboxProxy.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/proxy_field_zuite/testListModeListboxProxy.xml
@@ -2,10 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <tuple>
-        <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
-        <tuple/>
-      </tuple>
+      <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -93,31 +90,31 @@
 \n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>listbox_title</td>\n
+  <td>//a[@class="listbox_title"]</td>\n
   <td></td>\n
 </tr>\n
 \n
 <!-- editable fields are here -->\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>//tr[@id=\'listbox_data_line_0\']/td[2]/input</td>\n
+  <td>//tr[@class=\'listbox-data-line-0 DataA\']/td[2]/input</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>//tr[@id=\'listbox_data_line_0\']/td[3]/input</td>\n
+  <td>//tr[@class=\'listbox-data-line-0 DataA\']/td[3]/input</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>//tr[@id=\'listbox_data_line_0\']/td[3]/input</td>\n
+  <td>//tr[@class=\'listbox-data-line-0 DataA\']/td[3]/input</td>\n
   <td></td>\n
 </tr>\n
 \n
 <!-- proxyfield should retrieve TALES recursively -->\n
 <tr>\n
   <td>verifyText</td>\n
-  <td>//tr[@id=\'listbox_data_line_0\']/td[6]</td>\n
+  <td>//tr[@class=\'listbox-data-line-0 DataA\']/td[6]</td>\n
   <td>a constant of forty-two is still the answer</td>\n
 </tr>\n
 \n
@@ -140,8 +137,8 @@
 </tr>\n
 <tr>\n
   <td>verifyText</td>\n
-  <td>listbox_record_number</td>\n
-  <td>1 records</td>\n
+  <td>//span[@class="listbox-current-page-total-number"]</td>\n
+  <td>1</td>\n
 </tr>\n
 <tr>\n
   <td>type</td>\n
@@ -165,8 +162,8 @@
 </tr>\n
 <tr>\n
   <td>verifyText</td>\n
-  <td>listbox_record_number</td>\n
-  <td>1 records</td>\n
+  <td>//span[@class="listbox-current-page-total-number"]</td>\n
+  <td>1</td>\n
 </tr>\n
 </tal:block>\n
 \n
diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision
index 316941dd7d..73623d101c 100644
--- a/bt5/erp5_ui_test/bt/revision
+++ b/bt5/erp5_ui_test/bt/revision
@@ -1 +1 @@
-599
\ No newline at end of file
+600
\ No newline at end of file
-- 
2.30.9