Related to issue 28896: Added some automated tests
authorAlvaro Ferraz <alvaro.ferraz@openbravo.com>
Wed, 30 Sep 2015 17:34:04 +0200
changeset 3759 88b524026c19
parent 3758 ca5c5c3a8ee1
child 3760 a71c3d48c41c
Related to issue 28896: Added some automated tests
src-test/com/openbravo/test/integration/erp/data/generalsetup/enterprise/organization/InformationData.java
src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/AddPaymentProcess.java
src-test/com/openbravo/test/integration/erp/gui/general/enterprise/organization/InformationTab.java
src-test/com/openbravo/test/integration/erp/gui/general/enterprise/organization/OrganizationTab.java
src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression28896In.java
src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression28896Out.java
src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/RegressionSuite.java
src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/build.xml
src-test/com/openbravo/test/integration/erp/testscripts/generalsetup/enterprise/Organization.java
--- a/src-test/com/openbravo/test/integration/erp/data/generalsetup/enterprise/organization/InformationData.java	Wed Sep 30 14:23:36 2015 +0200
+++ b/src-test/com/openbravo/test/integration/erp/data/generalsetup/enterprise/organization/InformationData.java	Wed Sep 30 17:34:04 2015 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo S.L.U. 
- * All portions are Copyright (C) 2011-2012 Openbravo S.L.U.
+ * All portions are Copyright (C) 2011-2015 Openbravo S.L.U.
  * All Rights Reserved.
  * 
  * This class was automatically generated on 2011-03-09 21:37:13
@@ -147,6 +147,20 @@
     }
 
     /**
+     * Set the aPRMPaymentDescription value
+     * 
+     * Description: Purchase Invoice's Reference for Payment Description
+     * 
+     * @param value
+     *          The aPRMPaymentDescription value.
+     * @return The builder for this class.
+     */
+    public Builder purchaseInvoiceReference(String value) {
+      this.dataFields.put("aPRMPaymentDescription", value);
+      return this;
+    }
+
+    /**
      * Build the data object.
      * 
      * @return The data object
--- a/src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/AddPaymentProcess.java	Wed Sep 30 14:23:36 2015 +0200
+++ b/src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/AddPaymentProcess.java	Wed Sep 30 17:34:04 2015 +0200
@@ -290,6 +290,23 @@
    *          The number of the document.
    * @param action
    *          The process action to request after the payment.
+   * @param addPaymentTotalsVerificationData
+   *          Data to verify total fields
+   */
+  public void process(String transactionType, String documentNumber, String action,
+      AddPaymentPopUpData addPaymentTotalsVerificationData) {
+    process(transactionType, documentNumber, action, null, addPaymentTotalsVerificationData);
+  }
+
+  /**
+   * Process payment details.
+   * 
+   * @param transactionType
+   *          The type of the transaction.
+   * @param documentNumber
+   *          The number of the document.
+   * @param action
+   *          The process action to request after the payment.
    * @param overpayment
    *          The overpayment action.
    * @param addPaymentTotalsVerificationData
@@ -313,6 +330,7 @@
       gridOrderInvoice.unselectAll();
       gridOrderInvoice.filter(filterField, documentNumber);
       Sleep.trySleep(1000); // TODO: sync wait for data
+      gridOrderInvoice.waitForDataToLoad();
       gridOrderInvoice.selectRowByNumber(0);
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/com/openbravo/test/integration/erp/gui/general/enterprise/organization/InformationTab.java	Wed Sep 30 17:34:04 2015 +0200
@@ -0,0 +1,54 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo S.L.U. 
+ * All portions are Copyright (C) 2015 Openbravo S.L.U. 
+ * All Rights Reserved. 
+ * Contributor(s):
+ *   Leo Arias <leo.arias@openbravo.com>.
+ ************************************************************************
+ */
+
+package com.openbravo.test.integration.erp.gui.general.enterprise.organization;
+
+import org.apache.log4j.Logger;
+
+import com.openbravo.test.integration.erp.data.generalsetup.enterprise.organization.InformationData;
+import com.openbravo.test.integration.erp.modules.client.application.gui.GeneratedTab;
+
+/**
+ * Executes and verifies actions on OpenbravoERP Information tab.
+ * 
+ * @author aferraz
+ * 
+ */
+public class InformationTab extends GeneratedTab<InformationData> {
+
+  /** Log4j logger for this class. */
+  private static Logger logger = Logger.getLogger(InformationTab.class);
+
+  /** The tab title. */
+  static final String TITLE = "Information";
+  /** The tab identifier. */
+  @SuppressWarnings("hiding")
+  public static final String IDENTIFIER = "170";
+  /** The tab level. */
+  private static final int LEVEL = 1;
+
+  /**
+   * Class constructor.
+   * 
+   */
+  public InformationTab(GeneratedTab<?> parentTab) {
+    super(TITLE, IDENTIFIER, LEVEL, parentTab);
+  }
+}
\ No newline at end of file
--- a/src-test/com/openbravo/test/integration/erp/gui/general/enterprise/organization/OrganizationTab.java	Wed Sep 30 14:23:36 2015 +0200
+++ b/src-test/com/openbravo/test/integration/erp/gui/general/enterprise/organization/OrganizationTab.java	Wed Sep 30 17:34:04 2015 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo S.L.U. 
- * All portions are Copyright (C) 2011-2012 Openbravo S.L.U. 
+ * All portions are Copyright (C) 2011-2015 Openbravo S.L.U. 
  * All Rights Reserved. 
  * Contributor(s):
  *   Leo Arias <leo.arias@openbravo.com>.
@@ -56,6 +56,7 @@
    */
   public OrganizationTab() {
     super(TITLE, IDENTIFIER);
+    addChildTab(new InformationTab(this));
   }
 
   /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression28896In.java	Wed Sep 30 17:34:04 2015 +0200
@@ -0,0 +1,182 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo S.L.U. 
+ * All portions are Copyright (C) 2015 Openbravo S.L.U. 
+ * All Rights Reserved. 
+ * Contributor(s):
+ *  Leo Arias <leo.arias@openbravo.com>.
+ ************************************************************************
+ */
+
+package com.openbravo.test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions;
+
+import java.text.ParseException;
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.apache.log4j.Logger;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+import com.openbravo.test.integration.erp.data.LogInData;
+import com.openbravo.test.integration.erp.data.financial.receivablespayables.transactions.AddPaymentPopUpData;
+import com.openbravo.test.integration.erp.data.generalsetup.enterprise.organization.InformationData;
+import com.openbravo.test.integration.erp.data.generalsetup.enterprise.organization.OrganizationData;
+import com.openbravo.test.integration.erp.data.sales.transactions.salesinvoice.SalesInvoiceHeaderData;
+import com.openbravo.test.integration.erp.data.sales.transactions.salesinvoice.SalesInvoiceLinesData;
+import com.openbravo.test.integration.erp.data.selectors.BusinessPartnerSelectorData;
+import com.openbravo.test.integration.erp.data.selectors.ProductSimpleSelectorData;
+import com.openbravo.test.integration.erp.gui.financial.receivablespayables.transactions.AddPaymentProcess;
+import com.openbravo.test.integration.erp.testscripts.OpenbravoERPTest;
+import com.openbravo.test.integration.erp.testscripts.OpenbravoERPTestException;
+import com.openbravo.test.integration.erp.testscripts.generalsetup.enterprise.Organization;
+import com.openbravo.test.integration.erp.testscripts.sales.transactions.SalesInvoice;
+import com.openbravo.test.integration.selenium.Sleep;
+
+/**
+ * Test regression 28896
+ * 
+ * @author aferraz
+ */
+@RunWith(Parameterized.class)
+public class APRRegression28896In extends OpenbravoERPTest {
+
+  /** Log4j logger for this class. */
+  private static Logger logger = Logger.getLogger(APRRegression28896In.class);
+
+  /* Data for this test. */
+
+  OrganizationData organizationData;
+  InformationData informationData;
+  SalesInvoiceHeaderData salesInvoiceHeaderData;
+  SalesInvoiceHeaderData salesInvoiceHeaderVerificationData;
+  SalesInvoiceLinesData salesInvoiceLineData;
+  SalesInvoiceLinesData salesInvoiceLineVerificationData;
+  SalesInvoiceHeaderData completedSalesInvoiceHeaderVerificationData;
+  AddPaymentPopUpData addPaymentVerificationData;
+  SalesInvoiceHeaderData completedSalesInvoiceHeaderVerificationData2;
+  InformationData informationData2;
+
+  /**
+   * Class constructor.
+   * 
+   */
+  public APRRegression28896In(OrganizationData organizationData, InformationData informationData,
+      SalesInvoiceHeaderData salesInvoiceHeaderData,
+      SalesInvoiceHeaderData salesInvoiceHeaderVerificationData,
+      SalesInvoiceLinesData salesInvoiceLineData,
+      SalesInvoiceLinesData salesInvoiceLineVerificationData,
+      SalesInvoiceHeaderData completedSalesInvoiceHeaderVerificationData,
+      AddPaymentPopUpData addPaymentVerificationData,
+      SalesInvoiceHeaderData completedSalesInvoiceHeaderVerificationData2,
+      InformationData informationData2) {
+    this.organizationData = organizationData;
+    this.informationData = informationData;
+    this.salesInvoiceHeaderData = salesInvoiceHeaderData;
+    this.salesInvoiceHeaderVerificationData = salesInvoiceHeaderVerificationData;
+    this.salesInvoiceLineData = salesInvoiceLineData;
+    this.salesInvoiceLineVerificationData = salesInvoiceLineVerificationData;
+    this.completedSalesInvoiceHeaderVerificationData = completedSalesInvoiceHeaderVerificationData;
+    this.addPaymentVerificationData = addPaymentVerificationData;
+    this.completedSalesInvoiceHeaderVerificationData2 = completedSalesInvoiceHeaderVerificationData2;
+    this.informationData2 = informationData2;
+    logInData = new LogInData.Builder().userName("QAAdmin").password("QAAdmin").build();
+  }
+
+  /**
+   * Test parameters.
+   * 
+   * @return collection of object arrays with data for the test
+   * 
+   */
+  @Parameters
+  public static Collection<Object[]> salesOrderValues() {
+    Object[][] data = new Object[][] { {
+        new OrganizationData.Builder().name("Spain").build(),
+        new InformationData.Builder().purchaseInvoiceReference("Supplier Reference").build(),
+
+        new SalesInvoiceHeaderData.Builder().businessPartner(
+            new BusinessPartnerSelectorData.Builder().name("Customer A").build()).build(),
+        new SalesInvoiceHeaderData.Builder().organization("Spain")
+            .transactionDocument("AR Invoice")
+            .partnerAddress(".Pamplona, Street Customer center nº1").paymentTerms("30 days, 5")
+            .paymentMethod("1 (Spain)").priceList("Customer A").build(),
+        new SalesInvoiceLinesData.Builder()
+            .product(
+                new ProductSimpleSelectorData.Builder().productName("Final good A")
+                    .priceListVersionName("Customer A").build()).invoicedQuantity("1").build(),
+        new SalesInvoiceLinesData.Builder().uOM("Bag").unitPrice("2.00").listPrice("2.00")
+            .tax("VAT(3)+CHARGE(0.5)").lineNetAmount("2.00").build(),
+        new SalesInvoiceHeaderData.Builder().documentStatus("Completed").grandTotalAmount("2.07")
+            .summedLineAmount("2.00").currency("EUR").paymentComplete(false).build(),
+
+        new AddPaymentPopUpData.Builder().received_from("Customer A")
+            .fin_paymentmethod_id("1 (Spain)").fin_financial_account_id("Spain Bank - EUR")
+            .c_currency_id("EUR").actual_payment("2.07").expected_payment("2.07")
+            .amount_gl_items("0.00").amount_inv_ords("2.07").total("2.07").difference("0.00")
+            .build(),
+
+        new SalesInvoiceHeaderData.Builder().documentStatus("Completed").grandTotalAmount("2.07")
+            .summedLineAmount("2.00").currency("EUR").paymentComplete(true).build(),
+
+        new InformationData.Builder().purchaseInvoiceReference("Invoice Document Number").build() } };
+    return Arrays.asList(data);
+  }
+
+  /**
+   * Test regression 28896 - Payment In flow
+   * 
+   * @throws ParseException
+   * @throws OpenbravoERPTestException
+   */
+  @Test
+  public void APRRegression28896InTest() throws ParseException, OpenbravoERPTestException {
+    logger
+        .info("** Start of test case [APRRegression28896In] Test regression 28896 - Payment In flow. **");
+
+    Organization organization = new Organization(mainPage).open();
+    organization.select(organizationData);
+    Organization.Information information = organization.new Information(mainPage);
+    information.edit(informationData);
+
+    SalesInvoice salesInvoice = new SalesInvoice(mainPage).open();
+    salesInvoice.create(salesInvoiceHeaderData);
+    salesInvoice.assertSaved();
+    salesInvoice.assertData(salesInvoiceHeaderVerificationData);
+    String invoiceNo = salesInvoice.getData("documentNo").toString();
+    SalesInvoice.Lines salesInvoiceLines = salesInvoice.new Lines(mainPage);
+    salesInvoiceLines.create(salesInvoiceLineData);
+    salesInvoiceLines.assertSaved();
+    salesInvoiceLines.assertData(salesInvoiceLineVerificationData);
+    salesInvoice.complete();
+    salesInvoice.assertProcessCompletedSuccessfully2();
+    salesInvoice.assertData(completedSalesInvoiceHeaderVerificationData);
+
+    AddPaymentProcess addPaymentProcess = salesInvoice.openAddPayment();
+    addPaymentProcess.process("Invoices", invoiceNo, "Process Received Payment(s) and Deposit",
+        addPaymentVerificationData);
+    salesInvoice.assertPaymentCreatedSuccessfully();
+    salesInvoice.assertData(completedSalesInvoiceHeaderVerificationData2);
+
+    organization = new Organization(mainPage).open();
+    Sleep.trySleep(15000);
+    organization.select(organizationData);
+    information = organization.new Information(mainPage);
+    information.edit(informationData2);
+
+    logger
+        .info("** End of test case [APRRegression28896In] Test regression 28896 - Payment In flow. **");
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression28896Out.java	Wed Sep 30 17:34:04 2015 +0200
@@ -0,0 +1,185 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo S.L.U. 
+ * All portions are Copyright (C) 2015 Openbravo S.L.U. 
+ * All Rights Reserved. 
+ * Contributor(s):
+ *  Leo Arias <leo.arias@openbravo.com>.
+ ************************************************************************
+ */
+
+package com.openbravo.test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions;
+
+import java.text.ParseException;
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.apache.log4j.Logger;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+import com.openbravo.test.integration.erp.data.LogInData;
+import com.openbravo.test.integration.erp.data.financial.receivablespayables.transactions.AddPaymentPopUpData;
+import com.openbravo.test.integration.erp.data.generalsetup.enterprise.organization.InformationData;
+import com.openbravo.test.integration.erp.data.generalsetup.enterprise.organization.OrganizationData;
+import com.openbravo.test.integration.erp.data.procurement.transactions.purchaseinvoice.PurchaseInvoiceHeaderData;
+import com.openbravo.test.integration.erp.data.procurement.transactions.purchaseinvoice.PurchaseInvoiceLinesData;
+import com.openbravo.test.integration.erp.data.selectors.BusinessPartnerSelectorData;
+import com.openbravo.test.integration.erp.data.selectors.ProductSimpleSelectorData;
+import com.openbravo.test.integration.erp.gui.financial.receivablespayables.transactions.AddPaymentProcess;
+import com.openbravo.test.integration.erp.testscripts.OpenbravoERPTest;
+import com.openbravo.test.integration.erp.testscripts.OpenbravoERPTestException;
+import com.openbravo.test.integration.erp.testscripts.generalsetup.enterprise.Organization;
+import com.openbravo.test.integration.erp.testscripts.procurement.transactions.PurchaseInvoice;
+import com.openbravo.test.integration.selenium.Sleep;
+
+/**
+ * Test regression 28896
+ * 
+ * @author aferraz
+ */
+@RunWith(Parameterized.class)
+public class APRRegression28896Out extends OpenbravoERPTest {
+
+  /** Log4j logger for this class. */
+  private static Logger logger = Logger.getLogger(APRRegression28896Out.class);
+
+  /* Data for this test. */
+
+  OrganizationData organizationData;
+  InformationData informationData;
+  PurchaseInvoiceHeaderData purchaseInvoiceHeaderData;
+  PurchaseInvoiceHeaderData purchaseInvoiceHeaderVerificationData;
+  PurchaseInvoiceLinesData purchaseInvoiceLineData;
+  PurchaseInvoiceLinesData purchaseInvoiceLineVerificationData;
+  PurchaseInvoiceHeaderData completedPurchaseInvoiceHeaderVerificationData;
+  AddPaymentPopUpData addPaymentVerificationData;
+  PurchaseInvoiceHeaderData completedPurchaseInvoiceHeaderVerificationData2;
+  InformationData informationData2;
+
+  /**
+   * Class constructor.
+   * 
+   */
+  public APRRegression28896Out(OrganizationData organizationData, InformationData informationData,
+      PurchaseInvoiceHeaderData purchaseInvoiceHeaderData,
+      PurchaseInvoiceHeaderData purchaseInvoiceHeaderVerificationData,
+      PurchaseInvoiceLinesData purchaseInvoiceLineData,
+      PurchaseInvoiceLinesData purchaseInvoiceLineVerificationData,
+      PurchaseInvoiceHeaderData completedPurchaseInvoiceHeaderVerificationData,
+      AddPaymentPopUpData addPaymentVerificationData,
+      PurchaseInvoiceHeaderData completedPurchaseInvoiceHeaderVerificationData2,
+      InformationData informationData2) {
+    this.organizationData = organizationData;
+    this.informationData = informationData;
+    this.purchaseInvoiceHeaderData = purchaseInvoiceHeaderData;
+    this.purchaseInvoiceHeaderVerificationData = purchaseInvoiceHeaderVerificationData;
+    this.purchaseInvoiceLineData = purchaseInvoiceLineData;
+    this.purchaseInvoiceLineVerificationData = purchaseInvoiceLineVerificationData;
+    this.completedPurchaseInvoiceHeaderVerificationData = completedPurchaseInvoiceHeaderVerificationData;
+    this.addPaymentVerificationData = addPaymentVerificationData;
+    this.completedPurchaseInvoiceHeaderVerificationData2 = completedPurchaseInvoiceHeaderVerificationData2;
+    this.informationData2 = informationData2;
+    logInData = new LogInData.Builder().userName("QAAdmin").password("QAAdmin").build();
+  }
+
+  /**
+   * Test parameters.
+   * 
+   * @return collection of object arrays with data for the test
+   * 
+   */
+  @Parameters
+  public static Collection<Object[]> salesOrderValues() {
+    Object[][] data = new Object[][] { {
+        new OrganizationData.Builder().name("Spain").build(),
+        new InformationData.Builder().purchaseInvoiceReference("Supplier Reference").build(),
+
+        new PurchaseInvoiceHeaderData.Builder()
+            .businessPartner(new BusinessPartnerSelectorData.Builder().name("Vendor A").build())
+            .orderReference("123456").build(),
+        new PurchaseInvoiceHeaderData.Builder().organization("Spain")
+            .transactionDocument("AP Invoice")
+            .partnerAddress(".Pamplona, Street Purchase center nº1").paymentTerms("90 days")
+            .paymentMethod("1 (Spain)").priceList("Purchase").build(),
+        new PurchaseInvoiceLinesData.Builder()
+            .product(
+                new ProductSimpleSelectorData.Builder().productName("Raw material A")
+                    .priceListVersionName("Purchase").build()).invoicedQuantity("1").build(),
+        new PurchaseInvoiceLinesData.Builder().uOM("Bag").unitPrice("2.00").listPrice("2.00")
+            .tax("VAT 10%").lineNetAmount("2.00").build(),
+        new PurchaseInvoiceHeaderData.Builder().documentStatus("Completed")
+            .grandTotalAmount("2.20").summedLineAmount("2.00").currency("EUR")
+            .paymentComplete(false).build(),
+
+        new AddPaymentPopUpData.Builder().received_from("Vendor A")
+            .fin_paymentmethod_id("1 (Spain)").fin_financial_account_id("Spain Cashbook - EUR")
+            .c_currency_id("EUR").actual_payment("2.20").expected_payment("2.20")
+            .amount_gl_items("0.00").amount_inv_ords("2.20").total("2.20").difference("0.00")
+            .build(),
+
+        new PurchaseInvoiceHeaderData.Builder().documentStatus("Completed")
+            .grandTotalAmount("2.20").summedLineAmount("2.00").currency("EUR")
+            .paymentComplete(true).build(),
+
+        new InformationData.Builder().purchaseInvoiceReference("Invoice Document Number").build() } };
+    return Arrays.asList(data);
+  }
+
+  /**
+   * Test regression 28896 - Payment Out flow
+   * 
+   * @throws ParseException
+   * @throws OpenbravoERPTestException
+   */
+  @Test
+  public void APRRegression28896OutTest() throws ParseException, OpenbravoERPTestException {
+    logger
+        .info("** Start of test case [APRRegression28896Out] Test regression 28896 - Payment Out flow. **");
+
+    Organization organization = new Organization(mainPage).open();
+    organization.select(organizationData);
+    Organization.Information information = organization.new Information(mainPage);
+    information.edit(informationData);
+
+    PurchaseInvoice purchaseInvoice = new PurchaseInvoice(mainPage).open();
+    purchaseInvoice.create(purchaseInvoiceHeaderData);
+    purchaseInvoice.assertSaved();
+    purchaseInvoice.assertData(purchaseInvoiceHeaderVerificationData);
+    String supplierNo = purchaseInvoice.getData("orderReference").toString();
+    PurchaseInvoice.Lines purchaseInvoiceLines = purchaseInvoice.new Lines(mainPage);
+    purchaseInvoiceLines.create(purchaseInvoiceLineData);
+    purchaseInvoiceLines.assertSaved();
+    purchaseInvoiceLines.assertData(purchaseInvoiceLineVerificationData);
+    purchaseInvoice.complete();
+    purchaseInvoice.assertProcessCompletedSuccessfully2();
+    purchaseInvoice.assertData(completedPurchaseInvoiceHeaderVerificationData);
+
+    AddPaymentProcess addPaymentProcess = purchaseInvoice.openAddPayment();
+    addPaymentProcess.process("Invoices", supplierNo, "Process Made Payment(s) and Withdrawal",
+        addPaymentVerificationData);
+    purchaseInvoice.assertPaymentCreatedSuccessfully();
+    purchaseInvoice.assertData(completedPurchaseInvoiceHeaderVerificationData2);
+
+    organization = new Organization(mainPage).open();
+    Sleep.trySleep(15000);
+    organization.select(organizationData);
+    information = organization.new Information(mainPage);
+    information.edit(informationData2);
+
+    logger
+        .info("** End of test case [APRRegression28896Out] Test regression 28896 - Payment Out flow. **");
+  }
+}
\ No newline at end of file
--- a/src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/RegressionSuite.java	Wed Sep 30 14:23:36 2015 +0200
+++ b/src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/RegressionSuite.java	Wed Sep 30 17:34:04 2015 +0200
@@ -34,7 +34,7 @@
     APRRegression29145In.class, APRRegression29145Out.class, APRRegression30641In29942In.class,
     APRRegression30641Out29942Out.class, APRRegression30712In.class, APRRegression30712Out.class,
     APRRegression29368In.class, APRRegression29368Out.class, APRRegression29532In.class,
-    APRRegression29532Out.class })
+    APRRegression29532Out.class, APRRegression28896In.class, APRRegression28896Out.class })
 public class RegressionSuite {
   // No content is required, this is just the definition of a test suite.
 
--- a/src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/build.xml	Wed Sep 30 14:23:36 2015 +0200
+++ b/src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/build.xml	Wed Sep 30 17:34:04 2015 +0200
@@ -58,6 +58,8 @@
       <antcall target="test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression29368Out" />
       <antcall target="test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression29532In" />
       <antcall target="test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression29532Out" />
+      <antcall target="test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression28896In" />
+      <antcall target="test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression28896Out" />
      </sequential>
   </target>
         
@@ -282,5 +284,17 @@
       <param name="testclass" value="com.openbravo.test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression29532Out" />
     </antcall>
   </target>
+  
+  <target name="test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression28896In">
+    <antcall target="test.integration">
+      <param name="testclass" value="com.openbravo.test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression28896In" />
+    </antcall>
+  </target>
+  
+  <target name="test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression28896Out">
+    <antcall target="test.integration">
+      <param name="testclass" value="com.openbravo.test.integration.erp.modules.functionalteam.addpayment.testsuites.APR_Regressions.APRRegression28896Out" />
+    </antcall>
+  </target>
 
 </project>
\ No newline at end of file
--- a/src-test/com/openbravo/test/integration/erp/testscripts/generalsetup/enterprise/Organization.java	Wed Sep 30 14:23:36 2015 +0200
+++ b/src-test/com/openbravo/test/integration/erp/testscripts/generalsetup/enterprise/Organization.java	Wed Sep 30 17:34:04 2015 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo S.L.U.
- * All portions are Copyright (C) 2011-2012 Openbravo S.L.U.
+ * All portions are Copyright (C) 2011-2015 Openbravo S.L.U.
  * All Rights Reserved.
  * Contributor(s):
  *   Leo Arias <leo.arias@openbravo.com>.
@@ -20,7 +20,9 @@
 
 package com.openbravo.test.integration.erp.testscripts.generalsetup.enterprise;
 
+import com.openbravo.test.integration.erp.data.generalsetup.enterprise.organization.InformationData;
 import com.openbravo.test.integration.erp.data.generalsetup.enterprise.organization.OrganizationData;
+import com.openbravo.test.integration.erp.gui.general.enterprise.organization.InformationTab;
 import com.openbravo.test.integration.erp.gui.general.enterprise.organization.OrganizationTab;
 import com.openbravo.test.integration.erp.gui.general.enterprise.organization.OrganizationWindow;
 import com.openbravo.test.integration.erp.modules.client.application.gui.MainPage;
@@ -79,4 +81,39 @@
     tab.setAsReady();
   }
 
+  /**
+   * Executes and verifies actions on the Organization Information tab.
+   * 
+   * @author aferraz
+   * 
+   */
+  public class Information extends SmokeTabScript<InformationData, InformationTab> {
+
+    /**
+     * Class constructor.
+     * 
+     * @param mainPage
+     *          The application main page.
+     */
+    public Information(MainPage mainPage) {
+      super(mainPage);
+    }
+
+    /**
+     * Select and return the Information tab.
+     * 
+     * Before this, the Information window must be opened.
+     * 
+     * @return the Information tab GUI object.
+     */
+    @Override
+    protected InformationTab selectTab() {
+      OrganizationWindow window = (OrganizationWindow) mainPage.getView(OrganizationWindow.TITLE);
+      InformationTab tab = (InformationTab) window.selectTab(InformationTab.IDENTIFIER);
+      tab.waitUntilSelected();
+      return tab;
+    }
+
+  }
+
 }