This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new a3fc1e8  Fixed: Convert  InvoicePerShipmentTests.xml to Groovy 
(OFBIZ-11553)
a3fc1e8 is described below

commit a3fc1e8205995aa8438df9bd0c2927dd8cbc6667
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Sun Jul 26 08:45:39 2020 +0200

    Fixed: Convert  InvoicePerShipmentTests.xml to Groovy (OFBIZ-11553)
    
    The order created with test case testCreateOrderServiceProduct did not get
    approved so the quick ship process did not work correctly while with 
specific
    configurableServiceOrder-test new order has got approved and the quick ship
    process worked correctly.
    
    We got multiple payment methods i.e. EXT_PAYPAL and EXT_COD but in the test 
case
    only EXT_COD was defined.
    
    Without shopping cart tests testIntegration works perfectly.
    
    Shopping cart has multiple payment methods, and as cart has multiple payment
    methods, order is not approved
    (org/apache/ofbiz/order/shoppingcart/CheckOutHelper.java:1166)
    
    This ensures single paymentMethod. It could reviewed again when converting
    ShoppingCartTests.xml to Groovy. I have added a comment about that
    
    Thanks: Pawan and Suraj
---
 applications/order/minilang/test/ShoppingCartTests.xml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/applications/order/minilang/test/ShoppingCartTests.xml 
b/applications/order/minilang/test/ShoppingCartTests.xml
index 0e4e08a..3d4826c 100644
--- a/applications/order/minilang/test/ShoppingCartTests.xml
+++ b/applications/order/minilang/test/ShoppingCartTests.xml
@@ -616,6 +616,11 @@ under the License.
         <set field="testParams.checkOutPaymentId" value="EXT_COD"/>
         <set field="testParams.is_gift" value="false"/>
         <set field="testParams.may_split" value="false"/>
+        <!-- This is a temporary solution, maybe always needed. It was put in 
because of OFBIZ-11553-->
+        <script>groovy:
+            request.removeParameter("checkOutPaymentId")
+            request.removeAttribute("checkOutPaymentId")
+        </script>
         <call-object-method method-name="addParameters" obj-field="request">
             <field field="testParams" type="java.util.Map"/>
         </call-object-method>

Reply via email to