Related to issue 38888: Failing SS Build
authorMartin Taal <martin.taal@openbravo.com>
Sun, 18 Nov 2018 08:49:39 +0100
changeset 7883 96bf746102fd
parent 7882 ee9f46ef58c2
child 7884 f7f9bc5f40b9
Related to issue 38888: Failing SS Build
Do not wait for msg send to the server for the query, extra check when going offline
src-test/org/openbravo/test/mobile/core/utils/AllowedErrorsHelper.java
src-test/org/openbravo/test/mobile/retail/multiserver/MultiserverOfflineUtils.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSCentralOfflineTerminalHelper.java
--- a/src-test/org/openbravo/test/mobile/core/utils/AllowedErrorsHelper.java	Sun Nov 18 00:24:21 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/core/utils/AllowedErrorsHelper.java	Sun Nov 18 08:49:39 2018 +0100
@@ -634,6 +634,7 @@
     testsAllowedToHaveLogclientErrors.add("OfflineMSCentral001_SalesFlow");
     testsAllowedToHaveLogclientErrors.add("OfflineMSCentral002_SaleWithTwentyLines");
     testsAllowedToHaveLogclientErrors.add("OfflineMSCentral003_CreateMultiorder");
+    testsAllowedToHaveLogclientErrors.add("OfflineMSCentral004_Cashup");
     testsAllowedToHaveLogclientErrors.add("OfflineMSCentral005_Cashmanagement");
     testsAllowedToHaveLogclientErrors.add("OfflineMSCentral006_LAWa010_CreateLayaway");
     testsAllowedToHaveLogclientErrors.add("OfflineMSCentral007_I31323_LayawayPayOpenTicket");
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/MultiserverOfflineUtils.java	Sun Nov 18 00:24:21 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/MultiserverOfflineUtils.java	Sun Nov 18 08:49:39 2018 +0100
@@ -98,7 +98,7 @@
           protected void yieldResultSet(final ResultSet rs) throws SQLException {
             statusVar.set(0, rs.getString(1));
           }
-        }.execute(sql, 1, ServerType.STORE1);
+        }.execute(sql, 1, false, ServerType.STORE1);
         return status.equals(statusVar.get(0));
       }
 
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSCentralOfflineTerminalHelper.java	Sun Nov 18 00:24:21 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSCentralOfflineTerminalHelper.java	Sun Nov 18 08:49:39 2018 +0100
@@ -80,6 +80,12 @@
     // create a layaway to force offline
     tap(TestIdPack.BUTTON_SEARCH);
     write(TestIdPack.FIELD_SEARCH_TEXT, TestIdPack.BUTTON_SEARCHPRODUCT_ALPINESKIING.getRowName());
+    // extra popup sometimes occurs at this time
+    OBUtils.pause(5000);
+    if (isScrimShowing()) {
+      handleOffline();
+      return;
+    }
     tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
     tap(TestIdPack.BUTTON_SEARCHPRODUCT_ALPINESKIING);
     tap(TestIdPack.BUTTON_MENU);