[deliveryModeIssue] DMI tests are part or deliverymodes module
authorGuillermo Alvarez de Eulate <guillermo.alvarez@openbravo.com>
Thu, 09 May 2019 11:00:42 +0200
changeset 8534 d2d7cdd4b01b
parent 8533 23f6d83c3b83
child 8535 55a8a646b087
[deliveryModeIssue] DMI tests are part or deliverymodes module
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesIssueSuite.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesIssueSuiteHV.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesSuite.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesSuiteHV.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/AllDeliveryModesIssueTests.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/AllDeliveryModesIssueTestsHV.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_01_ShowLinesExceptPickAndCarry.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_02_VerifyPendingQuantityAfterIssue.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_03_OrderPreparationSelector.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_04_AdvancedFiltersInIssueSalesOrder.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_05_VerifyShippingLineCreated.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_06_VerifyDeliveryInformationInOpenTicket.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_07_VerifyLayawaysCannotBeIssued.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_08_VerifyLocatorInShipmentLine.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_09_IssueWithProductWithServiceRelatedUniqueQuantity.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_10_IssueWithProductWithServiceRelatedPerProduct.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_11_VerifyOneInvoiceCreatedWhenInvoiceTermAfterOrderDelivered.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_12_VerifyTwoInvoicesGeneratedWhenInvoiceTermAfterDelivery.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_13_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedPerProduct.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_14_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedUniqueQuantity.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_15_VerifyDeliveringGroupedProductWithUngroupedServiceRelatedPerProduct.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DeliveryModesIssueTestsHelper.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/AllDeliveryModesIssueTests.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/AllDeliveryModesIssueTestsHV.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_01_ShowLinesExceptPickAndCarry.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_02_VerifyPendingQuantityAfterIssue.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_03_OrderPreparationSelector.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_04_AdvancedFiltersInIssueSalesOrder.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_05_VerifyShippingLineCreated.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_06_VerifyDeliveryInformationInOpenTicket.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_07_VerifyLayawaysCannotBeIssued.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_08_VerifyLocatorInShipmentLine.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_09_IssueWithProductWithServiceRelatedUniqueQuantity.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_10_IssueWithProductWithServiceRelatedPerProduct.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_11_VerifyOneInvoiceCreatedWhenInvoiceTermAfterOrderDelivered.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_12_VerifyTwoInvoicesGeneratedWhenInvoiceTermAfterDelivery.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_13_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedPerProduct.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_14_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedUniqueQuantity.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_15_VerifyDeliveringGroupedProductWithUngroupedServiceRelatedPerProduct.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DeliveryModesIssueTestsHelper.java
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesIssueSuite.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- *
- * @author RAN
- *
- */
-
-package org.openbravo.test.mobile.retail.extmodules.selenium.suites.concurrent.job011;
-
-import org.junit.AfterClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.openbravo.test.mobile.core.utils.SuiteHelper;
-import org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.AllDeliveryModesTests;
-import org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue.AllDeliveryModesIssueTests;
-import org.openbravo.test.mobile.retail.extmodules.selenium.tests.loginlogout.ExtModLogoutAndCloseBrowser;
-
-@RunWith(Suite.class)
-@SuiteClasses({
-    //
-    AllDeliveryModesIssueTests.class, //
-
-    ExtModLogoutAndCloseBrowser.class //
-})
-public class DeliveryModesIssueSuite extends SuiteHelper {
-
-  @AfterClass
-  public static void afterclass() {
-    nameChild(DeliveryModesSuite.class.getSimpleName());
-    SuiteHelper.afterclass();
-  }
-
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesIssueSuiteHV.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- *
- * @author RAN
- *
- */
-
-package org.openbravo.test.mobile.retail.extmodules.selenium.suites.concurrent.job011;
-
-import org.junit.AfterClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.openbravo.test.mobile.core.utils.SuiteHelper;
-import org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.AllDeliveryModesTestsHV;
-import org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue.AllDeliveryModesIssueTests;
-import org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue.AllDeliveryModesIssueTestsHV;
-import org.openbravo.test.mobile.retail.extmodules.selenium.tests.loginlogout.ExtModLogoutAndCloseBrowser;
-
-@RunWith(Suite.class)
-@SuiteClasses({
-    //
-    AllDeliveryModesIssueTestsHV.class, //
-
-    ExtModLogoutAndCloseBrowser.class //
-})
-public class DeliveryModesIssueSuiteHV extends SuiteHelper {
-
-  @AfterClass
-  public static void afterclass() {
-    nameChild(DeliveryModesSuiteHV.class.getSimpleName());
-    SuiteHelper.afterclass();
-  }
-
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesSuite.java	Thu May 09 10:07:53 2019 +0200
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesSuite.java	Thu May 09 11:00:42 2019 +0200
@@ -28,13 +28,14 @@
 import org.junit.runners.Suite.SuiteClasses;
 import org.openbravo.test.mobile.core.utils.SuiteHelper;
 import org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.AllDeliveryModesTests;
+import org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue.AllDeliveryModesIssueTests;
 import org.openbravo.test.mobile.retail.extmodules.selenium.tests.loginlogout.ExtModLogoutAndCloseBrowser;
 
 @RunWith(Suite.class)
 @SuiteClasses({
     //
     AllDeliveryModesTests.class, //
-
+    AllDeliveryModesIssueTests.class, //
     ExtModLogoutAndCloseBrowser.class //
 })
 public class DeliveryModesSuite extends SuiteHelper {
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesSuiteHV.java	Thu May 09 10:07:53 2019 +0200
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/suites/concurrent/job011/DeliveryModesSuiteHV.java	Thu May 09 11:00:42 2019 +0200
@@ -28,13 +28,14 @@
 import org.junit.runners.Suite.SuiteClasses;
 import org.openbravo.test.mobile.core.utils.SuiteHelper;
 import org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.AllDeliveryModesTestsHV;
+import org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue.AllDeliveryModesIssueTestsHV;
 import org.openbravo.test.mobile.retail.extmodules.selenium.tests.loginlogout.ExtModLogoutAndCloseBrowser;
 
 @RunWith(Suite.class)
 @SuiteClasses({
     //
     AllDeliveryModesTestsHV.class, //
-
+    AllDeliveryModesIssueTestsHV.class, //
     ExtModLogoutAndCloseBrowser.class //
 })
 public class DeliveryModesSuiteHV extends SuiteHelper {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/AllDeliveryModesIssueTests.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,33 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ *
+ * @author RAN
+ *
+ */
+
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import org.junit.runner.RunWith;
+import org.openbravo.test.mobile.core.junit.toolbox.SuiteClassesToolbox;
+import org.openbravo.test.mobile.retail.mobilecore.junit.OBWildcardPatternSuite;
+
+@RunWith(OBWildcardPatternSuite.class)
+@SuiteClassesToolbox()
+public class AllDeliveryModesIssueTests {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/AllDeliveryModesIssueTestsHV.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,35 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ *
+ * @author RAN
+ *
+ */
+
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import org.junit.runner.RunWith;
+import org.openbravo.test.mobile.core.junit.toolbox.SuiteClassesToolbox;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.SuiteAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.junit.OBWildcardPatternSuite;
+
+@RunWith(OBWildcardPatternSuite.class)
+@SuiteClassesToolbox
+@SuiteAnnotations(activateHighVolumeMode = true)
+public class AllDeliveryModesIssueTestsHV {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_01_ShowLinesExceptPickAndCarry.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,77 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_01_ShowLinesExceptPickAndCarry extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_ShowLinesExceptPickAndCarry]
+   * 
+   * Verifies lines with Delivery Mode other than “Pick and Carry” are candidates to order
+   * preparation
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <li>Add 5 units of product "Avalance Transceiver"</li>
+   * <li>Set Delivery Mode "Pickup in store"</li>
+   * <li>Adds 5 units of product "Headlamp ultralight"</li>
+   * <li>Set Delivery Mode "Pick and carry"</li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of ticket number</li>
+   * <li>Open Issue Sales Order Menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Verify only line with product "Avalance Transceiver" is shown.</li>
+   * <li>Verify Pending quantity is 5.</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductToTicket(PRODUCT_AVALANCHE_TRANSCEIVER, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
+    addProductToTicket(PRODUCT_HEADLAMP_ULTRALIGHT, TestIdPack.BUTTON_RECEIPT_ROW2,
+        TestIdPack.BUTTON_KEYPAD_5, PICK_AND_CARRY);
+
+    payTicketInCash();
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+
+    isVisible(TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1, true);
+    assertThat("There should be one line",
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows(), equalTo(2L));
+    assertThat("The pending quantity should be 5",
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO.enyoNode()
+            .getContent()
+            .contains("Pend: 5"),
+        equalTo(true));
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_02_VerifyPendingQuantityAfterIssue.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,90 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_02_VerifyPendingQuantityAfterIssue extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_VerifyPendingQuantityAfterIssue]
+   * 
+   * Verifies the pending quantity is updated after generate shipment from selected lines
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <li>Add 5 units of product "Avalanche Transceiver"</li>
+   * <li>Set Delivery Mode "Pickup in store"</li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Open Issue Sales Order Menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Verify the line with product "Avalanche Transceiver" is shown.</li>
+   * <li>Verify Pending quantity has value 5</li>
+   * <li>Set value 2 in Prepare field</li>
+   * <li>Click on Issue Selected button</li>
+   * <li>Open Issue Sales Order Menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Verify the line with product "Avalanche Transceiver" is shown.</li>
+   * <li>Verify Pending Quantity has value 3</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    String ticketId = BackboneHelper.getDocumentNo();
+    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
+    payTicketInCash();
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+
+    isVisible(TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1, true);
+    assertThat("There should be one line",
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows(), equalTo(2L));
+    assertThat("The pending quantity should be 5",
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO.enyoNode()
+            .getContent()
+            .contains("Pend: 5"),
+        equalTo(true));
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+
+    issueSelectedLines();
+
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+
+    assertThat("The pending quantity should be 3",
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO.enyoNode()
+            .getContent()
+            .contains("Pend: 3"),
+        equalTo(true));
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_03_OrderPreparationSelector.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,75 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.selenium.TestIdConstructor;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_03_OrderPreparationSelector extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_FilterIssueSalesOrder]
+   * 
+   * Verifies filters in Issue Sales Order popup
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Select Business Partner 'Arturo Montoro'</li>
+   * <li>Create a new ticket</li>
+   * <li>Add products to ticket
+   * <ul>
+   * <li>Product: Avalanche Transceiver, Delivery Mode: Pickup in store</li>
+   * </ul>
+   * </li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Order Date using current date</li>
+   * <li>Verifies the order date from the order shown matches the filter criteria</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Business Partner selecting Antonio Montoro</li>
+   * <li>Verifies the Business Partner from the order shown matches the filter criteria</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Delivery mode selecting Pickup in store</li>
+   * <li>Verifies the Delivery mode from the line shown matches the filter criteria</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+
+    changeDefaultCustomer(TestIdExtModules.DM_ARTURO_MONTORO_BUSINESS_PARTNER);
+
+    addProductToTicket(PRODUCT_AVALANCHE_TRANSCEIVER, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
+
+    payTicketInCash();
+    openIssueSalesOrderPopup();
+
+    TestIdConstructor filterCombo = TestIdExtModules.DM_PREPARATION_FILTER_SELECTOR;
+
+    assertFilterByOrderDate(filterCombo);
+    assertFilterByBusinessPartner(filterCombo);
+    assertFilterByDeliveryMode(filterCombo);
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_04_AdvancedFiltersInIssueSalesOrder.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,297 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_04_AdvancedFiltersInIssueSalesOrder extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_AdvancedFiltersInOrderPreparation]
+   * 
+   * Verifies advanced filters and sorting in Issue Sales Order window
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <li>Set Business Partner to Arturo Montoro</li>
+   * <li>Add products to ticket
+   * <ul>
+   * <li>Product: Insect Repellent, Delivery Mode: Pickup in store with date, Delivery date: 3 days
+   * after today</li>
+   * </ul>
+   * </li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Create a new ticket</li>
+   * <li>Add products to ticket
+   * <ul>
+   * <li>Product: Insect Repellent, Delivery Mode: Pickup in store</li>
+   * </ul>
+   * </li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: The first receipt document No</li>
+   * <li>Order Date: today</li>
+   * <li>Delivery Mode: Pickup in store with date</li>
+   * <li>Delivery Date: 3 days after today</li>
+   * <li>Business Partner: Arturo Montoro</li>
+   * </ul>
+   * </li>
+   * <li>Apply filters</li>
+   * <li>Verify one result is shown</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: The first receipt document No</li>
+   * <li>Order Date: one day after today</li>
+   * <li>Delivery Mode: Pickup in store with date</li>
+   * <li>Delivery Date: 3 days after today</li>
+   * <li>Business Partner: Arturo Montoro</li>
+   * </ul>
+   * </li>
+   * <li>Apply filters</li>
+   * <li>Verify no result is shown</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: The first receipt document No</li>
+   * <li>Order Date: today</li>
+   * <li>Delivery Mode: Pickup in store</li>
+   * <li>Delivery Date: 3 days after today</li>
+   * <li>Business Partner: Arturo Montoro</li>
+   * </ul>
+   * </li>
+   * <li>Apply filters</li>
+   * <li>Verify no result is shown</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: The first receipt document No</li>
+   * <li>Order Date: today</li>
+   * <li>Delivery Mode: Pickup in store with date</li>
+   * <li>Delivery Date: 4 days after today</li>
+   * <li>Business Partner: Arturo Montoro</li>
+   * </ul>
+   * </li>
+   * <li>Apply filters</li>
+   * <li>Verify no result is shown</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: The first receipt document No</li>
+   * <li>Order Date: today</li>
+   * <li>Delivery Mode: Pickup in store with date</li>
+   * <li>Delivery Date: 3 days after today</li>
+   * <li>Business Partner: VBS Customer</li>
+   * </ul>
+   * </li>
+   * <li>Apply filters</li>
+   * <li>Verify no result is shown</li>
+   * 
+   * <li>Open OIssue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: "0000"</li>
+   * </ul>
+   * </li>
+   * <li>Sort by DocNo Asc</li>
+   * <li>Apply filters</li>
+   * <li>Verify the doc No of first result is lesser than the second</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: "0000"</li>
+   * </ul>
+   * </li>
+   * <li>Sort by DocNo Desc</li>
+   * <li>Apply filters</li>
+   * <li>Verify the doc No of first result is greater than the second</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: "0000"</li>
+   * </ul>
+   * </li>
+   * <li>Sort by Order Date Asc</li>
+   * <li>Apply filters</li>
+   * <li>Verify the order date field contain date as today</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: "0000"</li>
+   * </ul>
+   * </li>
+   * <li>Sort by Business Partner Asc</li>
+   * <li>Apply filters</li>
+   * <li>Verify the Business Partner in first result is "Arturo Montoro"</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: "0000"</li>
+   * </ul>
+   * </li>
+   * <li>Sort by Business Partner Desc</li>
+   * <li>Apply filters</li>
+   * <li>Verify the Business Partner in first result is "VBS Customer"</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: "0000"</li>
+   * </ul>
+   * </li>
+   * <li>Sort by Delivery mode Asc</li>
+   * <li>Apply filters</li>
+   * <li>Verify the Delivery mode in first result is "Pickup in store"</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: "0000"</li>
+   * </ul>
+   * </li>
+   * <li>Sort by Delivery mode Desc</li>
+   * <li>Apply filters</li>
+   * <li>Verify the Delivery mode in first result is "Pickup in store with date"</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: "0000"</li>
+   * </ul>
+   * </li>
+   * <li>Sort by Delivery date Asc</li>
+   * <li>Apply filters</li>
+   * <li>Verify the Delivery date in first result is three days after today</li>
+   * <li>Open Issue Sales Order Advanced Filter window</li>
+   * <li>Set Advanced Filter fields
+   * <ul>
+   * <li>DocNo: "0000"</li>
+   * </ul>
+   * </li>
+   * <li>Sort by Delivery date Desc</li>
+   * <li>Apply filters</li>
+   * <li>Verify the Delivery date in first result is empty</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    String ticket = BackboneHelper.getDocumentNo();
+
+    changeDefaultCustomer(TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER);
+    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_1, PICK_IN_STORE_WITH_DATE_DELIVERY_MODE);
+    payTicketInCash();
+    updateDeliveryDate(ticket);
+
+    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_1, PICK_IN_STORE_DELIVERY_MODE);
+    payTicketInCash();
+
+    openIssueSalesOrderPopup();
+
+    assertAdvancedFiltersOrderPreparationResults(ticket,
+        LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        PICK_IN_STORE_WITH_DATE_DELIVERY_MODE,
+        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER, r -> r == 2);
+
+    assertAdvancedFiltersOrderPreparationResults(ticket,
+        LocalDate.now().plusDays(1).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        PICK_IN_STORE_WITH_DATE_DELIVERY_MODE,
+        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER, r -> r == 0);
+
+    assertAdvancedFiltersOrderPreparationResults(ticket,
+        LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        PICK_IN_STORE_DELIVERY_MODE,
+        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER, r -> r == 0);
+
+    assertAdvancedFiltersOrderPreparationResults(ticket,
+        LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        PICK_IN_STORE_WITH_DATE_DELIVERY_MODE,
+        LocalDate.now().plusDays(4).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER, r -> r == 0);
+
+    assertAdvancedFiltersOrderPreparationResults(ticket,
+        LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        PICK_IN_STORE_WITH_DATE_DELIVERY_MODE,
+        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
+        TestIdExtModules.DM_ARTURO_MONTORO_BUSINESS_PARTNER, r -> r == 0);
+
+    assertAdvancedFilterSortingOrder("0000", TestIdExtModules.DM_DOC_NO_ADV_FILTER_ORDER_DIRECION, //
+        ASCENDING, //
+        (a, b) -> {
+          return a.intValue() < b.intValue();
+        });
+
+    assertAdvancedFilterSortingOrder("0000", TestIdExtModules.DM_DOC_NO_ADV_FILTER_ORDER_DIRECION, //
+        DESCENDING, //
+        (a, b) -> {
+          return a.intValue() > b.intValue();
+        });
+
+    assertAdvancedFilterSortingOrder("0000",
+        TestIdExtModules.DM_ORDER_DATE_ADV_FILTER_ORDER_DIRECTION, ASCENDING, //
+        TestIdExtModules.DM_ORDERED_DATE_FIELD,
+        t -> t.contains(LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy"))));
+
+    assertAdvancedFilterSortingOrder("0000", TestIdExtModules.DM_BP_ADV_FILTER_ORDER_DIRECTION, //
+        ASCENDING, //
+        TestIdExtModules.DM_BUSINESS_PARTNER_FIELD, //
+        t -> t.contains("Arturo Montoro"));
+
+    assertAdvancedFilterSortingOrder("0000", TestIdExtModules.DM_BP_ADV_FILTER_ORDER_DIRECTION, //
+        DESCENDING, //
+        TestIdExtModules.DM_BUSINESS_PARTNER_FIELD, //
+        t -> t.contains("Carl Studson") || t.contains("Mara Palliot"));
+
+    assertAdvancedFilterSortingOrder("0000", //
+        TestIdExtModules.DM_DELIVERY_MODE_ADV_FILTER_ORDER_DIRECTION, ASCENDING, //
+        TestIdExtModules.DM_DELIVERY_MODE_FIELD, //
+        t -> t.contains("Pickup in store"));
+
+    assertAdvancedFilterSortingOrder("0000", //
+        TestIdExtModules.DM_DELIVERY_MODE_ADV_FILTER_ORDER_DIRECTION, DESCENDING, //
+        TestIdExtModules.DM_DELIVERY_MODE_FIELD, //
+        t -> t.contains("Pickup in store with date"));
+
+    assertAdvancedFilterSortingOrder("0000", //
+        TestIdExtModules.DM_DELIVERY_DATE_ADV_FILTER_ORDER_DIRECTION, ASCENDING, //
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO, //
+        t -> t.contains(
+            LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy"))));
+
+    assertAdvancedFilterSortingOrder("0000", //
+        TestIdExtModules.DM_DELIVERY_DATE_ADV_FILTER_ORDER_DIRECTION, DESCENDING, //
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO, //
+        t -> t.endsWith("Del:   "));
+
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_05_VerifyShippingLineCreated.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,69 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_05_VerifyShippingLineCreated extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_VerifyShippingLineCreate]
+   * 
+   * Verifies shipment lines are created when preparing lines
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <li>Add products to ticket
+   * <ul>
+   * <li>Product: Insect Repellent, Quantity: 5, Delivery Mode: Pickup in store</li>
+   * </ul>
+   * </li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Prepare the whole quantity of the line</li>
+   * <li>Asserts a shipment line was created linked to the order line</li>
+   * <li>Asserts there is not an invoice line linked to the order line</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
+    payTicketInCash();
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
+
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+
+    assertShipmentLineExists(ticketId);
+    assertsInvoiceLineExists(ticketId, 0, 0, false);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_06_VerifyDeliveryInformationInOpenTicket.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,80 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_06_VerifyDeliveryInformationInOpenTicket extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_VerifyDeliveryInformationInOpenTicket]
+   * 
+   * Verifies delivered quantity information is updated in an opened ticket when the order is
+   * prepared
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <li>Add products to ticket
+   * <ul>
+   * <li>Product: Insect Repellent, Quantity: 5, Delivery Mode: Pickup in store</li>
+   * </ul>
+   * </li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Open the ticket using "Open Receipt" menu</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Prepare the whole quantity of the line</li>
+   * <li>Asserts the ticket line information contains the text "Delivered Quantity: 5"</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
+    payTicketInCash();
+
+    openReceipt(ticketId);
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
+
+    issueSelectedLines();
+
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+    waitUntilIsVisible(TestIdExtModules.DM_DELIVERED_QTY_OPEN_TICKET, true);
+    assertThat("Delivered quantity should be 5",
+        TestIdExtModules.DM_DELIVERED_QTY_OPEN_TICKET.enyoNode()
+            .getContent()
+            .contains("Delivered Quantity: 5"),
+        equalTo(true));
+    tap(TestIdExtModules.DM_CLOSE_OPEN_TICKET);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_07_VerifyLayawaysCannotBeIssued.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,68 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_07_VerifyLayawaysCannotBeIssued extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_VerifyLayawaysCannotBeIssued]
+   * 
+   * Verifies layaway ticket cannot be issued
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket as layaway</li>
+   * <li>Add products to ticket
+   * <ul>
+   * <li>Product: Insect Repellent, Quantity: 5, Delivery Mode: Pickup in store</li>
+   * </ul>
+   * </li>
+   * <li>Leave the ticket as layaway</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Asserts no results are shown</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    setTicketAsLayaway();
+    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
+    leaveTicketAsLayaway();
+
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    assertThat("There should be no lines",
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows(), equalTo(0L));
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_08_VerifyLocatorInShipmentLine.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,75 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_08_VerifyLocatorInShipmentLine extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_VerifyLocatorInShipmentLine]
+   * 
+   * Verifies the locators used n shipment line
+   * 
+   * <ul>
+   * <li>Set priority for Yosemite Store 0-0-1 Locator to 25</li>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <li>Add products to ticket
+   * <ul>
+   * <li>Product: Baby Carrier, Quantity: 5, Delivery Mode: Pickup in store</li>
+   * </ul>
+   * </li>
+   * <li>Pay ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Prepare 5 units of product</li>
+   * <li>Verify the generated shipment contains two lines, the first line for "Yosemite Store 0-0-1"
+   * locator, the second one for "Yosemite Store 0-0-0" locator</li>
+   * <li>Restore priority for Yosemite Store 0-0-1 Locator to 50</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    setPriorityForLocator(25);
+
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductToTicket(BABY_CARRIER, TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_KEYPAD_5,
+        PICK_IN_STORE_DELIVERY_MODE);
+    payTicketInCash();
+
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
+
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+
+    assertLocatorInShipmentLine(ticketId);
+    setPriorityForLocator(50);
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_09_IssueWithProductWithServiceRelatedUniqueQuantity.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,87 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_09_IssueWithProductWithServiceRelatedUniqueQuantity
+    extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_IssueWithProductWithServiceRelatedUniqueQuantity]
+   * 
+   * Verifies deliver of services with quantity rule 'Unique Quantity', linked to products
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <ul>
+   * <li>Product: GPS Nano, Quantity: 5, Delivery Mode: Pickup in store</li>
+   * <li>Product: Configuration</li>
+   * </ul>
+   * </li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Go to Issue Sales Order menu</li>
+   * <li>Filter by the ticket number</li>
+   * <li>Prepare 2 units of product</li>
+   * <li>Issue the selected line</li>
+   * <li>Verify there is a shipment line linked to product Configuration with quantity 1 for the
+   * created shipment</li>
+   * <li>Go to Issue Sales Order menu</li>
+   * <li>Filter by the ticket number</li>
+   * <li>Prepare 3 units of product</li>
+   * <li>Issue the selected line</li>
+   * <li>Verify there is not a shipment line linked to product Configuration for the last created
+   * shipment</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductWithService(GPS_NANO, TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_KEYPAD_5,
+        PICK_IN_STORE_DELIVERY_MODE);
+    payTicketInCash();
+
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+    assertServicesInShipmentLines(ticketId, 1, 1);
+
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+
+    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+    assertServicesInShipmentLines(ticketId, 0, 0);
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_10_IssueWithProductWithServiceRelatedPerProduct.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,95 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_10_IssueWithProductWithServiceRelatedPerProduct
+    extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_IssueWithProductWithServiceRelatedPerProduct]
+   * 
+   * Verifies deliver of services with quantity rule 'Per Product', linked to products
+   * 
+   * <ul>
+   * <li>Logged In the Back End as Openbravo</li>
+   * <li>Go to Product Window</li>
+   * <li>Filter by search key "seq_service"</li>
+   * <li>Set quantity rule to "Per product"</li>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <ul>
+   * <li>Product: GPS Nano, Quantity: 5, Delivery Mode: Pickup in store</li>
+   * <li>Product: Configuration</li>
+   * </ul>
+   * </li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Go to Issue Sales Order menu</li>
+   * <li>Filter by the ticket number</li>
+   * <li>Prepare 2 units of product</li>
+   * <li>Issue the selected line</li>
+   * <li>Verify there is a shipment line linked to product Configuration with quantity 2 for the
+   * created shipment</li>
+   * <li>Go to Issue Sales Order menu</li>
+   * <li>Filter by the ticket number</li>
+   * <li>Prepare 3 units of product</li>
+   * <li>Issue the selected line</li>
+   * <li>Verify there is a shipment line linked to product Configuration with quantity 3 for the
+   * created shipment</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    updateQuantityRuleInService(PER_PRODUCT_QUANTITY_RULE);
+    reload();
+
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductWithService(GPS_NANO, TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_KEYPAD_5,
+        PICK_IN_STORE_DELIVERY_MODE);
+    payTicketInCash();
+
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+    assertServicesInShipmentLines(ticketId, 1, 2);
+
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+
+    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
+    assertServicesInShipmentLines(ticketId, 1, 3);
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_11_VerifyOneInvoiceCreatedWhenInvoiceTermAfterOrderDelivered.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,83 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_11_VerifyOneInvoiceCreatedWhenInvoiceTermAfterOrderDelivered
+    extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_VerifyOneInvoiceCreatedWhenInvoiceTermAfterOrderDelivered]
+   * 
+   * Verifies invoice lines are created when preparing lines and order invoice term is "After Order
+   * Delivered"
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <li>Add products to ticket
+   * <ul>
+   * <li>Product: Insect Repellent, Quantity: 4, Delivery Mode: Pickup in store</li>
+   * </ul>
+   * </li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Prepare two units of product</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Prepare two units of product</li>
+   * <li>Asserts there are two invoice lines linked to sales order line, and both belongs to the
+   * same invoice</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_4, PICK_IN_STORE_DELIVERY_MODE);
+    payTicketInCash();
+    updateInvoiceTerms(ticketId, AFTER_ORDER_DELIVERED_INVOICE_TERM);
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+
+    assertsInvoiceLineExists(ticketId, 2, 2, true);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_12_VerifyTwoInvoicesGeneratedWhenInvoiceTermAfterDelivery.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,86 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_12_VerifyTwoInvoicesGeneratedWhenInvoiceTermAfterDelivery
+    extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case [OBRDM_DMI_VerifyTwoInvoicesGeneratedWhenInvoiceTermAfterDelivery]
+   * 
+   * Verifies invoice lines are created when preparing lines and order invoice term is "After
+   * Delivery"
+   * 
+   * <ul>
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <li>Add products to ticket
+   * <ul>
+   * <li>Product: Insect Repellent, Quantity: 5, Delivery Mode: Pickup in store</li>
+   * </ul>
+   * </li>
+   * <li>Pay the ticket in cash</li>
+   * <li>Take note of the ticket number</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Prepare two units of product</li>
+   * <li>Asserts there is an invoice line linked to sales order line</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by Document No using the ticket number noted before</li>
+   * <li>Prepare three units of product</li>
+   * <li>Asserts there are two invoice lines linked to sales order line, and each one belong
+   * different invoices</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
+        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
+    payTicketInCash();
+    updateInvoiceTerms(ticketId, AFTER_DELIVERY_INVOICE_TERM);
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+    assertsInvoiceLineExists(ticketId, 2, 1, true);
+
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
+
+    issueSelectedLines();
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+
+    assertsInvoiceLineExists(ticketId, 3, 2, false);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_13_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedPerProduct.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,89 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import java.util.Arrays;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_13_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedPerProduct
+    extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case
+   * [OBRDM_DMI_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedPerProduct]
+   * 
+   * Verifies all ordered quantities in lines with service product are delivered when products are
+   * ungrouped, but service are grouped and quantity rule is "Per Product"
+   * 
+   * <ul>
+   * <li>Logged In the Back End as Openbravo</li>
+   * <li>Go to Product Window</li>
+   * <li>Filter product by search key "seq010a"</li>
+   * <li>Set Grouped Product to false</li>
+   * <li>Filter product by search key "seq_service"</li>
+   * <li>Set Grouped Product to true</li>
+   * <li>Set Quantity Rule to "As Per Product"</li>
+   * 
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <ul>
+   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
+   * <li>Product: Configuration</li>
+   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
+   * <li>Product: Configuration</li>
+   * </ul>
+   * </li>
+   * <li>Pay ticket in cash</li>
+   * <li>Take note of ticket number</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by ticket number</li>
+   * <li>Prepare the whole order</li>
+   * <li>Verify all ticket lines have been fully delivered</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    unGroupProduct(PRODUCT_GPS_NANO_ID);
+    groupProduct(PRODUCT_CONFIGURATION_ID);
+    updateQuantityRuleInService(PER_PRODUCT_QUANTITY_RULE);
+    reload();
+
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductWithServiceToTicketConsideringGrouping(GPS_NANO, 2,
+        Arrays.asList(TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_RECEIPT_ROW3));
+
+    payTicketInCash();
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
+    issueSelectedLines();
+
+    assertAllOrderedQuantitiesWereDeliveredInLines(ticketId);
+    groupProduct(PRODUCT_GPS_NANO_ID);
+    groupProduct(PRODUCT_CONFIGURATION_ID);
+    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_14_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedUniqueQuantity.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,89 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import java.util.Arrays;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_14_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedUniqueQuantity
+    extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case
+   * [OBRDM_DMI_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedUniqueQuantity]
+   * 
+   * Verifies all ordered quantities in lines with service product are delivered when products are
+   * ungrouped, but service are grouped and quantity rule is "Unique Quantity"
+   * 
+   * <ul>
+   * <li>Logged In the Back End as Openbravo</li>
+   * <li>Go to Product Window</li>
+   * <li>Filter product by search key "seq010a"</li>
+   * <li>Set Grouped Product to false</li>
+   * <li>Filter product by search key "seq_service"</li>
+   * <li>Set Grouped Product to true</li>
+   * <li>Set Quantity Rule to "Unique Quantity"</li>
+   * 
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <ul>
+   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
+   * <li>Product: Configuration</li>
+   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
+   * <li>Product: Configuration</li>
+   * </ul>
+   * </li>
+   * <li>Pay ticket in cash</li>
+   * <li>Take note of ticket number</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by ticket number</li>
+   * <li>Prepare the whole order</li>
+   * <li>Verify all ticket lines have been fully delivered</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    unGroupProduct(PRODUCT_GPS_NANO_ID);
+    groupProduct(PRODUCT_CONFIGURATION_ID);
+    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
+    reload();
+
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductWithServiceToTicketConsideringGrouping(GPS_NANO, 2,
+        Arrays.asList(TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_RECEIPT_ROW3));
+
+    payTicketInCash();
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
+    issueSelectedLines();
+
+    assertAllOrderedQuantitiesWereDeliveredInLines(ticketId);
+    groupProduct(PRODUCT_GPS_NANO_ID);
+    groupProduct(PRODUCT_CONFIGURATION_ID);
+    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DMI_15_VerifyDeliveringGroupedProductWithUngroupedServiceRelatedPerProduct.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,89 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ */
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import java.util.Arrays;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class DMI_15_VerifyDeliveringGroupedProductWithUngroupedServiceRelatedPerProduct
+    extends DeliveryModesIssueTestsHelper {
+
+  /**
+   * Automates Test Case
+   * [OBRDM_DMI_VerifyDeliveringGroupedProductWithUngroupedServiceRelatedPerProduct]
+   * 
+   * Verifies all ordered quantities in lines with service product are delivered when products are
+   * grouped, but service are ungrouped and quantity rule is "Per Product"
+   * 
+   * <ul>
+   * <li>Logged In the Back End as Openbravo</li>
+   * <li>Go to Product Window</li>
+   * <li>Filter product by search key "seq010a"</li>
+   * <li>Set Grouped Product to true</li>
+   * <li>Filter product by search key "seq_service"</li>
+   * <li>Set Grouped Product to false</li>
+   * <li>Set Quantity Rule to "Per Product"</li>
+   * 
+   * <li>Logged as vallblanca user</li>
+   * <li>Create a new ticket</li>
+   * <ul>
+   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
+   * <li>Product: Configuration</li>
+   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
+   * <li>Product: Configuration</li>
+   * </ul>
+   * </li>
+   * <li>Pay ticket in cash</li>
+   * <li>Take note of ticket number</li>
+   * <li>Open Issue Sales Order menu</li>
+   * <li>Filter by ticket number</li>
+   * <li>Prepare the whole order</li>
+   * <li>Verify all ticket lines have been fully delivered</li>
+   * </ul>
+   */
+  @Test
+  public void test() {
+    groupProduct(PRODUCT_GPS_NANO_ID);
+    unGroupProduct(PRODUCT_CONFIGURATION_ID);
+    updateQuantityRuleInService(PER_PRODUCT_QUANTITY_RULE);
+    reload();
+
+    String ticketId = BackboneHelper.getDocumentNo();
+
+    addProductWithServiceToTicketConsideringGrouping(GPS_NANO, 2,
+        Arrays.asList(TestIdPack.BUTTON_RECEIPT_ROW1));
+
+    payTicketInCash();
+    openIssueSalesOrderPopup();
+    filterOrderLinesByDocumentNo(ticketId);
+    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
+    issueSelectedLines();
+
+    assertAllOrderedQuantitiesWereDeliveredInLines(ticketId);
+    groupProduct(PRODUCT_GPS_NANO_ID);
+    groupProduct(PRODUCT_CONFIGURATION_ID);
+    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodes/deliverymodesissue/DeliveryModesIssueTestsHelper.java	Thu May 09 11:00:42 2019 +0200
@@ -0,0 +1,434 @@
+package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodes.deliverymodesissue;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.Calendar;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.BiPredicate;
+import java.util.function.Predicate;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.openbravo.test.mobile.core.utils.OBUtils;
+import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
+import org.openbravo.test.mobile.retail.extmodules.selenium.terminals.DeliveryModesHelper;
+import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperInsertUpdateOrDelete;
+import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperSelect;
+import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperSelect.RecordsCount;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.SynchronizationMonitor;
+import org.openbravo.test.mobile.retail.mobilecore.selenium.TestIdConstructor;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+
+public class DeliveryModesIssueTestsHelper extends DeliveryModesHelper {
+
+  private static final String YOSEMITE_STORE_0_0_0_LOCATOR_ID = "62FF417ECFBA41B491F2FB013AC70B53";
+  private static final String YOSEMITE_STORE_0_0_1_LOCATOR_ID = "A7C7F92D81984923A4EF100293A43E62";
+  protected static final String PRODUCT_CONFIGURATION_ID = "95FF37BC29824C4CBC7ECCB0AF4E7DF5";
+  protected static final String PRODUCT_GPS_NANO_ID = "0D53E1A3C5BC45A4B2BCC4266D3F4B96";
+  protected static final String BABY_CARRIER = "WVG/B0004";
+  protected static final String PRODUCT_HEADLAMP_ULTRALIGHT = "WVG/L0001";
+  protected static final String PRODUCT_AVALANCHE_TRANSCEIVER = "WVG/M0019";
+  protected static final String PRODUCT_INSECT_REPELLENT_EXTRA = "WVG/SC001";
+  protected static final String PICK_AND_CARRY = "0";
+  protected static final String PICK_IN_STORE_DELIVERY_MODE = "1";
+  protected static final String PICK_IN_STORE_WITH_DATE_DELIVERY_MODE = "2";
+  protected static final boolean ASCENDING = true;
+  protected static final boolean DESCENDING = false;
+  protected static final String GPS_NANO = "seq010a";
+  protected static final String UNIQUE_QUANTITY_QUANTITY_RULE = "UQ";
+  protected static final String PER_PRODUCT_QUANTITY_RULE = "PP";
+  protected static final String AFTER_ORDER_DELIVERED_INVOICE_TERM = "O";
+  protected static final String AFTER_DELIVERY_INVOICE_TERM = "D";
+  protected final String groupProductQuery = "update m_product set em_obpos_groupedproduct = '%s' where m_product_id = '%s'";
+
+  protected void setTicketAsLayaway() {
+    tap(TestIdPack.BUTTON_MENU);
+    tap(TestIdPack.BUTTON_MENU_LAYAWAYTHISRECEIPT);
+  }
+
+  protected void leaveTicketAsLayaway() {
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_LAYAWAY);
+    SynchronizationMonitor.waitUntilDataIsInTheServer();
+  }
+
+  protected void addProductToTicket(final String productName, final TestIdConstructor lineNo,
+      final TestIdConstructor quantity, final String deliveryCondition) {
+    addProduct(productName);
+    tap(lineNo);
+    tap(quantity);
+    tap(TestIdPack.BUTTON_KEYPAD_QUANTITY);
+    tap(lineNo);
+    tap(TestIdExtModules.BUTTON_EDIT_DELIVERYMODES);
+    TestIdExtModules.COMBO_DELIVERYMODES_LIST.enyoNode()
+        .executeExtension(".setSelected(" + deliveryCondition + ")");
+    tap(TestIdExtModules.BUTTON_DELIVERYMODES_APPLY);
+  }
+
+  protected void addProduct(final String productName) {
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT, productName);
+    TestIdPack.FIELD_SEARCH_TEXT.enyoNode().executeExtension(".waterfall('onchange')");
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
+  }
+
+  protected void payTicketInCash() {
+    tap(TestIdPack.BUTTON_PAY);
+    tap(TestIdPack.BUTTON_PAY_EXACT);
+    tap(TestIdPack.BUTTON_PAY_DONE);
+    SynchronizationMonitor.waitUntilDataIsInTheServer();
+  }
+
+  protected void openIssueSalesOrderPopup() {
+    tap(TestIdPack.BUTTON_MENU);
+    tap(TestIdExtModules.MENU_ISSUE_SALES_ORDER);
+    isVisible(TestIdExtModules.DM_ISSUE_SALES_ORDER_POPUP, true);
+  }
+
+  protected void filterOrderLinesByDocumentNo(String ticketId) {
+    write(TestIdExtModules.DM_PREPARATION_POPUP_FILTER, ticketId);
+    tap(TestIdExtModules.DM_PREPARATION_POPUP_SEARCH);
+    OBUtils.pause(500);
+  }
+
+  protected String issueSelectedLines() {
+    tap(TestIdExtModules.DM_ISSUE_SELECTED);
+    SynchronizationMonitor.waitUntilDataIsInTheServer();
+    isVisible(TestIdExtModules.DM_SHIPMENT_LIST_DOCNO_POPUP, true);
+    Pattern pattern = Pattern.compile(".*\\[(\\w+)\\]");
+    Matcher matcher = pattern
+        .matcher(TestIdExtModules.DM_SHIPMENT_LIST_DOCNO_LABEL.enyoNode().getContent());
+    matcher.find();
+    String pickingListDocNo = matcher.group(1);
+    tap(TestIdExtModules.DM_SHIPMENT_LIST_DOCNO_OK_BTN);
+    return pickingListDocNo;
+  }
+
+  protected void changeDefaultCustomer(final TestIdConstructor businessPartner) {
+    tap(TestIdPack.BUTTON_RECEIPT_CUSTOMER);
+
+    isVisible(TestIdExtModules.DM_BUSINESS_PARTNER_FILTER_POPUP, true);
+    tap(TestIdPack.BUTTON_CUSTOMER_MODAL_SEARCH);
+    tap(businessPartner);
+  }
+
+  protected void assertFilterByDeliveryMode(final TestIdConstructor filterCombo) {
+    openIssueSalesOrderPopup();
+    filterCombo.enyoNode().executeExtension(".setSelected(3)");
+    filterCombo.enyoNode().executeExtension(".waterfall('onchange')");
+
+    TestIdExtModules.DM_DELIVERY_MODE_SELECTOR.enyoNode().executeExtension(".setSelected(1)");
+    tap(TestIdExtModules.DM_PREPARATION_POPUP_SEARCH);
+    OBUtils.pause(500);
+
+    assertThat("The delivery mode should be 'Pickup in store'",
+        TestIdExtModules.DM_DELIVERY_MODE_FIELD.enyoNode().getContent().contains("Pickup"),
+        equalTo(true));
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+  }
+
+  protected void assertFilterByOrderDate(final TestIdConstructor filterCombo) {
+    final SimpleDateFormat df = new SimpleDateFormat("dd-MM-YYYY");
+    final String today = df.format(Calendar.getInstance().getTime());
+    filterCombo.enyoNode().executeExtension(".setSelected(1)");
+
+    write(TestIdExtModules.DM_PREPARATION_POPUP_FILTER, today);
+    tap(TestIdExtModules.DM_PREPARATION_POPUP_SEARCH);
+    OBUtils.pause(500);
+
+    assertThat("There should be at least one line",
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows().intValue() > 0,
+        equalTo(true));
+
+    assertThat("The date should be " + today,
+        TestIdExtModules.DM_ORDERED_DATE_FIELD.enyoNode().getContent().contains(today),
+        equalTo(true));
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+  }
+
+  protected void assertFilterByBusinessPartner(final TestIdConstructor filterCombo) {
+    openIssueSalesOrderPopup();
+    filterCombo.enyoNode().executeExtension(".setSelected(2)");
+    filterCombo.enyoNode().executeExtension(".waterfall('onchange')");
+
+    tap(TestIdExtModules.DM_PREPARATION_BUSINESS_PARTNER_SELECTOR);
+    tap(TestIdPack.BUTTON_CUSTOMER_MODAL_SEARCH);
+
+    tap(TestIdExtModules.DM_ARTURO_MONTORO_BUSINESS_PARTNER);
+    tap(TestIdExtModules.DM_PREPARATION_POPUP_SEARCH);
+    OBUtils.pause(500);
+
+    assertThat("There should be at least one line",
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows().intValue() > 0,
+        equalTo(true));
+
+    assertThat("The business partner should be 'Arturo Montoro'",
+        TestIdExtModules.DM_BUSINESS_PARTNER_FIELD.enyoNode().getContent().contains("Montoro"),
+        equalTo(true));
+    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
+  }
+
+  protected void updateDeliveryDate(final String ticketId) {
+    final String sqlQuery = "update c_orderline set em_obrdm_delivery_date = to_date('%s', 'yyyy-MM-dd') "
+        + "where c_orderline_id = "
+        + "  (select max (c_orderline_id) from c_order o join c_orderline ol on o.c_order_id = ol.c_order_id where o.documentNo = '%s')";
+    new DatabaseHelperInsertUpdateOrDelete().execute(String.format(sqlQuery,
+        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), ticketId),
+        1);
+  }
+
+  protected void assertAdvancedFiltersOrderPreparationResults(final String firstReceipt,
+      final String orderDate, final String deliveryMode, final String deliveryDate,
+      final TestIdConstructor businessPartner, final Predicate<Long> condition) {
+    tap(TestIdExtModules.DM_PREPARATION_ADV_FILTER_BTN);
+    write(TestIdExtModules.DM_DOC_NO_ADV_FILTER_SEARCH_CRITERIA, firstReceipt);
+    write(TestIdExtModules.DM_ORDER_DATE_ADV_FILTER_SEARCH_CRITERIA, orderDate);
+    TestIdExtModules.DM_DELIVERY_MODE_ADV_FILTER_SEARCH_CRITERIA.enyoNode()
+        .executeExtension(".setSelected(" + deliveryMode + ")");
+    write(TestIdExtModules.DM_DELIVERY_DATE_ADV_FILTER_SEARCH_CRITERIA, deliveryDate);
+    tap(TestIdExtModules.DM_BUSINESS_PARTNER_ADV_FILTER_SEARCH_CRITERIA);
+    tap(TestIdPack.BUTTON_CUSTOMER_MODAL_SEARCH);
+    tap(businessPartner);
+    tap(TestIdExtModules.DM_ADV_FILTER_APPLY_BTN);
+    OBUtils.pause(1000);
+    assertThat("There should be one line",
+        condition.test(TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows()),
+        equalTo(true));
+  }
+
+  protected void assertAdvancedFilterSortingOrder(final String searchCriteria,
+      final TestIdConstructor orderElement, boolean ascending,
+      final BiPredicate<Integer, Integer> docNoOrderPredicate) {
+    applySortingInOrderPreparation(searchCriteria, orderElement, ascending);
+    if (docNoOrderPredicate != null) {
+      final int hashCodeDocNoFistLine = TestIdExtModules.DM_DOC_NO_ORDER_ROW1.enyoNode()
+          .getContent()
+          .hashCode();
+      final int hashCodeDocNoSecondLine = TestIdExtModules.DM_DOC_NO_ORDER_ROW2.enyoNode()
+          .getContent()
+          .hashCode();
+      assertThat("Doc No sorting",
+          docNoOrderPredicate.test(hashCodeDocNoFistLine, hashCodeDocNoSecondLine), equalTo(true));
+    }
+  }
+
+  protected void applySortingInOrderPreparation(final String searchCriteria,
+      final TestIdConstructor orderElement, boolean ascending) {
+    tap(TestIdExtModules.DM_PREPARATION_ADV_FILTER_BTN);
+    tap(TestIdExtModules.DM_ADV_FILTER_CLEAR_BTN);
+    write(TestIdExtModules.DM_DOC_NO_ADV_FILTER_SEARCH_CRITERIA, searchCriteria);
+    tap(orderElement);
+    if (!ascending) {
+      tap(orderElement);
+    }
+    tap(TestIdExtModules.DM_ADV_FILTER_APPLY_BTN);
+    OBUtils.pause(1000);
+    assertThat("There should be more than one line",
+        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows() > 2, equalTo(true));
+  }
+
+  protected void assertAdvancedFilterSortingOrder(final String searchCriteria,
+      final TestIdConstructor orderElement, boolean ascending,
+      final TestIdConstructor elementToTest, final Predicate<String> predicate) {
+    applySortingInOrderPreparation(searchCriteria, orderElement, ascending);
+
+    isVisible(elementToTest, true);
+    assertThat(elementToTest.toString(), predicate.test(elementToTest.enyoNode().getContent()),
+        equalTo(true));
+  }
+
+  protected void assertShipmentLineExists(final String ticketId) {
+    String sqlQuery = "select il.m_inoutline_id from m_inoutline il " //
+        + "join m_inout m on m.m_inout_id = il.m_inout_id " //
+        + "join c_orderline ol on ol.c_orderline_id = il.c_orderline_id " //
+        + "join c_order o on o.c_order_id = ol.c_order_id " //
+        + "where o.documentno = '%s' " //
+        + "and m.docstatus = 'CO'";
+
+    new DatabaseHelperSelect() {
+
+      @Override
+      protected void yieldResultSet(ResultSet rs) throws SQLException {
+
+      }
+    }.execute(String.format(sqlQuery, ticketId), 1);
+  }
+
+  protected void updateInvoiceTerms(final String ticketId, final String invoiceTerm) {
+    String sqlQuery = "update c_order set invoicerule = '%s' where documentno = '%s'";
+    new DatabaseHelperInsertUpdateOrDelete().execute(String.format(sqlQuery, invoiceTerm, ticketId),
+        1);
+  }
+
+  protected void openReceipt(final String ticketId) {
+    tap(TestIdPack.BUTTON_MENU);
+    tap(TestIdPack.BUTTON_MENU_OPENRECEIPT);
+    write(TestIdPack.FIELD_OPEN_RECEIPT_FILTER_TXT, ticketId);
+    tap(TestIdPack.BUTTON_OPEN_RECEIPT_SEARCH);
+    OBUtils.pause(500);
+    tap(TestIdExtModules.DM_OPEN_RECEIPT_ROW1);
+  }
+
+  protected void setPriorityForLocator(int priority) {
+    String sqlQuery = "update m_locator set priorityno = %d where m_locator_id = '%s'";
+    new DatabaseHelperInsertUpdateOrDelete()
+        .execute(String.format(sqlQuery, priority, YOSEMITE_STORE_0_0_1_LOCATOR_ID), 1);
+    reload();
+  }
+
+  protected void assertLocatorInShipmentLine(final String ticketId) {
+    String sqlQuery = "select iol.m_locator_id from m_inoutline iol " //
+        + "join c_orderline ol on ol.c_orderline_id = iol.c_orderline_id " //
+        + "join c_order o on o.c_order_id = ol.c_order_id " //
+        + "where o.documentno = '%s' order by iol.movementqty asc";
+
+    new DatabaseHelperSelect() {
+
+      @Override
+      protected void yieldResultSet(ResultSet rs) throws SQLException {
+        if (rs.isFirst()) {
+          assertThat("Locator should be [Yosemite Store 0-0-1]",
+              rs.getString(1).equals(YOSEMITE_STORE_0_0_1_LOCATOR_ID)
+                  || rs.getString(1).equals(YOSEMITE_STORE_0_0_0_LOCATOR_ID),
+              equalTo(true));
+        } else {
+          assertThat("Locator should be [Yosemite Store 0-0-0]",
+              rs.getString(1).equals(YOSEMITE_STORE_0_0_0_LOCATOR_ID), equalTo(true));
+        }
+      }
+    }.execute(String.format(sqlQuery, ticketId), 2, RecordsCount.GREATER_OR_EQUAL_THAN_EXPECTED);
+  }
+
+  protected void addProductWithService(final String productName, final TestIdConstructor lineNo,
+      final TestIdConstructor quantity, final String deliveryCondition) {
+    addProduct(productName);
+    waitUntilIsVisible(TestIdExtModules.BUTTON_SEARCHPRODUCT_FIRSTROW, true);
+    tap(TestIdExtModules.BUTTON_SEARCHPRODUCT_FIRSTROW);
+    tap(TestIdPack.BUTTON_EDIT);
+    tap(TestIdPack.BUTTON_SCAN);
+    tap(quantity);
+    tap(TestIdPack.BUTTON_KEYPAD_QUANTITY);
+    tap(TestIdExtModules.BUTTON_DELIVERY_MODES);
+    TestIdExtModules.DELIVERY_MODES_COMBO.enyoNode()
+        .executeExtension(".setSelected(" + deliveryCondition + ")");
+    tap(TestIdExtModules.BUTTON_APPLY_DELIVERY_MODES);
+  }
+
+  protected void assertServicesInShipmentLines(final String ticketId, int linesCount,
+      int movementQtyInIoLine) {
+    // @formatter:off
+    String sqlQuery = 
+        "select iol.movementqty " +
+        "from m_inoutline iol " +
+        "join m_inout io on io.m_inout_id = iol.m_inout_id " + 
+        "join c_order o on o.c_order_id = io.c_order_id " + 
+        "join m_product p on p.m_product_id = iol.m_product_id "+
+        "where o.documentno = '%s' and p.producttype = 'S' " +
+        "and io.created = (select max(iio.created) from m_inout iio join c_order oo on oo.c_order_id = iio.c_order_id where oo.documentNo = '%s' )";
+    // @formatter:on
+
+    new DatabaseHelperSelect() {
+
+      @Override
+      protected void yieldResultSet(ResultSet rs) throws SQLException {
+        assertThat("", rs.getInt(1) == movementQtyInIoLine, equalTo(true));
+      }
+    }.execute(String.format(sqlQuery, ticketId, ticketId), linesCount);
+  }
+
+  protected void updateQuantityRuleInService(final String quantityRule) {
+    // @formatter:off
+    String sqlQuery = 
+        "update m_product set quantity_rule = '%s' where m_product_id = '%s'" ;
+    // @formatter:on
+
+    new DatabaseHelperInsertUpdateOrDelete()
+        .execute(String.format(sqlQuery, quantityRule, PRODUCT_CONFIGURATION_ID), 1);
+  }
+
+  protected void assertsInvoiceLineExists(final String ticketId, int quantity, int rowCount,
+      boolean sameInvoice) {
+    final String sqlQuery = "select il.qtyinvoiced, il.c_invoice_id from c_invoiceline il " //
+        + "join c_invoice i on i.c_invoice_id = il.c_invoice_id " //
+        + "join c_orderline ol on ol.c_orderline_id = il.c_orderline_id " //
+        + "join c_order o on o.c_order_id = ol.c_order_id " //
+        + "where o.documentno = '%s' " //
+        + "and i.docstatus = 'CO' " + "order by il.created desc";
+
+    new DatabaseHelperSelect() {
+
+      Set<String> invoices = new HashSet<>();
+
+      @Override
+      protected void yieldResultSet(ResultSet rs) throws SQLException {
+        invoices.add(rs.getString(2));
+        if (rs.isFirst()) {
+          assertThat("Invoice line quantity should be " + quantity, rs.getInt(1) == quantity,
+              equalTo(true));
+        }
+        if (rs.isLast()) {
+          if (sameInvoice) {
+            assertThat("Invoice lines belongs to same invoice", invoices.size() == 1,
+                equalTo(true));
+          } else {
+            assertThat("Invoice lines belongs to different invoices", invoices.size() == 2,
+                equalTo(true));
+          }
+        }
+      }
+    }.execute(String.format(sqlQuery, ticketId), rowCount);
+  }
+
+  protected void addProductWithServiceToTicketConsideringGrouping(final String product,
+      int quantity, final List<TestIdConstructor> rows) {
+    for (int i = 0; i < quantity; i++) {
+      addProduct(product);
+      waitUntilIsVisible(TestIdExtModules.BUTTON_SEARCHPRODUCT_FIRSTROW, true);
+      tap(TestIdExtModules.BUTTON_SEARCHPRODUCT_FIRSTROW);
+      tap(TestIdPack.BUTTON_EDIT);
+    }
+    for (TestIdConstructor row : rows) {
+      tap(row);
+      tap(TestIdExtModules.BUTTON_DELIVERY_MODES);
+      TestIdExtModules.DELIVERY_MODES_COMBO.enyoNode()
+          .executeExtension(".setSelected(" + PICK_IN_STORE_DELIVERY_MODE + ")");
+      tap(TestIdExtModules.BUTTON_APPLY_DELIVERY_MODES);
+    }
+  }
+
+  protected void groupProduct(final String product) {
+    new DatabaseHelperInsertUpdateOrDelete().execute(String.format(groupProductQuery, "Y", product),
+        1);
+  }
+
+  protected void unGroupProduct(final String product) {
+    new DatabaseHelperInsertUpdateOrDelete().execute(String.format(groupProductQuery, "N", product),
+        1);
+  }
+
+  protected void assertAllOrderedQuantitiesWereDeliveredInLines(final String ticketId) {
+    // @formatter:off
+    final String sql = "select 1 "
+        + "from c_orderline ol inner join c_order o on ol.c_order_id = o.c_order_id "
+        + "where o.documentno = '%s' " + "and ol.qtyordered <> ol.qtydelivered";
+    // @formatter:on
+
+    new DatabaseHelperSelect() {
+
+      @Override
+      protected void yieldResultSet(ResultSet rs) throws SQLException {
+        // TODO Auto-generated method stub
+
+      }
+    }.execute(String.format(sql, ticketId), 0);
+  }
+}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/AllDeliveryModesIssueTests.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- *
- * @author RAN
- *
- */
-
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import org.junit.runner.RunWith;
-import org.openbravo.test.mobile.core.junit.toolbox.SuiteClassesToolbox;
-import org.openbravo.test.mobile.retail.mobilecore.junit.OBWildcardPatternSuite;
-
-@RunWith(OBWildcardPatternSuite.class)
-@SuiteClassesToolbox()
-public class AllDeliveryModesIssueTests {
-
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/AllDeliveryModesIssueTestsHV.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- *
- * @author RAN
- *
- */
-
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import org.junit.runner.RunWith;
-import org.openbravo.test.mobile.core.junit.toolbox.SuiteClassesToolbox;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.SuiteAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.junit.OBWildcardPatternSuite;
-
-@RunWith(OBWildcardPatternSuite.class)
-@SuiteClassesToolbox
-@SuiteAnnotations(activateHighVolumeMode = true)
-public class AllDeliveryModesIssueTestsHV {
-
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_01_ShowLinesExceptPickAndCarry.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_01_ShowLinesExceptPickAndCarry extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_ShowLinesExceptPickAndCarry]
-   * 
-   * Verifies lines with Delivery Mode other than “Pick and Carry” are candidates to order
-   * preparation
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <li>Add 5 units of product "Avalance Transceiver"</li>
-   * <li>Set Delivery Mode "Pickup in store"</li>
-   * <li>Adds 5 units of product "Headlamp ultralight"</li>
-   * <li>Set Delivery Mode "Pick and carry"</li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of ticket number</li>
-   * <li>Open Issue Sales Order Menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Verify only line with product "Avalance Transceiver" is shown.</li>
-   * <li>Verify Pending quantity is 5.</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductToTicket(PRODUCT_AVALANCHE_TRANSCEIVER, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
-    addProductToTicket(PRODUCT_HEADLAMP_ULTRALIGHT, TestIdPack.BUTTON_RECEIPT_ROW2,
-        TestIdPack.BUTTON_KEYPAD_5, PICK_AND_CARRY);
-
-    payTicketInCash();
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-
-    isVisible(TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1, true);
-    assertThat("There should be one line",
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows(), equalTo(2L));
-    assertThat("The pending quantity should be 5",
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO.enyoNode()
-            .getContent()
-            .contains("Pend: 5"),
-        equalTo(true));
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_02_VerifyPendingQuantityAfterIssue.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_02_VerifyPendingQuantityAfterIssue extends DeliveryModesIssueTestsHelper {
-  
-  /**
-   * Automates Test Case [OBRDM_DMI_VerifyPendingQuantityAfterIssue]
-   * 
-   * Verifies the pending quantity is updated after generate shipment from selected lines
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <li>Add 5 units of product "Avalanche Transceiver"</li>
-   * <li>Set Delivery Mode "Pickup in store"</li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Open Issue Sales Order Menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Verify the line with product "Avalanche Transceiver" is shown.</li>
-   * <li>Verify Pending quantity has value 5</li>
-   * <li>Set value 2 in Prepare field</li>
-   * <li>Click on Issue Selected button</li>
-   * <li>Open Issue Sales Order Menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Verify the line with product "Avalanche Transceiver" is shown.</li>
-   * <li>Verify Pending Quantity has value 3</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    String ticketId = BackboneHelper.getDocumentNo();
-    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
-    payTicketInCash();
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-
-    isVisible(TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1, true);
-    assertThat("There should be one line",
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows(), equalTo(2L));
-    assertThat("The pending quantity should be 5",
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO.enyoNode()
-            .getContent()
-            .contains("Pend: 5"),
-        equalTo(true));
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-
-    issueSelectedLines();
-
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-
-    assertThat("The pending quantity should be 3",
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO.enyoNode()
-            .getContent()
-            .contains("Pend: 3"),
-        equalTo(true));
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_03_OrderPreparationSelector.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.selenium.TestIdConstructor;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_03_OrderPreparationSelector extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_FilterIssueSalesOrder]
-   * 
-   * Verifies filters in Issue Sales Order popup
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Select Business Partner 'Arturo Montoro'</li>
-   * <li>Create a new ticket</li>
-   * <li>Add products to ticket
-   * <ul>
-   * <li>Product: Avalanche Transceiver, Delivery Mode: Pickup in store</li>
-   * </ul>
-   * </li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Order Date using current date</li>
-   * <li>Verifies the order date from the order shown matches the filter criteria</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Business Partner selecting Antonio Montoro</li>
-   * <li>Verifies the Business Partner from the order shown matches the filter criteria</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Delivery mode selecting Pickup in store</li>
-   * <li>Verifies the Delivery mode from the line shown matches the filter criteria</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-
-    changeDefaultCustomer(TestIdExtModules.DM_ARTURO_MONTORO_BUSINESS_PARTNER);
-
-    addProductToTicket(PRODUCT_AVALANCHE_TRANSCEIVER, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
-
-    payTicketInCash();
-    openIssueSalesOrderPopup();
-
-    TestIdConstructor filterCombo = TestIdExtModules.DM_PREPARATION_FILTER_SELECTOR;
-
-    assertFilterByOrderDate(filterCombo);
-    assertFilterByBusinessPartner(filterCombo);
-    assertFilterByDeliveryMode(filterCombo);
-
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_04_AdvancedFiltersInIssueSalesOrder.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,297 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import java.time.LocalDate;
-import java.time.format.DateTimeFormatter;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_04_AdvancedFiltersInIssueSalesOrder extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_AdvancedFiltersInOrderPreparation]
-   * 
-   * Verifies advanced filters and sorting in Issue Sales Order window
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <li>Set Business Partner to Arturo Montoro</li>
-   * <li>Add products to ticket
-   * <ul>
-   * <li>Product: Insect Repellent, Delivery Mode: Pickup in store with date, Delivery date: 3 days
-   * after today</li>
-   * </ul>
-   * </li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Create a new ticket</li>
-   * <li>Add products to ticket
-   * <ul>
-   * <li>Product: Insect Repellent, Delivery Mode: Pickup in store</li>
-   * </ul>
-   * </li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: The first receipt document No</li>
-   * <li>Order Date: today</li>
-   * <li>Delivery Mode: Pickup in store with date</li>
-   * <li>Delivery Date: 3 days after today</li>
-   * <li>Business Partner: Arturo Montoro</li>
-   * </ul>
-   * </li>
-   * <li>Apply filters</li>
-   * <li>Verify one result is shown</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: The first receipt document No</li>
-   * <li>Order Date: one day after today</li>
-   * <li>Delivery Mode: Pickup in store with date</li>
-   * <li>Delivery Date: 3 days after today</li>
-   * <li>Business Partner: Arturo Montoro</li>
-   * </ul>
-   * </li>
-   * <li>Apply filters</li>
-   * <li>Verify no result is shown</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: The first receipt document No</li>
-   * <li>Order Date: today</li>
-   * <li>Delivery Mode: Pickup in store</li>
-   * <li>Delivery Date: 3 days after today</li>
-   * <li>Business Partner: Arturo Montoro</li>
-   * </ul>
-   * </li>
-   * <li>Apply filters</li>
-   * <li>Verify no result is shown</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: The first receipt document No</li>
-   * <li>Order Date: today</li>
-   * <li>Delivery Mode: Pickup in store with date</li>
-   * <li>Delivery Date: 4 days after today</li>
-   * <li>Business Partner: Arturo Montoro</li>
-   * </ul>
-   * </li>
-   * <li>Apply filters</li>
-   * <li>Verify no result is shown</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: The first receipt document No</li>
-   * <li>Order Date: today</li>
-   * <li>Delivery Mode: Pickup in store with date</li>
-   * <li>Delivery Date: 3 days after today</li>
-   * <li>Business Partner: VBS Customer</li>
-   * </ul>
-   * </li>
-   * <li>Apply filters</li>
-   * <li>Verify no result is shown</li>
-   * 
-   * <li>Open OIssue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: "0000"</li>
-   * </ul>
-   * </li>
-   * <li>Sort by DocNo Asc</li>
-   * <li>Apply filters</li>
-   * <li>Verify the doc No of first result is lesser than the second</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: "0000"</li>
-   * </ul>
-   * </li>
-   * <li>Sort by DocNo Desc</li>
-   * <li>Apply filters</li>
-   * <li>Verify the doc No of first result is greater than the second</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: "0000"</li>
-   * </ul>
-   * </li>
-   * <li>Sort by Order Date Asc</li>
-   * <li>Apply filters</li>
-   * <li>Verify the order date field contain date as today</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: "0000"</li>
-   * </ul>
-   * </li>
-   * <li>Sort by Business Partner Asc</li>
-   * <li>Apply filters</li>
-   * <li>Verify the Business Partner in first result is "Arturo Montoro"</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: "0000"</li>
-   * </ul>
-   * </li>
-   * <li>Sort by Business Partner Desc</li>
-   * <li>Apply filters</li>
-   * <li>Verify the Business Partner in first result is "VBS Customer"</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: "0000"</li>
-   * </ul>
-   * </li>
-   * <li>Sort by Delivery mode Asc</li>
-   * <li>Apply filters</li>
-   * <li>Verify the Delivery mode in first result is "Pickup in store"</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: "0000"</li>
-   * </ul>
-   * </li>
-   * <li>Sort by Delivery mode Desc</li>
-   * <li>Apply filters</li>
-   * <li>Verify the Delivery mode in first result is "Pickup in store with date"</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: "0000"</li>
-   * </ul>
-   * </li>
-   * <li>Sort by Delivery date Asc</li>
-   * <li>Apply filters</li>
-   * <li>Verify the Delivery date in first result is three days after today</li>
-   * <li>Open Issue Sales Order Advanced Filter window</li>
-   * <li>Set Advanced Filter fields
-   * <ul>
-   * <li>DocNo: "0000"</li>
-   * </ul>
-   * </li>
-   * <li>Sort by Delivery date Desc</li>
-   * <li>Apply filters</li>
-   * <li>Verify the Delivery date in first result is empty</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    String ticket = BackboneHelper.getDocumentNo();
-
-    changeDefaultCustomer(TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER);
-    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_1, PICK_IN_STORE_WITH_DATE_DELIVERY_MODE);
-    payTicketInCash();
-    updateDeliveryDate(ticket);
-
-    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_1, PICK_IN_STORE_DELIVERY_MODE);
-    payTicketInCash();
-
-    openIssueSalesOrderPopup();
-
-    assertAdvancedFiltersOrderPreparationResults(ticket,
-        LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        PICK_IN_STORE_WITH_DATE_DELIVERY_MODE,
-        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER, r -> r == 2);
-
-    assertAdvancedFiltersOrderPreparationResults(ticket,
-        LocalDate.now().plusDays(1).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        PICK_IN_STORE_WITH_DATE_DELIVERY_MODE,
-        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER, r -> r == 0);
-
-    assertAdvancedFiltersOrderPreparationResults(ticket,
-        LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        PICK_IN_STORE_DELIVERY_MODE,
-        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER, r -> r == 0);
-
-    assertAdvancedFiltersOrderPreparationResults(ticket,
-        LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        PICK_IN_STORE_WITH_DATE_DELIVERY_MODE,
-        LocalDate.now().plusDays(4).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        TestIdExtModules.DM_CARL_STUDSON_BUSINESS_PARTNER, r -> r == 0);
-
-    assertAdvancedFiltersOrderPreparationResults(ticket,
-        LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        PICK_IN_STORE_WITH_DATE_DELIVERY_MODE,
-        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy")),
-        TestIdExtModules.DM_ARTURO_MONTORO_BUSINESS_PARTNER, r -> r == 0);
-
-    assertAdvancedFilterSortingOrder("0000", TestIdExtModules.DM_DOC_NO_ADV_FILTER_ORDER_DIRECION, //
-        ASCENDING, //
-        (a, b) -> {
-          return a.intValue() < b.intValue();
-        });
-
-    assertAdvancedFilterSortingOrder("0000", TestIdExtModules.DM_DOC_NO_ADV_FILTER_ORDER_DIRECION, //
-        DESCENDING, //
-        (a, b) -> {
-          return a.intValue() > b.intValue();
-        });
-
-    assertAdvancedFilterSortingOrder("0000", TestIdExtModules.DM_ORDER_DATE_ADV_FILTER_ORDER_DIRECTION,
-        ASCENDING, //
-        TestIdExtModules.DM_ORDERED_DATE_FIELD,
-        t -> t.contains(LocalDate.now().format(DateTimeFormatter.ofPattern("dd-MM-yyyy"))));
-
-    assertAdvancedFilterSortingOrder("0000", TestIdExtModules.DM_BP_ADV_FILTER_ORDER_DIRECTION, //
-        ASCENDING, //
-        TestIdExtModules.DM_BUSINESS_PARTNER_FIELD, //
-        t -> t.contains("Arturo Montoro"));
-
-    assertAdvancedFilterSortingOrder("0000", TestIdExtModules.DM_BP_ADV_FILTER_ORDER_DIRECTION, //
-        DESCENDING, //
-        TestIdExtModules.DM_BUSINESS_PARTNER_FIELD, //
-        t -> t.contains("Carl Studson") || t.contains("Mara Palliot"));
-
-    assertAdvancedFilterSortingOrder("0000", //
-        TestIdExtModules.DM_DELIVERY_MODE_ADV_FILTER_ORDER_DIRECTION, ASCENDING, //
-        TestIdExtModules.DM_DELIVERY_MODE_FIELD, //
-        t -> t.contains("Pickup in store"));
-
-    assertAdvancedFilterSortingOrder("0000", //
-        TestIdExtModules.DM_DELIVERY_MODE_ADV_FILTER_ORDER_DIRECTION, DESCENDING, //
-        TestIdExtModules.DM_DELIVERY_MODE_FIELD, //
-        t -> t.contains("Pickup in store with date"));
-
-    assertAdvancedFilterSortingOrder("0000", //
-        TestIdExtModules.DM_DELIVERY_DATE_ADV_FILTER_ORDER_DIRECTION, ASCENDING, //
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO, //
-        t -> t.contains(
-            LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("dd-MM-yyyy"))));
-
-    assertAdvancedFilterSortingOrder("0000", //
-        TestIdExtModules.DM_DELIVERY_DATE_ADV_FILTER_ORDER_DIRECTION, DESCENDING, //
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST_ROW1_ORDERLINEINFO, //
-        t -> t.endsWith("Del:   "));
-
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_05_VerifyShippingLineCreated.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_05_VerifyShippingLineCreated extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_VerifyShippingLineCreate]
-   * 
-   * Verifies shipment lines are created when preparing lines
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <li>Add products to ticket
-   * <ul>
-   * <li>Product: Insect Repellent, Quantity: 5, Delivery Mode: Pickup in store</li>
-   * </ul>
-   * </li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Prepare the whole quantity of the line</li>
-   * <li>Asserts a shipment line was created linked to the order line</li>
-   * <li>Asserts there is not an invoice line linked to the order line</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
-    payTicketInCash();
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
-
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-
-    assertShipmentLineExists(ticketId);
-    assertsInvoiceLineExists(ticketId, 0, 0, false);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_06_VerifyDeliveryInformationInOpenTicket.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_06_VerifyDeliveryInformationInOpenTicket extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_VerifyDeliveryInformationInOpenTicket]
-   * 
-   * Verifies delivered quantity information is updated in an opened ticket when the order is
-   * prepared
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <li>Add products to ticket
-   * <ul>
-   * <li>Product: Insect Repellent, Quantity: 5, Delivery Mode: Pickup in store</li>
-   * </ul>
-   * </li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Open the ticket using "Open Receipt" menu</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Prepare the whole quantity of the line</li>
-   * <li>Asserts the ticket line information contains the text "Delivered Quantity: 5"</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
-    payTicketInCash();
-
-    openReceipt(ticketId);
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
-
-    issueSelectedLines();
-
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-    waitUntilIsVisible(TestIdExtModules.DM_DELIVERED_QTY_OPEN_TICKET, true);
-    assertThat("Delivered quantity should be 5",
-        TestIdExtModules.DM_DELIVERED_QTY_OPEN_TICKET.enyoNode()
-            .getContent()
-            .contains("Delivered Quantity: 5"),
-        equalTo(true));
-    tap(TestIdExtModules.DM_CLOSE_OPEN_TICKET);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_07_VerifyLayawaysCannotBeIssued.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_07_VerifyLayawaysCannotBeIssued extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_VerifyLayawaysCannotBeIssued]
-   * 
-   * Verifies layaway ticket cannot be issued
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket as layaway</li>
-   * <li>Add products to ticket
-   * <ul>
-   * <li>Product: Insect Repellent, Quantity: 5, Delivery Mode: Pickup in store</li>
-   * </ul>
-   * </li>
-   * <li>Leave the ticket as layaway</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Asserts no results are shown</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    setTicketAsLayaway();
-    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
-    leaveTicketAsLayaway();
-
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    assertThat("There should be no lines",
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows(), equalTo(0L));
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_08_VerifyLocatorInShipmentLine.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_08_VerifyLocatorInShipmentLine extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_VerifyLocatorInShipmentLine]
-   * 
-   * Verifies the locators used n shipment line
-   * 
-   * <ul>
-   * <li>Set priority for Yosemite Store 0-0-1 Locator to 25</li>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <li>Add products to ticket
-   * <ul>
-   * <li>Product: Baby Carrier, Quantity: 5, Delivery Mode: Pickup in store</li>
-   * </ul>
-   * </li>
-   * <li>Pay ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Prepare 5 units of product</li>
-   * <li>Verify the generated shipment contains two lines, the first line for "Yosemite Store 0-0-1"
-   * locator, the second one for "Yosemite Store 0-0-0" locator</li>
-   * <li>Restore priority for Yosemite Store 0-0-1 Locator to 50</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    setPriorityForLocator(25);
-
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductToTicket(BABY_CARRIER, TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_KEYPAD_5,
-        PICK_IN_STORE_DELIVERY_MODE);
-    payTicketInCash();
-
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
-
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-
-    assertLocatorInShipmentLine(ticketId);
-    setPriorityForLocator(50);
-
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_09_IssueWithProductWithServiceRelatedUniqueQuantity.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_09_IssueWithProductWithServiceRelatedUniqueQuantity
-    extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_IssueWithProductWithServiceRelatedUniqueQuantity]
-   * 
-   * Verifies deliver of services with quantity rule 'Unique Quantity', linked to products
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <ul>
-   * <li>Product: GPS Nano, Quantity: 5, Delivery Mode: Pickup in store</li>
-   * <li>Product: Configuration</li>
-   * </ul>
-   * </li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Go to Issue Sales Order menu</li>
-   * <li>Filter by the ticket number</li>
-   * <li>Prepare 2 units of product</li>
-   * <li>Issue the selected line</li>
-   * <li>Verify there is a shipment line linked to product Configuration with quantity 1 for the
-   * created shipment</li>
-   * <li>Go to Issue Sales Order menu</li>
-   * <li>Filter by the ticket number</li>
-   * <li>Prepare 3 units of product</li>
-   * <li>Issue the selected line</li>
-   * <li>Verify there is not a shipment line linked to product Configuration for the last created
-   * shipment</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductWithService(GPS_NANO, TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_KEYPAD_5,
-        PICK_IN_STORE_DELIVERY_MODE);
-    payTicketInCash();
-
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-    assertServicesInShipmentLines(ticketId, 1, 1);
-
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-
-    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-    assertServicesInShipmentLines(ticketId, 0, 0);
-
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_10_IssueWithProductWithServiceRelatedPerProduct.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_10_IssueWithProductWithServiceRelatedPerProduct
-    extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_IssueWithProductWithServiceRelatedPerProduct]
-   * 
-   * Verifies deliver of services with quantity rule 'Per Product', linked to products
-   * 
-   * <ul>
-   * <li>Logged In the Back End as Openbravo</li>
-   * <li>Go to Product Window</li>
-   * <li>Filter by search key "seq_service"</li>
-   * <li>Set quantity rule to "Per product"</li>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <ul>
-   * <li>Product: GPS Nano, Quantity: 5, Delivery Mode: Pickup in store</li>
-   * <li>Product: Configuration</li>
-   * </ul>
-   * </li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Go to Issue Sales Order menu</li>
-   * <li>Filter by the ticket number</li>
-   * <li>Prepare 2 units of product</li>
-   * <li>Issue the selected line</li>
-   * <li>Verify there is a shipment line linked to product Configuration with quantity 2 for the
-   * created shipment</li>
-   * <li>Go to Issue Sales Order menu</li>
-   * <li>Filter by the ticket number</li>
-   * <li>Prepare 3 units of product</li>
-   * <li>Issue the selected line</li>
-   * <li>Verify there is a shipment line linked to product Configuration with quantity 3 for the
-   * created shipment</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    updateQuantityRuleInService(PER_PRODUCT_QUANTITY_RULE);
-    reload();
-
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductWithService(GPS_NANO, TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_KEYPAD_5,
-        PICK_IN_STORE_DELIVERY_MODE);
-    payTicketInCash();
-
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-    assertServicesInShipmentLines(ticketId, 1, 2);
-
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-
-    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
-    assertServicesInShipmentLines(ticketId, 1, 3);
-
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_11_VerifyOneInvoiceCreatedWhenInvoiceTermAfterOrderDelivered.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_11_VerifyOneInvoiceCreatedWhenInvoiceTermAfterOrderDelivered
-    extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_VerifyOneInvoiceCreatedWhenInvoiceTermAfterOrderDelivered]
-   * 
-   * Verifies invoice lines are created when preparing lines and order invoice term is "After Order
-   * Delivered"
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <li>Add products to ticket
-   * <ul>
-   * <li>Product: Insect Repellent, Quantity: 4, Delivery Mode: Pickup in store</li>
-   * </ul>
-   * </li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Prepare two units of product</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Prepare two units of product</li>
-   * <li>Asserts there are two invoice lines linked to sales order line, and both belongs to the
-   * same invoice</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_4, PICK_IN_STORE_DELIVERY_MODE);
-    payTicketInCash();
-    updateInvoiceTerms(ticketId, AFTER_ORDER_DELIVERED_INVOICE_TERM);
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-
-    assertsInvoiceLineExists(ticketId, 2, 2, true);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_12_VerifyTwoInvoicesGeneratedWhenInvoiceTermAfterDelivery.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_12_VerifyTwoInvoicesGeneratedWhenInvoiceTermAfterDelivery
-    extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case [OBRDM_DMI_VerifyTwoInvoicesGeneratedWhenInvoiceTermAfterDelivery]
-   * 
-   * Verifies invoice lines are created when preparing lines and order invoice term is "After
-   * Delivery"
-   * 
-   * <ul>
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <li>Add products to ticket
-   * <ul>
-   * <li>Product: Insect Repellent, Quantity: 5, Delivery Mode: Pickup in store</li>
-   * </ul>
-   * </li>
-   * <li>Pay the ticket in cash</li>
-   * <li>Take note of the ticket number</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Prepare two units of product</li>
-   * <li>Asserts there is an invoice line linked to sales order line</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by Document No using the ticket number noted before</li>
-   * <li>Prepare three units of product</li>
-   * <li>Asserts there are two invoice lines linked to sales order line, and each one belong different
-   * invoices</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductToTicket(PRODUCT_INSECT_REPELLENT_EXTRA, TestIdPack.BUTTON_RECEIPT_ROW1,
-        TestIdPack.BUTTON_KEYPAD_5, PICK_IN_STORE_DELIVERY_MODE);
-    payTicketInCash();
-    updateInvoiceTerms(ticketId, AFTER_DELIVERY_INVOICE_TERM);
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-    assertsInvoiceLineExists(ticketId, 2, 1, true);
-
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-    tap(TestIdExtModules.DM_INCREASE_LINE_QTY_TO_PREPARE);
-
-    issueSelectedLines();
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-
-    assertsInvoiceLineExists(ticketId, 3, 2, false);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_13_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedPerProduct.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import java.util.Arrays;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_13_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedPerProduct
-    extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case
-   * [OBRDM_DMI_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedPerProduct]
-   * 
-   * Verifies all ordered quantities in lines with service product are delivered when products are
-   * ungrouped, but service are grouped and quantity rule is "Per Product"
-   * 
-   * <ul>
-   * <li>Logged In the Back End as Openbravo</li>
-   * <li>Go to Product Window</li>
-   * <li>Filter product by search key "seq010a"</li>
-   * <li>Set Grouped Product to false</li>
-   * <li>Filter product by search key "seq_service"</li>
-   * <li>Set Grouped Product to true</li>
-   * <li>Set Quantity Rule to "As Per Product"</li>
-   * 
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <ul>
-   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
-   * <li>Product: Configuration</li>
-   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
-   * <li>Product: Configuration</li>
-   * </ul>
-   * </li>
-   * <li>Pay ticket in cash</li>
-   * <li>Take note of ticket number</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by ticket number</li>
-   * <li>Prepare the whole order</li>
-   * <li>Verify all ticket lines have been fully delivered</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    unGroupProduct(PRODUCT_GPS_NANO_ID);
-    groupProduct(PRODUCT_CONFIGURATION_ID);
-    updateQuantityRuleInService(PER_PRODUCT_QUANTITY_RULE);
-    reload();
-
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductWithServiceToTicketConsideringGrouping(GPS_NANO, 2,
-        Arrays.asList(TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_RECEIPT_ROW3));
-
-    payTicketInCash();
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
-    issueSelectedLines();
-
-    assertAllOrderedQuantitiesWereDeliveredInLines(ticketId);
-    groupProduct(PRODUCT_GPS_NANO_ID);
-    groupProduct(PRODUCT_CONFIGURATION_ID);
-    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_14_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedUniqueQuantity.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import java.util.Arrays;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_14_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedUniqueQuantity
-    extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case
-   * [OBRDM_DMI_VerifyDeliveringUngroupedProductWithGroupedServiceRelatedUniqueQuantity]
-   * 
-   * Verifies all ordered quantities in lines with service product are delivered when products are
-   * ungrouped, but service are grouped and quantity rule is "Unique Quantity"
-   * 
-   * <ul>
-   * <li>Logged In the Back End as Openbravo</li>
-   * <li>Go to Product Window</li>
-   * <li>Filter product by search key "seq010a"</li>
-   * <li>Set Grouped Product to false</li>
-   * <li>Filter product by search key "seq_service"</li>
-   * <li>Set Grouped Product to true</li>
-   * <li>Set Quantity Rule to "Unique Quantity"</li>
-   * 
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <ul>
-   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
-   * <li>Product: Configuration</li>
-   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
-   * <li>Product: Configuration</li>
-   * </ul>
-   * </li>
-   * <li>Pay ticket in cash</li>
-   * <li>Take note of ticket number</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by ticket number</li>
-   * <li>Prepare the whole order</li>
-   * <li>Verify all ticket lines have been fully delivered</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    unGroupProduct(PRODUCT_GPS_NANO_ID);
-    groupProduct(PRODUCT_CONFIGURATION_ID);
-    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
-    reload();
-
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductWithServiceToTicketConsideringGrouping(GPS_NANO, 2,
-        Arrays.asList(TestIdPack.BUTTON_RECEIPT_ROW1, TestIdPack.BUTTON_RECEIPT_ROW3));
-
-    payTicketInCash();
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
-    issueSelectedLines();
-
-    assertAllOrderedQuantitiesWereDeliveredInLines(ticketId);
-    groupProduct(PRODUCT_GPS_NANO_ID);
-    groupProduct(PRODUCT_CONFIGURATION_ID);
-    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DMI_15_VerifyDeliveringGroupedProductWithUngroupedServiceRelatedPerProduct.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
- *************************************************************************
- * 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) 2019 Openbravo S.L.U.
- * All Rights Reserved.
- * Contributor(s):
- ************************************************************************
- */
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import java.util.Arrays;
-
-import org.junit.Test;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.BackboneHelper;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-@TestClassAnnotations(isHighVolumeCompatible = true)
-public class DMI_15_VerifyDeliveringGroupedProductWithUngroupedServiceRelatedPerProduct
-    extends DeliveryModesIssueTestsHelper {
-
-  /**
-   * Automates Test Case
-   * [OBRDM_DMI_VerifyDeliveringGroupedProductWithUngroupedServiceRelatedPerProduct]
-   * 
-   * Verifies all ordered quantities in lines with service product are delivered when products are
-   * grouped, but service are ungrouped and quantity rule is "Per Product"
-   * 
-   * <ul>
-   * <li>Logged In the Back End as Openbravo</li>
-   * <li>Go to Product Window</li>
-   * <li>Filter product by search key "seq010a"</li>
-   * <li>Set Grouped Product to true</li>
-   * <li>Filter product by search key "seq_service"</li>
-   * <li>Set Grouped Product to false</li>
-   * <li>Set Quantity Rule to "Per Product"</li>
-   * 
-   * <li>Logged as vallblanca user</li>
-   * <li>Create a new ticket</li>
-   * <ul>
-   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
-   * <li>Product: Configuration</li>
-   * <li>Product: GPS Nano, Quantity: 1, Delivery Mode: Pickup in store</li>
-   * <li>Product: Configuration</li>
-   * </ul>
-   * </li>
-   * <li>Pay ticket in cash</li>
-   * <li>Take note of ticket number</li>
-   * <li>Open Issue Sales Order menu</li>
-   * <li>Filter by ticket number</li>
-   * <li>Prepare the whole order</li>
-   * <li>Verify all ticket lines have been fully delivered</li>
-   * </ul>
-   */
-  @Test
-  public void test() {
-    groupProduct(PRODUCT_GPS_NANO_ID);
-    unGroupProduct(PRODUCT_CONFIGURATION_ID);
-    updateQuantityRuleInService(PER_PRODUCT_QUANTITY_RULE);
-    reload();
-
-    String ticketId = BackboneHelper.getDocumentNo();
-
-    addProductWithServiceToTicketConsideringGrouping(GPS_NANO, 2,
-        Arrays.asList(TestIdPack.BUTTON_RECEIPT_ROW1));
-
-    payTicketInCash();
-    openIssueSalesOrderPopup();
-    filterOrderLinesByDocumentNo(ticketId);
-    tap(TestIdExtModules.DM_ICON_ORDER_ROW1);
-    issueSelectedLines();
-
-    assertAllOrderedQuantitiesWereDeliveredInLines(ticketId);
-    groupProduct(PRODUCT_GPS_NANO_ID);
-    groupProduct(PRODUCT_CONFIGURATION_ID);
-    updateQuantityRuleInService(UNIQUE_QUANTITY_QUANTITY_RULE);
-  }
-}
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/deliverymodesissue/DeliveryModesIssueTestsHelper.java	Thu May 09 10:07:53 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,434 +0,0 @@
-package org.openbravo.test.mobile.retail.extmodules.selenium.tests.deliverymodesissue;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.time.format.DateTimeFormatter;
-import java.util.Calendar;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.function.BiPredicate;
-import java.util.function.Predicate;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.openbravo.test.mobile.core.utils.OBUtils;
-import org.openbravo.test.mobile.retail.extmodules.selenium.TestIdExtModules;
-import org.openbravo.test.mobile.retail.extmodules.selenium.terminals.DeliveryModesHelper;
-import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperInsertUpdateOrDelete;
-import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperSelect;
-import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperSelect.RecordsCount;
-import org.openbravo.test.mobile.retail.mobilecore.javascript.SynchronizationMonitor;
-import org.openbravo.test.mobile.retail.mobilecore.selenium.TestIdConstructor;
-import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-
-public class DeliveryModesIssueTestsHelper extends DeliveryModesHelper {
-
-  private static final String YOSEMITE_STORE_0_0_0_LOCATOR_ID = "62FF417ECFBA41B491F2FB013AC70B53";
-  private static final String YOSEMITE_STORE_0_0_1_LOCATOR_ID = "A7C7F92D81984923A4EF100293A43E62";
-  protected static final String PRODUCT_CONFIGURATION_ID = "95FF37BC29824C4CBC7ECCB0AF4E7DF5";
-  protected static final String PRODUCT_GPS_NANO_ID = "0D53E1A3C5BC45A4B2BCC4266D3F4B96";
-  protected static final String BABY_CARRIER = "WVG/B0004";
-  protected static final String PRODUCT_HEADLAMP_ULTRALIGHT = "WVG/L0001";
-  protected static final String PRODUCT_AVALANCHE_TRANSCEIVER = "WVG/M0019";
-  protected static final String PRODUCT_INSECT_REPELLENT_EXTRA = "WVG/SC001";
-  protected static final String PICK_AND_CARRY = "0";
-  protected static final String PICK_IN_STORE_DELIVERY_MODE = "1";
-  protected static final String PICK_IN_STORE_WITH_DATE_DELIVERY_MODE = "2";
-  protected static final boolean ASCENDING = true;
-  protected static final boolean DESCENDING = false;
-  protected static final String GPS_NANO = "seq010a";
-  protected static final String UNIQUE_QUANTITY_QUANTITY_RULE = "UQ";
-  protected static final String PER_PRODUCT_QUANTITY_RULE = "PP";
-  protected static final String AFTER_ORDER_DELIVERED_INVOICE_TERM = "O";
-  protected static final String AFTER_DELIVERY_INVOICE_TERM = "D";
-  protected final String groupProductQuery = "update m_product set em_obpos_groupedproduct = '%s' where m_product_id = '%s'";
-
-  protected void setTicketAsLayaway() {
-    tap(TestIdPack.BUTTON_MENU);
-    tap(TestIdPack.BUTTON_MENU_LAYAWAYTHISRECEIPT);
-  }
-
-  protected void leaveTicketAsLayaway() {
-    tap(TestIdPack.BUTTON_PAY);
-    tap(TestIdPack.BUTTON_LAYAWAY);
-    SynchronizationMonitor.waitUntilDataIsInTheServer();
-  }
-
-  protected void addProductToTicket(final String productName, final TestIdConstructor lineNo,
-      final TestIdConstructor quantity, final String deliveryCondition) {
-    addProduct(productName);
-    tap(lineNo);
-    tap(quantity);
-    tap(TestIdPack.BUTTON_KEYPAD_QUANTITY);
-    tap(lineNo);
-    tap(TestIdExtModules.BUTTON_EDIT_DELIVERYMODES);
-    TestIdExtModules.COMBO_DELIVERYMODES_LIST.enyoNode()
-        .executeExtension(".setSelected(" + deliveryCondition + ")");
-    tap(TestIdExtModules.BUTTON_DELIVERYMODES_APPLY);
-  }
-
-  protected void addProduct(final String productName) {
-    tap(TestIdPack.BUTTON_SEARCH);
-    write(TestIdPack.FIELD_SEARCH_TEXT, productName);
-    TestIdPack.FIELD_SEARCH_TEXT.enyoNode().executeExtension(".waterfall('onchange')");
-    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
-    tap(TestIdPack.BUTTON_SEARCHPRODUCT_FIRSTROW);
-  }
-
-  protected void payTicketInCash() {
-    tap(TestIdPack.BUTTON_PAY);
-    tap(TestIdPack.BUTTON_PAY_EXACT);
-    tap(TestIdPack.BUTTON_PAY_DONE);
-    SynchronizationMonitor.waitUntilDataIsInTheServer();
-  }
-
-  protected void openIssueSalesOrderPopup() {
-    tap(TestIdPack.BUTTON_MENU);
-    tap(TestIdExtModules.MENU_ISSUE_SALES_ORDER);
-    isVisible(TestIdExtModules.DM_ISSUE_SALES_ORDER_POPUP, true);
-  }
-
-  protected void filterOrderLinesByDocumentNo(String ticketId) {
-    write(TestIdExtModules.DM_PREPARATION_POPUP_FILTER, ticketId);
-    tap(TestIdExtModules.DM_PREPARATION_POPUP_SEARCH);
-    OBUtils.pause(500);
-  }
-
-  protected String issueSelectedLines() {
-    tap(TestIdExtModules.DM_ISSUE_SELECTED);
-    SynchronizationMonitor.waitUntilDataIsInTheServer();
-    isVisible(TestIdExtModules.DM_SHIPMENT_LIST_DOCNO_POPUP, true);
-    Pattern pattern = Pattern.compile(".*\\[(\\w+)\\]");
-    Matcher matcher = pattern
-        .matcher(TestIdExtModules.DM_SHIPMENT_LIST_DOCNO_LABEL.enyoNode().getContent());
-    matcher.find();
-    String pickingListDocNo = matcher.group(1);
-    tap(TestIdExtModules.DM_SHIPMENT_LIST_DOCNO_OK_BTN);
-    return pickingListDocNo;
-  }
-
-  protected void changeDefaultCustomer(final TestIdConstructor businessPartner) {
-    tap(TestIdPack.BUTTON_RECEIPT_CUSTOMER);
-
-    isVisible(TestIdExtModules.DM_BUSINESS_PARTNER_FILTER_POPUP, true);
-    tap(TestIdPack.BUTTON_CUSTOMER_MODAL_SEARCH);
-    tap(businessPartner);
-  }
-
-  protected void assertFilterByDeliveryMode(final TestIdConstructor filterCombo) {
-    openIssueSalesOrderPopup();
-    filterCombo.enyoNode().executeExtension(".setSelected(3)");
-    filterCombo.enyoNode().executeExtension(".waterfall('onchange')");
-
-    TestIdExtModules.DM_DELIVERY_MODE_SELECTOR.enyoNode().executeExtension(".setSelected(1)");
-    tap(TestIdExtModules.DM_PREPARATION_POPUP_SEARCH);
-    OBUtils.pause(500);
-
-    assertThat("The delivery mode should be 'Pickup in store'",
-        TestIdExtModules.DM_DELIVERY_MODE_FIELD.enyoNode().getContent().contains("Pickup"),
-        equalTo(true));
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-  }
-
-  protected void assertFilterByOrderDate(final TestIdConstructor filterCombo) {
-    final SimpleDateFormat df = new SimpleDateFormat("dd-MM-YYYY");
-    final String today = df.format(Calendar.getInstance().getTime());
-    filterCombo.enyoNode().executeExtension(".setSelected(1)");
-
-    write(TestIdExtModules.DM_PREPARATION_POPUP_FILTER, today);
-    tap(TestIdExtModules.DM_PREPARATION_POPUP_SEARCH);
-    OBUtils.pause(500);
-
-    assertThat("There should be at least one line",
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows().intValue() > 0,
-        equalTo(true));
-
-    assertThat("The date should be " + today,
-        TestIdExtModules.DM_ORDERED_DATE_FIELD.enyoNode().getContent().contains(today),
-        equalTo(true));
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-  }
-
-  protected void assertFilterByBusinessPartner(final TestIdConstructor filterCombo) {
-    openIssueSalesOrderPopup();
-    filterCombo.enyoNode().executeExtension(".setSelected(2)");
-    filterCombo.enyoNode().executeExtension(".waterfall('onchange')");
-
-    tap(TestIdExtModules.DM_PREPARATION_BUSINESS_PARTNER_SELECTOR);
-    tap(TestIdPack.BUTTON_CUSTOMER_MODAL_SEARCH);
-
-    tap(TestIdExtModules.DM_ARTURO_MONTORO_BUSINESS_PARTNER);
-    tap(TestIdExtModules.DM_PREPARATION_POPUP_SEARCH);
-    OBUtils.pause(500);
-
-    assertThat("There should be at least one line",
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows().intValue() > 0,
-        equalTo(true));
-
-    assertThat("The business partner should be 'Arturo Montoro'",
-        TestIdExtModules.DM_BUSINESS_PARTNER_FIELD.enyoNode().getContent().contains("Montoro"),
-        equalTo(true));
-    tap(TestIdExtModules.DM_ISSUE_POPUP_CLOSE_BUTTON);
-  }
-
-  protected void updateDeliveryDate(final String ticketId) {
-    final String sqlQuery = "update c_orderline set em_obrdm_delivery_date = to_date('%s', 'yyyy-MM-dd') "
-        + "where c_orderline_id = "
-        + "  (select max (c_orderline_id) from c_order o join c_orderline ol on o.c_order_id = ol.c_order_id where o.documentNo = '%s')";
-    new DatabaseHelperInsertUpdateOrDelete().execute(String.format(sqlQuery,
-        LocalDate.now().plusDays(3).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")), ticketId),
-        1);
-  }
-
-  protected void assertAdvancedFiltersOrderPreparationResults(final String firstReceipt,
-      final String orderDate, final String deliveryMode, final String deliveryDate,
-      final TestIdConstructor businessPartner, final Predicate<Long> condition) {
-    tap(TestIdExtModules.DM_PREPARATION_ADV_FILTER_BTN);
-    write(TestIdExtModules.DM_DOC_NO_ADV_FILTER_SEARCH_CRITERIA, firstReceipt);
-    write(TestIdExtModules.DM_ORDER_DATE_ADV_FILTER_SEARCH_CRITERIA, orderDate);
-    TestIdExtModules.DM_DELIVERY_MODE_ADV_FILTER_SEARCH_CRITERIA.enyoNode()
-        .executeExtension(".setSelected(" + deliveryMode + ")");
-    write(TestIdExtModules.DM_DELIVERY_DATE_ADV_FILTER_SEARCH_CRITERIA, deliveryDate);
-    tap(TestIdExtModules.DM_BUSINESS_PARTNER_ADV_FILTER_SEARCH_CRITERIA);
-    tap(TestIdPack.BUTTON_CUSTOMER_MODAL_SEARCH);
-    tap(businessPartner);
-    tap(TestIdExtModules.DM_ADV_FILTER_APPLY_BTN);
-    OBUtils.pause(1000);
-    assertThat("There should be one line",
-        condition.test(TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows()),
-        equalTo(true));
-  }
-
-  protected void assertAdvancedFilterSortingOrder(final String searchCriteria,
-      final TestIdConstructor orderElement, boolean ascending,
-      final BiPredicate<Integer, Integer> docNoOrderPredicate) {
-    applySortingInOrderPreparation(searchCriteria, orderElement, ascending);
-    if (docNoOrderPredicate != null) {
-      final int hashCodeDocNoFistLine = TestIdExtModules.DM_DOC_NO_ORDER_ROW1.enyoNode()
-          .getContent()
-          .hashCode();
-      final int hashCodeDocNoSecondLine = TestIdExtModules.DM_DOC_NO_ORDER_ROW2.enyoNode()
-          .getContent()
-          .hashCode();
-      assertThat("Doc No sorting",
-          docNoOrderPredicate.test(hashCodeDocNoFistLine, hashCodeDocNoSecondLine), equalTo(true));
-    }
-  }
-
-  protected void applySortingInOrderPreparation(final String searchCriteria,
-      final TestIdConstructor orderElement, boolean ascending) {
-    tap(TestIdExtModules.DM_PREPARATION_ADV_FILTER_BTN);
-    tap(TestIdExtModules.DM_ADV_FILTER_CLEAR_BTN);
-    write(TestIdExtModules.DM_DOC_NO_ADV_FILTER_SEARCH_CRITERIA, searchCriteria);
-    tap(orderElement);
-    if (!ascending) {
-      tap(orderElement);
-    }
-    tap(TestIdExtModules.DM_ADV_FILTER_APPLY_BTN);
-    OBUtils.pause(1000);
-    assertThat("There should be more than one line",
-        TestIdExtModules.DM_PREPARATION_ORDER_LIST.enyoNode().getCountRows() > 2, equalTo(true));
-  }
-
-  protected void assertAdvancedFilterSortingOrder(final String searchCriteria,
-      final TestIdConstructor orderElement, boolean ascending,
-      final TestIdConstructor elementToTest, final Predicate<String> predicate) {
-    applySortingInOrderPreparation(searchCriteria, orderElement, ascending);
-
-    isVisible(elementToTest, true);
-    assertThat(elementToTest.toString(), predicate.test(elementToTest.enyoNode().getContent()),
-        equalTo(true));
-  }
-
-  protected void assertShipmentLineExists(final String ticketId) {
-    String sqlQuery = "select il.m_inoutline_id from m_inoutline il " //
-        + "join m_inout m on m.m_inout_id = il.m_inout_id " //
-        + "join c_orderline ol on ol.c_orderline_id = il.c_orderline_id " //
-        + "join c_order o on o.c_order_id = ol.c_order_id " //
-        + "where o.documentno = '%s' " //
-        + "and m.docstatus = 'CO'";
-
-    new DatabaseHelperSelect() {
-
-      @Override
-      protected void yieldResultSet(ResultSet rs) throws SQLException {
-
-      }
-    }.execute(String.format(sqlQuery, ticketId), 1);
-  }
-
-  protected void updateInvoiceTerms(final String ticketId, final String invoiceTerm) {
-    String sqlQuery = "update c_order set invoicerule = '%s' where documentno = '%s'";
-    new DatabaseHelperInsertUpdateOrDelete().execute(String.format(sqlQuery, invoiceTerm, ticketId),
-        1);
-  }
-
-  protected void openReceipt(final String ticketId) {
-    tap(TestIdPack.BUTTON_MENU);
-    tap(TestIdPack.BUTTON_MENU_OPENRECEIPT);
-    write(TestIdPack.FIELD_OPEN_RECEIPT_FILTER_TXT, ticketId);
-    tap(TestIdPack.BUTTON_OPEN_RECEIPT_SEARCH);
-    OBUtils.pause(500);
-    tap(TestIdExtModules.DM_OPEN_RECEIPT_ROW1);
-  }
-
-  protected void setPriorityForLocator(int priority) {
-    String sqlQuery = "update m_locator set priorityno = %d where m_locator_id = '%s'";
-    new DatabaseHelperInsertUpdateOrDelete()
-        .execute(String.format(sqlQuery, priority, YOSEMITE_STORE_0_0_1_LOCATOR_ID), 1);
-    reload();
-  }
-
-  protected void assertLocatorInShipmentLine(final String ticketId) {
-    String sqlQuery = "select iol.m_locator_id from m_inoutline iol " //
-        + "join c_orderline ol on ol.c_orderline_id = iol.c_orderline_id " //
-        + "join c_order o on o.c_order_id = ol.c_order_id " //
-        + "where o.documentno = '%s' order by iol.movementqty asc";
-
-    new DatabaseHelperSelect() {
-
-      @Override
-      protected void yieldResultSet(ResultSet rs) throws SQLException {
-        if (rs.isFirst()) {
-          assertThat("Locator should be [Yosemite Store 0-0-1]",
-              rs.getString(1).equals(YOSEMITE_STORE_0_0_1_LOCATOR_ID)
-                  || rs.getString(1).equals(YOSEMITE_STORE_0_0_0_LOCATOR_ID),
-              equalTo(true));
-        } else {
-          assertThat("Locator should be [Yosemite Store 0-0-0]",
-              rs.getString(1).equals(YOSEMITE_STORE_0_0_0_LOCATOR_ID), equalTo(true));
-        }
-      }
-    }.execute(String.format(sqlQuery, ticketId), 2, RecordsCount.GREATER_OR_EQUAL_THAN_EXPECTED);
-  }
-
-  protected void addProductWithService(final String productName, final TestIdConstructor lineNo,
-      final TestIdConstructor quantity, final String deliveryCondition) {
-    addProduct(productName);
-    waitUntilIsVisible(TestIdExtModules.BUTTON_SEARCHPRODUCT_FIRSTROW, true);
-    tap(TestIdExtModules.BUTTON_SEARCHPRODUCT_FIRSTROW);
-    tap(TestIdPack.BUTTON_EDIT);
-    tap(TestIdPack.BUTTON_SCAN);
-    tap(quantity);
-    tap(TestIdPack.BUTTON_KEYPAD_QUANTITY);
-    tap(TestIdExtModules.BUTTON_DELIVERY_MODES);
-    TestIdExtModules.DELIVERY_MODES_COMBO.enyoNode()
-        .executeExtension(".setSelected(" + deliveryCondition + ")");
-    tap(TestIdExtModules.BUTTON_APPLY_DELIVERY_MODES);
-  }
-
-  protected void assertServicesInShipmentLines(final String ticketId, int linesCount,
-      int movementQtyInIoLine) {
-    // @formatter:off
-    String sqlQuery = 
-        "select iol.movementqty " +
-        "from m_inoutline iol " +
-        "join m_inout io on io.m_inout_id = iol.m_inout_id " + 
-        "join c_order o on o.c_order_id = io.c_order_id " + 
-        "join m_product p on p.m_product_id = iol.m_product_id "+
-        "where o.documentno = '%s' and p.producttype = 'S' " +
-        "and io.created = (select max(iio.created) from m_inout iio join c_order oo on oo.c_order_id = iio.c_order_id where oo.documentNo = '%s' )";
-    // @formatter:on
-
-    new DatabaseHelperSelect() {
-
-      @Override
-      protected void yieldResultSet(ResultSet rs) throws SQLException {
-        assertThat("", rs.getInt(1) == movementQtyInIoLine, equalTo(true));
-      }
-    }.execute(String.format(sqlQuery, ticketId, ticketId), linesCount);
-  }
-
-  protected void updateQuantityRuleInService(final String quantityRule) {
-    // @formatter:off
-    String sqlQuery = 
-        "update m_product set quantity_rule = '%s' where m_product_id = '%s'" ;
-    // @formatter:on
-
-    new DatabaseHelperInsertUpdateOrDelete()
-        .execute(String.format(sqlQuery, quantityRule, PRODUCT_CONFIGURATION_ID), 1);
-  }
-
-  protected void assertsInvoiceLineExists(final String ticketId, int quantity, int rowCount,
-      boolean sameInvoice) {
-    final String sqlQuery = "select il.qtyinvoiced, il.c_invoice_id from c_invoiceline il " //
-        + "join c_invoice i on i.c_invoice_id = il.c_invoice_id " //
-        + "join c_orderline ol on ol.c_orderline_id = il.c_orderline_id " //
-        + "join c_order o on o.c_order_id = ol.c_order_id " //
-        + "where o.documentno = '%s' " //
-        + "and i.docstatus = 'CO' " + "order by il.created desc";
-
-    new DatabaseHelperSelect() {
-
-      Set<String> invoices = new HashSet<>();
-
-      @Override
-      protected void yieldResultSet(ResultSet rs) throws SQLException {
-        invoices.add(rs.getString(2));
-        if (rs.isFirst()) {
-          assertThat("Invoice line quantity should be " + quantity, rs.getInt(1) == quantity,
-              equalTo(true));
-        }
-        if (rs.isLast()) {
-          if (sameInvoice) {
-            assertThat("Invoice lines belongs to same invoice", invoices.size() == 1,
-                equalTo(true));
-          } else {
-            assertThat("Invoice lines belongs to different invoices", invoices.size() == 2,
-                equalTo(true));
-          }
-        }
-      }
-    }.execute(String.format(sqlQuery, ticketId), rowCount);
-  }
-
-  protected void addProductWithServiceToTicketConsideringGrouping(final String product,
-      int quantity, final List<TestIdConstructor> rows) {
-    for (int i = 0; i < quantity; i++) {
-      addProduct(product);
-      waitUntilIsVisible(TestIdExtModules.BUTTON_SEARCHPRODUCT_FIRSTROW, true);
-      tap(TestIdExtModules.BUTTON_SEARCHPRODUCT_FIRSTROW);
-      tap(TestIdPack.BUTTON_EDIT);
-    }
-    for (TestIdConstructor row : rows) {
-      tap(row);
-      tap(TestIdExtModules.BUTTON_DELIVERY_MODES);
-      TestIdExtModules.DELIVERY_MODES_COMBO.enyoNode()
-          .executeExtension(".setSelected(" + PICK_IN_STORE_DELIVERY_MODE + ")");
-      tap(TestIdExtModules.BUTTON_APPLY_DELIVERY_MODES);
-    }
-  }
-
-  protected void groupProduct(final String product) {
-    new DatabaseHelperInsertUpdateOrDelete().execute(String.format(groupProductQuery, "Y", product),
-        1);
-  }
-
-  protected void unGroupProduct(final String product) {
-    new DatabaseHelperInsertUpdateOrDelete().execute(String.format(groupProductQuery, "N", product),
-        1);
-  }
-
-  protected void assertAllOrderedQuantitiesWereDeliveredInLines(final String ticketId) {
-    // @formatter:off
-    final String sql = "select 1 "
-        + "from c_orderline ol inner join c_order o on ol.c_order_id = o.c_order_id "
-        + "where o.documentno = '%s' " + "and ol.qtyordered <> ol.qtydelivered";
-    // @formatter:on
-
-    new DatabaseHelperSelect() {
-
-      @Override
-      protected void yieldResultSet(ResultSet rs) throws SQLException {
-        // TODO Auto-generated method stub
-
-      }
-    }.execute(String.format(sql, ticketId), 0);
-  }
-}