Related to issue 28933. Verifies issue 29055: Added 2 more tests
authorRafa Alonso <rafael.alonso@openbravo.com>
Mon, 09 Mar 2015 09:43:13 +0100
changeset 4073 f697f7e055ff
parent 4072 f8edbab445ad
child 4074 602ee2c51022
Related to issue 28933. Verifies issue 29055: Added 2 more tests
src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I29055_TerminalChange.java
src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I29055_TerminalChangeWithLogin.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I29055_TerminalChange.java	Mon Mar 09 09:43:13 2015 +0100
@@ -0,0 +1,54 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ *
+ * @author RAL
+ *
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.loginout;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.common.TestAnnotations;
+import org.openbravo.test.mobile.common.selenium.terminals.WebPOSTerminalHelper;
+import org.openbravo.test.mobile.common.selenium.utils.Utils;
+
+public class I29055_TerminalChange extends WebPOSTerminalHelper {
+
+  // terminals
+  private static final String VBS1001 = "VBS1001";
+  private static final String VBS1002 = "VBS1002";
+  private static final String VBS1003 = "VBS1003";
+
+  @Test
+  @TestAnnotations(from = "RR15Q2")
+  public void test() {
+    final String VBS1001Uri = Utils.getCurrentHref();
+    final String VBS1002Uri = VBS1001Uri.replace(VBS1001, VBS1002);
+    final String VBS1003Uri = VBS1001Uri.replace(VBS1001, VBS1003);
+
+    changeTerminal(VBS1002Uri);
+    changeTerminal(VBS1003Uri);
+    changeTerminal(VBS1001Uri);
+  }
+
+  @Override
+  protected void afterTest_Verifications() {
+
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I29055_TerminalChangeWithLogin.java	Mon Mar 09 09:43:13 2015 +0100
@@ -0,0 +1,57 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ *
+ * @author RAL
+ *
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.loginout;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.common.TestAnnotations;
+import org.openbravo.test.mobile.common.selenium.terminals.WebPOSTerminalHelper;
+import org.openbravo.test.mobile.common.selenium.utils.Utils;
+
+public class I29055_TerminalChangeWithLogin extends WebPOSTerminalHelper {
+
+  // terminals
+  private static final String VBS1001 = "VBS1001";
+  private static final String VBS1002 = "VBS1002";
+  private static final String VBS1003 = "VBS1003";
+
+  @Test
+  @TestAnnotations(from = "RR15Q2")
+  public void test() {
+    final String VBS1001Uri = Utils.getCurrentHref();
+    final String VBS1002Uri = VBS1001Uri.replace(VBS1001, VBS1002);
+    final String VBS1003Uri = VBS1001Uri.replace(VBS1001, VBS1003);
+
+    changeTerminal(VBS1002Uri);
+    logIn();
+    changeTerminal(VBS1003Uri);
+    logIn();
+    changeTerminal(VBS1001Uri);
+    logIn();
+  }
+
+  @Override
+  protected void afterTest_Verifications() {
+
+  }
+
+}