From 2687dae1202aab270a07fa999be3f7e18d0fe75c Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Mon, 2 Apr 2012 13:54:20 -0300
Subject: [PATCH] Unify Test when run with Configurators Cases

The test should be compatible with Configurator Outcome and w/o
Configurator case. This change unify outcome of those 2 cases,
making it compatible when run into diferent scenarios.
---
 .../portal_categories/delivery_mode/air.xml          |  2 +-
 .../portal_categories/incoterm/cpt.xml               |  2 +-
 .../user_tutorial_zuite/testHowToSaleOrder.xml       | 12 ++++++------
 .../Zuite_viewTestMacroLibrary.xml                   |  7 +++++++
 4 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/delivery_mode/air.xml b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/delivery_mode/air.xml
index e8c9eb938d..953c05ad28 100644
--- a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/delivery_mode/air.xml
+++ b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/delivery_mode/air.xml
@@ -69,7 +69,7 @@
         </item>
         <item>
             <key> <string>title</string> </key>
-            <value> <string>AIR</string> </value>
+            <value> <string>By Air</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/incoterm/cpt.xml b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/incoterm/cpt.xml
index 8466fdf068..db31eb51af 100644
--- a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/incoterm/cpt.xml
+++ b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_categories/incoterm/cpt.xml
@@ -77,7 +77,7 @@
         </item>
         <item>
             <key> <string>title</string> </key>
-            <value> <string>CPT</string> </value>
+            <value> <string>Carriage Paid To</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml
index 01bdbdf221..654a3d152d 100644
--- a/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml
+++ b/bt5/erp5_user_tutorial_ui_test/PathTemplateItem/portal_tests/user_tutorial_zuite/testHowToSaleOrder.xml
@@ -123,18 +123,18 @@
 <tr>\n
   <td>select</td>\n
   <td>//select[@name="field_my_delivery_mode"]</td>\n
-  <td>AIR</td>\n
+  <td>By Air</td>\n
 </tr>\n
 <tr>\n
   <td>select</td>\n
   <td>//select[@name="field_my_incoterm"]</td>\n
-  <td>CPT</td>\n
+  <td>Carriage Paid To</td>\n
 </tr>\n
 \n
 <tr>\n
   <td>type</td>\n
   <td>//input[@name="field_my_specialise_title"]</td>\n
-  <td>Default Sale Order Trade Condition</td>\n
+  <td>General Sale Trade Condition</td>\n
 </tr>\n
 <tr>\n
   <td>type</td>\n
@@ -159,12 +159,12 @@
 <tr>\n
   <td>type</td>\n
   <td>//input[@name="subfield_field_my_start_date_month"]</td>\n
-  <td>01</td>\n
+  <td tal:content="python: here.Zuite_getHowToInfo()[\'now\'].strftime(\'%m\')">01</td>\n
 </tr>\n
 <tr>\n
   <td>type</td>\n
   <td>//input[@name="subfield_field_my_start_date_day"]</td>\n
-  <td>01</td>\n
+  <td tal:content="python: here.Zuite_getHowToInfo()[\'now\'].strftime(\'%d\')">01</td>\n
 </tr>\n
 <tr>\n
   <td>type</td>\n
@@ -179,7 +179,7 @@
 <tr>\n
   <td>type</td>\n
   <td>//input[@name="subfield_field_my_stop_date_day"]</td>\n
-  <td>01</td>\n
+  <td>31</td>\n
 </tr>\n
 <tr>\n
   <td>clickAndWait</td>\n
diff --git a/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.xml b/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.xml
index 07a236fa2c..4e7056422d 100644
--- a/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.xml
+++ b/bt5/erp5_user_tutorial_ui_test/SkinTemplateItem/portal_skins/erp5_user_tutorial_ui_test/Zuite_viewTestMacroLibrary.xml
@@ -250,6 +250,13 @@
     <td>5 - Bank</td>\n
   </tr>\n
   </span>\n
+  <span tal:condition="python:\'51 - Bank\' in here.Zuite_getCashAccountRelatedFormattedTitleList()">\n
+  <tr>\n
+    <td>select</td>\n
+    <td>//select[@name="field_your_node"]</td>\n
+    <td>51 - Bank</td>\n
+  </tr>\n
+  </span>\n
   <span tal:condition="python:\'512 - Banques\' in here.Zuite_getCashAccountRelatedFormattedTitleList()">\n
    <tr>\n
     <td>select</td>\n
-- 
2.30.9