Related to issue 41719: Trying to stabilize OrderPreparation tests in HighVolume
authorAlejandro <alekosmp86@gmail.com>
Tue, 03 Sep 2019 08:47:03 -0400
changeset 8965 4d6a6ebc3417
parent 8964 94d2a66e4373
child 8966 db03c7859176
Related to issue 41719: Trying to stabilize OrderPreparation tests in HighVolume
mode
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/orderpreparationawo/OP_Test18_PickingsFromDiferentWarehouses.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/orderpreparationawo/OP_Test19_PickingsWithProductWithServiceRelatedUniqueQuantity.java
src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/orderpreparationawo/OP_Test20_PickingsWithProductWithServiceRelatedPerProduct.java
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/orderpreparationawo/OP_Test18_PickingsFromDiferentWarehouses.java	Mon Sep 02 15:13:22 2019 -0400
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/orderpreparationawo/OP_Test18_PickingsFromDiferentWarehouses.java	Tue Sep 03 08:47:03 2019 -0400
@@ -23,7 +23,7 @@
 package org.openbravo.test.mobile.retail.extmodules.selenium.tests.orderpreparationawo;
 
 import org.junit.Test;
-import org.openbravo.test.mobile.core.junit.TestAnnotations;
+import org.openbravo.test.mobile.core.junit.SequentialTestInfo;
 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;
@@ -60,7 +60,6 @@
    * </ul>
    */
   @Test
-  @TestAnnotations(waitFixOf = 41719)
   public void test() {
     String ticketId = BackboneHelper.getDocumentNo();
     TestIdConstructor rowControl8 = TestIdExtModules.LINE_ROW_CONTROL_8;
@@ -68,6 +67,11 @@
 
     addSolarChargerProductToTicket(TestIdPack.BUTTON_KEYPAD_4);
     payTicketInCash();
+
+    if (SequentialTestInfo.getHighVolumenMode()) {
+      tap(new TestIdConstructor("confirmationPopup_btnCancel"));
+    }
+
     openOrderPreparationPopup();
     filterOrderLinesByDocumentNo(ticketId);
 
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/orderpreparationawo/OP_Test19_PickingsWithProductWithServiceRelatedUniqueQuantity.java	Mon Sep 02 15:13:22 2019 -0400
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/orderpreparationawo/OP_Test19_PickingsWithProductWithServiceRelatedUniqueQuantity.java	Tue Sep 03 08:47:03 2019 -0400
@@ -23,14 +23,12 @@
 package org.openbravo.test.mobile.retail.extmodules.selenium.tests.orderpreparationawo;
 
 import org.junit.Test;
-import org.openbravo.test.mobile.core.junit.TestAnnotations;
-import org.openbravo.test.mobile.core.selenium.SeleniumHelper;
-import org.openbravo.test.mobile.core.utils.OBUtils;
+import org.openbravo.test.mobile.core.junit.SequentialTestInfo;
 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.mobilecore.selenium.TestIdConstructor;
 import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-import org.openqa.selenium.Keys;
 
 @TestClassAnnotations(isHighVolumeCompatible = true)
 public class OP_Test19_PickingsWithProductWithServiceRelatedUniqueQuantity
@@ -67,7 +65,6 @@
    * </ul>
    */
   @Test
-  @TestAnnotations(waitFixOf = 41719)
   public void test() {
     String ticketId = BackboneHelper.getDocumentNo();
 
@@ -75,22 +72,31 @@
         PICK_IN_STORE_DELIVERY_MODE);
     payTicketInCash();
 
-    openReceipt(ticketId);
-    OBUtils.pause(500);
-    SeleniumHelper.pressKey(Keys.F7);
+    if (SequentialTestInfo.getHighVolumenMode()) {
+      tap(new TestIdConstructor("confirmationPopup_btnPrepare"));
+    } else {
+      openOrderPreparationPopup();
+      write(TestIdExtModules.ORDER_PREPARATION_POPUP_FILTER, ticketId);
+      tap(TestIdExtModules.ORDER_PREPARATION_POPUP_SEARCH);
+    }
+    isVisible(TestIdExtModules.ORDER_PREPARATION_ORDER_LIST_ROW1, true);
 
     setQuantityToPrepare(2);
     prepareSelectedLines();
     final String firstPickingList = getDocumentNoOfLastCreatedPickingList();
 
+    openReceipt(ticketId);
     tap(TestIdExtModules.LINE_ROW_CONTROL_6);
     assignPicking(firstPickingList);
     confirmAll(firstPickingList);
     generateIssue(ticketId, 1);
 
     assertServicesInShipmentLines(ticketId, 1, 1);
-    OBUtils.pause(500);
-    SeleniumHelper.pressKey(Keys.F7);
+
+    openOrderPreparationPopup();
+    write(TestIdExtModules.ORDER_PREPARATION_POPUP_FILTER, ticketId);
+    tap(TestIdExtModules.ORDER_PREPARATION_POPUP_SEARCH);
+    isVisible(TestIdExtModules.ORDER_PREPARATION_ORDER_LIST_ROW1, true);
 
     setQuantityToPrepare(3);
     prepareSelectedLines();
--- a/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/orderpreparationawo/OP_Test20_PickingsWithProductWithServiceRelatedPerProduct.java	Mon Sep 02 15:13:22 2019 -0400
+++ b/src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/orderpreparationawo/OP_Test20_PickingsWithProductWithServiceRelatedPerProduct.java	Tue Sep 03 08:47:03 2019 -0400
@@ -23,14 +23,12 @@
 package org.openbravo.test.mobile.retail.extmodules.selenium.tests.orderpreparationawo;
 
 import org.junit.Test;
-import org.openbravo.test.mobile.core.junit.TestAnnotations;
-import org.openbravo.test.mobile.core.selenium.SeleniumHelper;
-import org.openbravo.test.mobile.core.utils.OBUtils;
+import org.openbravo.test.mobile.core.junit.SequentialTestInfo;
 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.mobilecore.selenium.TestIdConstructor;
 import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
-import org.openqa.selenium.Keys;
 
 @TestClassAnnotations(isHighVolumeCompatible = true)
 public class OP_Test20_PickingsWithProductWithServiceRelatedPerProduct
@@ -71,7 +69,6 @@
    * </ul>
    */
   @Test
-  @TestAnnotations(waitFixOf = 41719)
   public void test() {
 
     updateQuantityRuleInService(PER_PRODUCT_QUANTITY_RULE);
@@ -82,22 +79,31 @@
         PICK_IN_STORE_DELIVERY_MODE);
     payTicketInCash();
 
-    openReceipt(ticketId);
-    OBUtils.pause(500);
-    SeleniumHelper.pressKey(Keys.F7);
+    if (SequentialTestInfo.getHighVolumenMode()) {
+      tap(new TestIdConstructor("confirmationPopup_btnPrepare"));
+    } else {
+      openOrderPreparationPopup();
+      write(TestIdExtModules.ORDER_PREPARATION_POPUP_FILTER, ticketId);
+      tap(TestIdExtModules.ORDER_PREPARATION_POPUP_SEARCH);
+    }
+    isVisible(TestIdExtModules.ORDER_PREPARATION_ORDER_LIST_ROW1, true);
 
     setQuantityToPrepare(2);
     prepareSelectedLines();
     final String firstPickingList = getDocumentNoOfLastCreatedPickingList();
 
+    openReceipt(ticketId);
     tap(TestIdExtModules.LINE_ROW_CONTROL_6);
     assignPicking(firstPickingList);
     confirmAll(firstPickingList);
     generateIssue(ticketId, 1);
 
     assertServicesInShipmentLines(ticketId, 1, 2);
-    OBUtils.pause(500);
-    SeleniumHelper.pressKey(Keys.F7);
+
+    openOrderPreparationPopup();
+    write(TestIdExtModules.ORDER_PREPARATION_POPUP_FILTER, ticketId);
+    tap(TestIdExtModules.ORDER_PREPARATION_POPUP_SEARCH);
+    isVisible(TestIdExtModules.ORDER_PREPARATION_ORDER_LIST_ROW1, true);
 
     setQuantityToPrepare(3);
     prepareSelectedLines();