Related to issue 38888: Failing SS Build, read cashup id in later stage
authorMartin Taal <martin.taal@openbravo.com>
Tue, 05 Feb 2019 13:49:42 +0100
changeset 8189 fdee9e18b235
parent 8188 9fe9395e57ec
child 8190 cbb360f811c9
Related to issue 38888: Failing SS Build, read cashup id in later stage
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS009_SaleAndCashupVerifyingDatabaseI.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS010_SaleAndCashupVerifyingDatabaseII.java
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS009_SaleAndCashupVerifyingDatabaseI.java	Tue Feb 05 16:16:38 2019 +0530
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS009_SaleAndCashupVerifyingDatabaseI.java	Tue Feb 05 13:49:42 2019 +0100
@@ -58,7 +58,6 @@
 
     final String organizationId = BackboneHelper.getTerminalValue("organization");
     final String clientId = BackboneHelper.getTerminalValue("client");
-    final String cashupId = BackboneHelper.getTerminalValue("cashUpId");
     final String businessPartnerId = BackboneHelper.getTerminalValue("businessPartner");
 
     // sale
@@ -71,6 +70,9 @@
     final String documentNo1 = BackboneHelper.getDocumentNo();
     tap(TestIdPack.BUTTON_PAY);
     tap(TestIdPack.BUTTON_PAY_EXACT);
+
+    final String cashupId = BackboneHelper.getTerminalValue("cashUpId");
+
     tap(TestIdPack.BUTTON_PAY_DONE);
     verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
 
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS010_SaleAndCashupVerifyingDatabaseII.java	Tue Feb 05 16:16:38 2019 +0530
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/tests/store1/MS010_SaleAndCashupVerifyingDatabaseII.java	Tue Feb 05 13:49:42 2019 +0100
@@ -59,12 +59,11 @@
     WebPOSAPI.cleanCashup(this);
     final String organizationId = BackboneHelper.getTerminalValue("organization");
     final String clientId = BackboneHelper.getTerminalValue("client");
-    final String cashupId = BackboneHelper.getTerminalValue("cashUpId");
     final String businessPartnerId = BackboneHelper.getTerminalValue("businessPartner");
     createTicket1();
     WebPOSDatabaseHelper.verifyOrder(documentNo1, cashupId, GROSS);
 
-    cashupVBS1001();
+    final String cashupId = cashupVBS1001();
 
     // database verifications
     MultiserverUtils.waitForSynchronization(getServerType());
@@ -109,7 +108,7 @@
     verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
   }
 
-  private void cashupVBS1001() {
+  private String cashupVBS1001() {
     tap(TestIdPack.BUTTON_MENU);
     tap(TestIdPack.BUTTON_MENU_CASHUP);
 
@@ -219,10 +218,13 @@
 
     tap(TestIdPack.BUTTON_CASHUP_POSTPRINTANDCLOSE);
 
+    final String cashupId = BackboneHelper.getTerminalValue("cashUpId");
+
     // done
     verify(TestIdPack.LABEL_POPUP_TITLE, "Good job!");
     tap(TestIdPack.BUTTON_POPUP_OK);
     verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+    return cashupId;
   }
 
   private void verifyFinFinaccTransaction(final String organizationId, final String clientId,