From 75fb36c8c009582b162454a11c4f039c4723a562 Mon Sep 17 00:00:00 2001
From: Mohamadou Mbengue <mmbengue@gmail.com>
Date: Thu, 20 Aug 2009 10:49:54 +0000
Subject: [PATCH] 2009-08-20 Mohamadou * Update  "listbox_dialog_mode_zuite" to
 support mobile ui tests.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28486 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../listbox_dialog_mode_zuite/testPager.xml   | 53 +++++++++++++++++--
 .../testQuickSearch.xml                       |  8 +--
 .../testQuickSort.xml                         |  5 +-
 bt5/erp5_ui_test/bt/revision                  |  2 +-
 4 files changed, 59 insertions(+), 9 deletions(-)

diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testPager.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testPager.xml
index 9b0ebec414..2af358c657 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testPager.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testPager.xml
@@ -135,9 +135,16 @@
   <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
 <tr>\n
   <td>verifyElementPresent</td>\n
@@ -197,9 +204,16 @@
 <!--tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/verify_dialog" /-->\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
 <tr>\n
   <td>verifyElementPresent</td>\n
@@ -241,9 +255,16 @@
 </tr>\n
 <tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/verify_dialog" />\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
 <tr>\n
   <td>verifyElementPresent</td>\n
@@ -277,16 +298,28 @@
 </tr>\n
 \n
 <!-- Select page -->\n
+<!-- In mobile skin we do not use listbox_set_page \n
+     so change the page with the select -->\n
+<tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
   <td>type</td>\n
   <td>id=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>\\13</td>\n
+   <td>keyPressAndWait</td>\n
+   <td>id=listbox_set_page</td>\n
+   <td>\\13</td>\n
 </tr>\n
+</tal:block>\n
+<tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
+<tr>\n
+   <td>select</td>\n
+   <td>id=listbox_page_selection</td>\n
+   <td>4 of 4</td>\n
+</tr>\n
+</tal:block>\n
+\n
 <!--tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/verify_dialog" /-->\n
 <tr>\n
   <td>assertTextPresent</td>\n
@@ -304,9 +337,16 @@
   <td> - 1 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>4</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>9</td>\n
+</tal:block>\n
 </tr>\n
 <tr>\n
   <td>verifyElementNotPresent</td>\n
@@ -346,9 +386,16 @@
   <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
 <tr>\n
   <td>verifyElementPresent</td>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testQuickSearch.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testQuickSearch.xml
index 8d0826f5d9..d53c40128f 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testQuickSearch.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testQuickSearch.xml
@@ -53,16 +53,16 @@
 <tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/init" />\n
 <!-- Search by id -->\n
 <tr>\n
- <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
+<tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
   <td>type</td>\n
   <td>//tr[@id="listbox_search_line"]/td[2]//input</td>\n
   <td>1</td>\n
- </tal:block>\n
- <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
+</tal:block>\n
+<tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
   <td>type</td>\n
   <td>//div[@id="listbox_search_line"]//input[@id="input0"]</td>\n
   <td>1</td>\n
- </tal:block>\n
+</tal:block>\n
 </tr>\n
 <!--\n
 <tr>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testQuickSort.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testQuickSort.xml
index 7ce931db79..6b1b3e6e98 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testQuickSort.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_dialog_mode_zuite/testQuickSort.xml
@@ -50,6 +50,9 @@
 <thead>\n
 <tr><td rowspan="1" colspan="3">Test Quick Sort</td></tr>\n
 </thead><tbody>\n
+<!-- Mobile listbox columns label are not clickable for quick sorting\n
+     So this test is skipped -->\n
+<tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tal:block metal:use-macro="here/ListBoxDialogModeZuite_CommonTemplate/macros/init" />\n
 <tr>\n
   <td>assertElementPresent</td>\n
@@ -140,7 +143,7 @@
   <td>id=listbox_data_line_3</td>\n
   <td></td>\n
 </tr>\n
-\n
+</tal:block>\n
 </tbody></table>\n
 </body>\n
 </html>\n
diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision
index 495ae252f0..88101bccd4 100644
--- a/bt5/erp5_ui_test/bt/revision
+++ b/bt5/erp5_ui_test/bt/revision
@@ -1 +1 @@
-464
\ No newline at end of file
+465
\ No newline at end of file
-- 
2.30.9