From c924117a39d224f0131a8ea0a1dbf05ffb0c30b5 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Sat, 13 Jan 2007 10:25:58 +0000
Subject: [PATCH] 2007-01-13 Fix bug #55

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12053 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../listbox_zuite/testEditableError.xml       | 148 +++++++++++++++++-
 .../listbox_zuite/testViewMode.xml            |   6 +-
 2 files changed, 146 insertions(+), 8 deletions(-)

diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testEditableError.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testEditableError.xml
index 1eb938a86d..131175884c 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testEditableError.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testEditableError.xml
@@ -112,7 +112,7 @@
   <td>type</td>\n
   <td>//tr[@id="listbox_data_line_0"]/td[3]/input</td>\n
   <td>aaa</td>\n
-  <td>We type some sting in a float field</td>\n
+  <td>We type some string in a float field</td>\n
 </tr>\n
 <tr>\n
   <td>clickAndWait</td>\n
@@ -122,15 +122,45 @@
 </tr>\n
 <tr>\n
   <td>verifyValue</td>\n
-  <td>//tr[@id="listbox_data_line_0"]/td[3]/input</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[3]/input[1]</td>\n
   <td>aaa</td>\n
   <td>We check that aaa is still present</td>\n
 </tr>\n
 <tr>\n
   <td>type</td>\n
-  <td>//tr[@id="listbox_data_line_0"]/td[4]/input</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[1]</td>\n
+  <td>bbb</td>\n
+  <td>We type some string in a date field</td>\n
+</tr>\n
+<tr>\n
+  <td>clickAndWait</td>\n
+  <td>//button[@title=\'Save\']</td>\n
+  <td></td>\n
+  <td>And save</td>\n
+</tr>\n
+<tr>\n
+  <td>verifyValue</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[1]</td>\n
+  <td>bbb</td>\n
+  <td>We check that bbb is still present</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>field_my_foo_big_category_title</td>\n
+  <td>c%</td>\n
+  <td>We type some category expression</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[3]/input[1]</td>\n
+  <td>aaa</td>\n
+  <td>We type some string in a float field</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[1]</td>\n
   <td>bbb</td>\n
-  <td>We type some sting in a date field</td>\n
+  <td>We type some string in a date field</td>\n
 </tr>\n
 <tr>\n
   <td>clickAndWait</td>\n
@@ -140,7 +170,115 @@
 </tr>\n
 <tr>\n
   <td>verifyValue</td>\n
-  <td>//tr[@id="listbox_data_line_0"]/td[4]/input</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[3]/input[1]</td>\n
+  <td>aaa</td>\n
+  <td>We check that aaa is still present</td>\n
+</tr>\n
+<tr>\n
+  <td>verifyValue</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[1]</td>\n
+  <td>bbb</td>\n
+  <td>We check that bbb is still present</td>\n
+</tr>\n
+<tr>\n
+  <td>open</td>\n
+  <td>${base_url}/foo_module/0/view</td>\n
+  <td></td>\n
+  <td>Go to first line</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>field_my_foo_big_category_title</td>\n
+  <td>c%</td>\n
+  <td>We type some category expression</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[3]/input[1]</td>\n
+  <td>100</td>\n
+  <td>We type some value in a float field</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[1]</td>\n
+  <td>2000</td>\n
+  <td>We type some value in a date field</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[2]</td>\n
+  <td>01</td>\n
+  <td>We type some value in a date field</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[3]</td>\n
+  <td>02</td>\n
+  <td>We type some value in a date field</td>\n
+</tr>\n
+<tr>\n
+  <td>clickAndWait</td>\n
+  <td>//button[@title=\'Save\']</td>\n
+  <td></td>\n
+  <td>And save</td>\n
+</tr>\n
+<tr>\n
+  <td>verifyValue</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[3]/input[1]</td>\n
+  <td>100.0</td>\n
+  <td>We check that 100 is still present</td>\n
+</tr>\n
+<tr>\n
+  <td>verifyValue</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[1]</td>\n
+  <td>2000</td>\n
+  <td>We check that 2000 is still present</td>\n
+</tr>\n
+<tr>\n
+  <td>verifyValue</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[2]</td>\n
+  <td>01</td>\n
+  <td>We check that 01 is still present</td>\n
+</tr>\n
+<tr>\n
+  <td>verifyValue</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[3]</td>\n
+  <td>02</td>\n
+  <td>We check that 01 is still present</td>\n
+</tr>\n
+<tr>\n
+  <td>clickAndWait</td>\n
+  <td>//button[@title=\'Save\']</td>\n
+  <td></td>\n
+  <td>Save for real</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[3]/input[1]</td>\n
+  <td>200.0</td>\n
+  <td>We type some value in a float field</td>\n
+</tr>\n
+<tr>\n
+  <td>type</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[1]</td>\n
+  <td>bbb</td>\n
+  <td>We type some string in a date field</td>\n
+</tr>\n
+<tr>\n
+  <td>clickAndWait</td>\n
+  <td>//button[@title=\'Save\']</td>\n
+  <td></td>\n
+  <td>And save</td>\n
+</tr>\n
+<tr>\n
+  <td>verifyValue</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[3]/input[1]</td>\n
+  <td>200.0</td>\n
+  <td>We check that 200.0 is still present</td>\n
+</tr>\n
+<tr>\n
+  <td>verifyValue</td>\n
+  <td>//tr[@id="listbox_data_line_0"]/td[4]/input[1]</td>\n
   <td>bbb</td>\n
   <td>We check that bbb is still present</td>\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 55f1be68f7..732f2f79ef 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
@@ -96,9 +96,9 @@
 \t<td></td>\n
 </tr>\n
 <tr>\n
-\t<td>assertTitle</td>\n
-\t<td>*Title 0*</td>\n
-\t<td></td>\n
+\t<td>verifyValue</td>\n
+\t<td>field_my_title</td>\n
+\t<td>Title 0</td>\n
 </tr>\n
 <tr>\n
 \t<td>verifyText</td>\n
-- 
2.30.9