# HG changeset patch
# User Ranjith S R <ranjith@qualiantech.com>
# Date 1491211023 -19800
#      Mon Apr 03 14:47:03 2017 +0530
# Node ID 0ba43779e4b0c4a91ff608ae4895fc95d9b5485e
# Parent  97a503d6234e5462bf1d2f81b6e086aaefb61a45
Verifies issue 35631 : Added automated test 'I35631_VerifyCashupKeyboard'

diff -r 97a503d6234e -r 0ba43779e4b0 src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java
--- a/src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java	Thu Mar 30 22:16:40 2017 +0530
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java	Mon Apr 03 14:47:03 2017 +0530
@@ -2047,6 +2047,8 @@
       "paymentsList_row3_buttonEdit", EnyoKind.BUTTON); //
   public static TestIdConstructor LABEL_CASHUP_CASHUSACOUNTED = new TestIdConstructor(
       "paymentsList_row3_foreignCounted"); //
+  public static TestIdConstructor LABEL_CASHUP_CASHUSA_COUNTED = new TestIdConstructor(
+      "paymentsList_row3_counted"); //
   public static TestIdConstructor LABEL_CASHUP_VOUCHERNAME = new TestIdConstructor(
       "paymentsList_row4_name"); //
   public static TestIdConstructor LABEL_CASHUP_VOUCHEREXPECTED = new TestIdConstructor(
diff -r 97a503d6234e -r 0ba43779e4b0 src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I35631_VerifyCashupKeyboard.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/cashup/I35631_VerifyCashupKeyboard.java	Mon Apr 03 14:47:03 2017 +0530
@@ -0,0 +1,65 @@
+/*
+ *************************************************************************
+ * 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) 2017 Openbravo S.L.U.
+ * All Rights Reserved.
+ * Contributor(s):
+ ************************************************************************
+ *
+ * @author RAN
+ *
+ */
+
+package org.openbravo.test.mobile.retail.pack.selenium.tests.cashup;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+
+public class I35631_VerifyCashupKeyboard extends WebPOSTerminalHelper {
+
+  @Test
+  public void test() {
+    // Check Other Max Amount in Cashup
+    tap(TestIdPack.BUTTON_MENU);
+    tap(TestIdPack.BUTTON_MENU_CASHUP);
+
+    // step 1 Count Cash
+    tap(TestIdPack.BUTTON_CASHUP_NEXT);
+
+    // step 2 Check Counted
+    // Check Negative Amount Counted for Non-cash Payment methods
+    tap(TestIdPack.BUTTON_KEYPAD_MINUS);
+    tap(TestIdPack.BUTTON_KEYPAD_1);
+    tap(TestIdPack.BUTTON_KEYPAD_0);
+    tap(TestIdPack.BUTTON_PAYMENT_CARD);
+    verify(TestIdPack.LABEL_CASHUP_CARDCOUNTED, "-10.00");
+
+    // Check Negative Amount Counted for cash Payment methods
+    tap(TestIdPack.BUTTON_KEYPAD_MINUS);
+    tap(TestIdPack.BUTTON_KEYPAD_1);
+    tap(TestIdPack.BUTTON_KEYPAD_0);
+    tap(TestIdPack.BUTTON_PAYMENT_USACASH);
+    isVisible(TestIdPack.ERROR_POPUP, true);
+    verify(TestIdPack.LABEL_CASHUP_CASHUSA_COUNTED, "");
+
+    // Check Negative Amount Counted for cash Payment methods
+    tap(TestIdPack.BUTTON_KEYPAD_1);
+    tap(TestIdPack.BUTTON_KEYPAD_0);
+    tap(TestIdPack.BUTTON_PAYMENT_USACASH);
+    verify(TestIdPack.LABEL_CASHUP_CASHUSA_COUNTED, "7.61");
+
+    // Cancel Cashup
+    tap(TestIdPack.BUTTON_CASHMANAGEMENT_CANCEL);
+  }
+}
\ No newline at end of file
