From 4e4625385e259180d95d9b9f8b75d47cd15eec4f Mon Sep 17 00:00:00 2001
From: Mohamadou Mbengue <mmbengue@gmail.com>
Date: Mon, 28 Sep 2009 11:54:08 +0000
Subject: [PATCH] 2009-09-29 mohamadou * Use checkCurrentPage to check page
 number

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29202 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_tests/listbox_zuite/testPager.xml  | 92 +++++++------------
 .../listbox_zuite/testRedirect.xml            |  2 +-
 .../listbox_zuite/testViewMode.xml            | 62 ++++++-------
 ...ltiRelationFieldSearchDialogChangePage.xml | 90 +++++++-----------
 .../testRelationFieldWheelWithListbox.xml     | 69 +++++---------
 .../testSimpleRelationFieldPageChange.xml     | 86 ++++++-----------
 ...pleRelationFieldSearchDialogChangePage.xml | 56 ++++-------
 bt5/erp5_ui_test/bt/revision                  |  2 +-
 8 files changed, 167 insertions(+), 292 deletions(-)

diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPager.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPager.xml
index 5e4d5c3bbf..4b2d1f5fd7 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPager.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPager.xml
@@ -157,18 +157,13 @@
   <td>id=listbox_item_number</td>\n
   <td> - 0 item(s) selected</td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -205,18 +200,13 @@
   <td>id=listbox_next_page</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -253,18 +243,13 @@
   <td>id=listbox_previous_page</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -307,11 +292,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr> \n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>4</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -319,11 +299,12 @@
   <td>id=listbox_page_selection</td>\n
   <td>4 of 4</td>\n
 </tr>\n
-<tr>\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>9</td>\n
-</tr>\n
+</tal:block>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:4;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
 </tal:block>\n
 \n
 <tr>\n
@@ -367,18 +348,13 @@
   <td>id=listbox_item_number</td>\n
   <td> - 0 item(s) selected</td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>6</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementNotPresent</td>\n
   <td>id=listbox_next_page</td>\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 b754d8550c..a4a2c0b040 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
@@ -51,7 +51,7 @@
 <tr><td rowspan="1" colspan="3">Test ListBox Redirections</td></tr>\n
 </thead><tbody>\n
 <!-- XXX Report tree mode doesn\'t exists in mobile\n
-     So this test is skipped -->\n
+     So this test is skipped in mobile ui tests-->\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 \n
 <!--\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 410848bb64..968844cb0a 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
@@ -108,18 +108,19 @@
   <td>id=listbox_item_number</td>\n
   <td> - 0 item(s) selected</td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-  </tal:block>\n
-</tr>\n
+<!-- \n
+  To check page number use ListBoxZuite_CommonTemplate/macros/checkCurrentPage to reduce \n
+  "if TestTool_getSkinName()!=\'Mobile\'" statements\n
+  - prefix is gives the prefix of the id of the element containing the page number\n
+  - set_page the number of the page\n
+  - lines_per_page is used in mobile because there isn\'t "listbox_set_page" element\n
+-->\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -233,18 +234,12 @@
   <td></td>\n
 </tr>\n
 \n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-</tr>\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -364,18 +359,13 @@
   <td>Base_edit:method</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testMultiRelationFieldSearchDialogChangePage.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testMultiRelationFieldSearchDialogChangePage.xml
index c2828d7693..439027daed 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testMultiRelationFieldSearchDialogChangePage.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testMultiRelationFieldSearchDialogChangePage.xml
@@ -118,18 +118,13 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -141,18 +136,13 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -164,18 +154,12 @@
   <td>//input[@id="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
@@ -197,18 +181,12 @@
 </tr>\n
 </tal:block>\n
 \n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-  </tal:block>\n
-</tr>\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -226,11 +204,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr>\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>3</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -238,11 +211,12 @@
   <td>id=listbox_page_selection</td>\n
   <td>3 of 3</td>\n
 </tr>\n
-<tr>\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-</tr>\n
+</tal:block>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
 </tal:block>\n
 \n
 <tr>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testRelationFieldWheelWithListbox.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testRelationFieldWheelWithListbox.xml
index 9fc8837a38..0e5ee2dc3c 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testRelationFieldWheelWithListbox.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testRelationFieldWheelWithListbox.xml
@@ -114,54 +114,36 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>clickAndWait</td>\n
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>clickAndWait</td>\n
   <td>//input[@id="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
@@ -174,11 +156,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr>\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -186,13 +163,13 @@
   <td>id=listbox_page_selection</td>\n
   <td>1 of 19</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-</tr>\n
 </tal:block>\n
 \n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>click</td>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldPageChange.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldPageChange.xml
index bb39427bd9..016200f42b 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldPageChange.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldPageChange.xml
@@ -97,54 +97,36 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>clickAndWait</td>\n
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>clickAndWait</td>\n
   <td>//input[@id="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
@@ -157,11 +139,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>1</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -169,11 +146,12 @@
   <td>id=listbox_page_selection</td>\n
   <td>1 of 135</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-</tr>\n
+</tal:block>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
 </tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
@@ -187,11 +165,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -199,11 +172,12 @@
   <td>id=listbox_page_selection</td>\n
   <td>3 of 135</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-</tr>\n
+</tal:block>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
 </tal:block>\n
 \n
 <tr>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldSearchDialogChangePage.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldSearchDialogChangePage.xml
index f6907e5c8d..9004ba617b 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldSearchDialogChangePage.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldSearchDialogChangePage.xml
@@ -107,18 +107,13 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -130,18 +125,13 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -153,18 +143,12 @@
   <td>//input[@id="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision
index 560731b56b..4f09af7132 100644
--- a/bt5/erp5_ui_test/bt/revision
+++ b/bt5/erp5_ui_test/bt/revision
@@ -1 +1 @@
-490
\ No newline at end of file
+492
\ No newline at end of file
-- 
2.30.9