Related to issue 38888: Failing SS Build
authorMartin Taal <martin.taal@openbravo.com>
Sat, 01 Dec 2018 19:48:38 +0100
changeset 7931 54339aff8196
parent 7930 fe9e033f09f5
child 7932 0c08fffc7828
Related to issue 38888: Failing SS Build
Try again to use the correct servertype, do not wait for serviceworker to load sources
src-test/org/openbravo/test/mobile/retail/mobilecore/database/MobileCoreDatabaseHelper.java
src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSLAYVBSStore1TerminalHelper.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore1TerminalHelper.java
src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore2TerminalHelper.java
--- a/src-test/org/openbravo/test/mobile/retail/mobilecore/database/MobileCoreDatabaseHelper.java	Sat Dec 01 18:27:51 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/mobilecore/database/MobileCoreDatabaseHelper.java	Sat Dec 01 19:48:38 2018 +0100
@@ -30,6 +30,7 @@
 
 import org.openbravo.test.mobile.core.utils.AllowedErrorsHelper;
 import org.openbravo.test.mobile.core.utils.TestLogger;
+import org.openbravo.test.mobile.retail.mobilecore.javascript.MobileCoreAPI;
 import org.openbravo.test.mobile.retail.pack.database.ServerType;
 
 public class MobileCoreDatabaseHelper {
@@ -72,6 +73,8 @@
       return;
     }
 
+    MobileCoreAPI.requestProcessImportEntries(server);
+
     TestLogger.getLogger().debug("Verifying that the import table records are processed");
     new DatabaseHelperSelect() {
       @Override
--- a/src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java	Sat Dec 01 18:27:51 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/mobilecore/selenium/terminals/MobileCoreTerminalHelper.java	Sat Dec 01 19:48:38 2018 +0100
@@ -124,7 +124,7 @@
 
   public MobileCoreTerminalHelper(final String path, final String terminal, final String username,
       final String password, final ServerType serverType) {
-    this(path, terminal, username, password, ServerType.SINGLESERVER, true, true);
+    this(path, terminal, username, password, serverType, true, true);
   }
 
   /**
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSLAYVBSStore1TerminalHelper.java	Sat Dec 01 18:27:51 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSLAYVBSStore1TerminalHelper.java	Sat Dec 01 19:48:38 2018 +0100
@@ -37,6 +37,11 @@
     super.before();
   }
 
+  // do not wait for sources in case of multi-server as url by which the browser is opened
+  // does not use localhost
+  protected void waitServiceWorkerToLoadSources() {
+  }
+
   public ServerType getServerType() {
     return ServerType.STORE1;
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore1TerminalHelper.java	Sat Dec 01 18:27:51 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore1TerminalHelper.java	Sat Dec 01 19:48:38 2018 +0100
@@ -73,6 +73,11 @@
     MultiserverUtils.waitForSynchronization(getServerType());
   }
 
+  // do not wait for sources in case of multi-server as url by which the browser is opened
+  // does not use localhost
+  protected void waitServiceWorkerToLoadSources() {
+  }
+
   public ServerType getServerType() {
     return ServerType.STORE1;
   }
--- a/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore2TerminalHelper.java	Sat Dec 01 18:27:51 2018 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/multiserver/selenium/terminals/WebPOSStore2TerminalHelper.java	Sat Dec 01 19:48:38 2018 +0100
@@ -73,6 +73,11 @@
     MultiserverUtils.waitForSynchronization(getServerType());
   }
 
+  // do not wait for sources in case of multi-server as url by which the browser is opened
+  // does not use localhost
+  protected void waitServiceWorkerToLoadSources() {
+  }
+
   public ServerType getServerType() {
     return ServerType.STORE2;
   }