From b7e2aa091d9c9f7be6aa0c155feb9bf8d6f30392 Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Thu, 26 Aug 2010 11:20:11 +0000
Subject: [PATCH] Adjust due to changes in listbox page navigation.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38032 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../listbox_zuite/testPagerInViewMode.xml     | 21 ++++-----
 .../listbox_zuite/testRedirect.xml            | 43 +++++++++----------
 .../listbox_zuite/testReportTree.xml          |  9 ++--
 .../testReportTreeWithStatMethod.xml          |  9 ++--
 .../listbox_zuite/testViewMode.xml            | 19 ++++----
 bt5/erp5_ui_test/bt/revision                  |  2 +-
 6 files changed, 44 insertions(+), 59 deletions(-)

diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPagerInViewMode.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPagerInViewMode.xml
index 9996f56a59..060debed4b 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPagerInViewMode.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPagerInViewMode.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>
@@ -97,18 +94,18 @@
 <tal:block tal:repeat="prefix python:range(3)">\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td tal:content="python: \'id=x%s_listbox_next_page\' % (prefix, )"></td>\n
+  <td tal:content="string: //button[@class=&quot;x${prefix}_listbox_next_page&quot;]"></td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementNotPresent</td>\n
-  <td tal:content="python: \'id=x%s_listbox_previous_page\' % (prefix, )"></td>\n
+  <td tal:content="string: //button[@class=&quot;x${prefix}_listbox_previous_page&quot;]"></td>\n
   <td></td>\n
 </tr>\n
 </tal:block>\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=x0_listbox_next_page</td>\n
+  <td>//button[@class="x0_listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tal:block tal:define="prefix string:x0_listbox; \n
@@ -132,12 +129,12 @@
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
   <td>type</td>\n
-  <td>id=x1_listbox_set_page</td>\n
+  <td>//input[@class="x1_listbox_set_page"]</td>\n
   <td>5</td>\n
 </tr>\n
 <tr>\n
   <td>keyPressAndWait</td>\n
-  <td>id=x1_listbox_set_page</td>\n
+  <td>//input[@class="x1_listbox_set_page"]</td>\n
   <td>\\13</td>\n
 </tr>\n
 </tal:block>\n
@@ -168,7 +165,7 @@
 </tal:block>\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=x1_listbox_previous_page</td>\n
+  <td>//button[@class="x1_listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
 \n
@@ -191,7 +188,7 @@
 </tal:block>\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=x1_listbox_last_page</td>\n
+  <td>//button[@class="x1_listbox_last_page"]</td>\n
   <td></td>\n
 </tr>\n
 \n
@@ -203,7 +200,7 @@
 \n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=x1_listbox_first_page</td>\n
+  <td>//button[@class="x1_listbox_first_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tal:block tal:define="prefix string:x0_listbox;\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.xml
index 2794b29c27..eeb28c88c2 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.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>
@@ -148,7 +145,7 @@
 </tr>\n
 <tr>\n
   <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
+  <td>//input[@class="listbox_set_page"]</td>\n
   <td>1</td>\n
 </tr>\n
 <tr>\n
@@ -168,17 +165,17 @@
 </tr>\n
 <tr>\n
   <td>verifyElementNotPresent</td>\n
-  <td>id=listbox_previous_page</td>\n
+  <td>//button[@class="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
@@ -194,7 +191,7 @@
 </tr>\n
 <tr>\n
   <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
+  <td>//input[@class="listbox_set_page"]</td>\n
   <td>2</td>\n
 </tr>\n
 <tr>\n
@@ -214,22 +211,22 @@
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_previous_page</td>\n
+  <td>//button[@class="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>type</td>\n
-  <td>id=listbox_set_page</td>\n
+  <td>//input[@class="listbox_set_page"]</td>\n
   <td>4</td>\n
 </tr>\n
 <tr>\n
   <td>keyPressAndWait</td>\n
-  <td>id=listbox_set_page</td>\n
+  <td>//input[@class="listbox_set_page"]</td>\n
   <td>\\13</td>\n
 </tr>\n
 <tr>\n
@@ -245,7 +242,7 @@
 </tr>\n
 <tr>\n
   <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
+  <td>//input[@class="listbox_set_page"]</td>\n
   <td>4</td>\n
 </tr>\n
 <tr>\n
@@ -255,17 +252,17 @@
 </tr>\n
 <tr>\n
   <td>verifyElementNotPresent</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_previous_page</td>\n
+  <td>//button[@class="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=listbox_previous_page</td>\n
+  <td>//button[@class="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
@@ -281,7 +278,7 @@
 </tr>\n
 <tr>\n
   <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
+  <td>//input[@class="listbox_set_page"]</td>\n
   <td>3</td>\n
 </tr>\n
 <tr>\n
@@ -301,22 +298,22 @@
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_previous_page</td>\n
+  <td>//button[@class="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>type</td>\n
-  <td>id=listbox_set_page</td>\n
+  <td>//input[@class="listbox_set_page"]</td>\n
   <td>1</td>\n
 </tr>\n
 <tr>\n
   <td>keyPressAndWait</td>\n
-  <td>id=listbox_set_page</td>\n
+  <td>//input[@class="listbox_set_page"]</td>\n
   <td>\\13</td>\n
 </tr>\n
 <tr>\n
@@ -331,7 +328,7 @@
 </tr>\n
 <tr>\n
   <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
+  <td>//input[@class="listbox_set_page"]</td>\n
   <td>1</td>\n
 </tr>\n
 <tr>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTree.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTree.xml
index dfdbb11f22..c87f821608 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTree.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTree.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>
@@ -249,7 +246,7 @@
 <!-- Go to next page -->\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
@@ -381,7 +378,7 @@
 <!-- Go to next page -->\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTreeWithStatMethod.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTreeWithStatMethod.xml
index b43eca7bb7..da914aba06 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTreeWithStatMethod.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testReportTreeWithStatMethod.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>
@@ -238,7 +235,7 @@
 <!-- Go to next page -->\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
@@ -370,7 +367,7 @@
 <!-- Go to next page -->\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testViewMode.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testViewMode.xml
index b6db38f900..11c34b9ed9 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testViewMode.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testViewMode.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>
@@ -123,12 +120,12 @@
 \n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementNotPresent</td>\n
-  <td>id=listbox_previous_page</td>\n
+  <td>//button[@class="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
@@ -230,7 +227,7 @@
 <!-- Go to next page -->\n
 <tr>\n
   <td>clickAndWait</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 \n
@@ -242,12 +239,12 @@
 \n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_previous_page</td>\n
+  <td>//button[@class="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
@@ -368,12 +365,12 @@
 \n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_next_page</td>\n
+  <td>//button[@class="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
   <td>verifyElementPresent</td>\n
-  <td>id=listbox_previous_page</td>\n
+  <td>//button[@class="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
 <tr>\n
diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision
index ec28ec146d..7b5a1ce4fd 100644
--- a/bt5/erp5_ui_test/bt/revision
+++ b/bt5/erp5_ui_test/bt/revision
@@ -1 +1 @@
-588
\ No newline at end of file
+589
\ No newline at end of file
-- 
2.30.9