Verifies issue
38347: Cannot log in in the POS if a Product Characteristic is
deactivated. Full refresh is failing
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I38347_ProductChValueDeactivated.java Tue Apr 17 11:52:16 2018 -0400
@@ -0,0 +1,62 @@
+/*
+ *************************************************************************
+ * 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) 2018 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ *
+ * @author RAQ
+ *
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.receipts;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.mobilecore.database.DatabaseHelperInsertUpdateOrDelete;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+
+public class I38347_ProductChValueDeactivated extends WebPOSTerminalHelper {
+
+ private final String batteryLife = "2F65268BEAF846E2A9FF41BB78DA7D73";
+
+ @Test
+ public void test() {
+ verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+ tap(TestIdPack.BUTTON_SEARCH);
+ verify(TestIdPack.BUTTON_CHARACTERISTICS_ROW1, "Capacity");
+ updateChValue(false);
+ reload();
+ tap(TestIdPack.BUTTON_SEARCH);
+ verify(TestIdPack.BUTTON_CHARACTERISTICS_ROW1, "Battery Life");
+ tap(TestIdPack.BUTTON_SCAN);
+ }
+
+ @Override
+ public void beforeWithReload() {
+ updateChValue(true);
+ }
+
+ @Override
+ public void afterWithReload() {
+ updateChValue(false);
+ }
+
+ private void updateChValue(boolean isForTest) {
+ final String updateChValue = String.format("update m_characteristic set isactive = '%s' "
+ + "where m_characteristic_id = '%s'", isForTest ? "N" : "Y", batteryLife);
+ new DatabaseHelperInsertUpdateOrDelete().execute(updateChValue, 1);
+ }
+
+}
\ No newline at end of file