# HG changeset patch
# User Ranjith S R <ranjith@qualiantech.com>
# Date 1488259964 -19800
#      Tue Feb 28 11:02:44 2017 +0530
# Node ID 09e5a58c23bb9075015e39b6d1044fccb627e3b7
# Parent  8cf999d8f8ef1e4daa0f312983db56a683171bbf
Verifies issue 35220 : Added automated test 'I35220_VerifiesProductDetailsWindow'

diff -r 8cf999d8f8ef -r 09e5a58c23bb src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java
--- a/src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java	Tue Feb 28 11:02:44 2017 +0530
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/TestIdPack.java	Tue Feb 28 11:02:44 2017 +0530
@@ -571,6 +571,8 @@
   // search
   public static TestIdConstructor BUTTON_RECEIPT_INVOICE = new TestIdConstructor(
       "orderview_divbtninvoice"); //
+  public static TestIdConstructor SUBWINDOW_PRODUCTDETAILS = new TestIdConstructor(
+      "leftPanel_productdetailsview"); //
   public static TestIdConstructor LABEL_HEADER_STOCK = new TestIdConstructor("header_productName"); //
   public static TestIdConstructor BUTTON_STOCK_ADDTORECEIPT = new TestIdConstructor(
       "body_productAddToReceipt", EnyoKind.BUTTON); //
diff -r 8cf999d8f8ef -r 09e5a58c23bb src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I35220_VerifiesProductDetailsWindow.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I35220_VerifiesProductDetailsWindow.java	Tue Feb 28 11:02:44 2017 +0530
@@ -0,0 +1,55 @@
+/*
+ *************************************************************************
+ * 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.system;
+
+import org.junit.Test;
+import org.openbravo.test.mobile.retail.mobilecore.annotations.TestClassAnnotations;
+import org.openbravo.test.mobile.retail.pack.selenium.TestIdPack;
+import org.openbravo.test.mobile.retail.pack.selenium.terminals.WebPOSTerminalHelper;
+
+@TestClassAnnotations(isHighVolumeCompatible = true)
+public class I35220_VerifiesProductDetailsWindow extends WebPOSTerminalHelper {
+
+  @Test
+  public void test() {
+    tap(TestIdPack.BUTTON_SEARCH);
+    write(TestIdPack.FIELD_SEARCH_TEXT,
+        TestIdPack.BUTTON_SEARCHPRODUCT_AVALANCHETRANSCEIVER.getRowName());
+    tap(TestIdPack.BUTTON_SEARCH_EXECUTE);
+    tap(TestIdPack.BUTTON_SEARCHPRODUCT_AVALANCHETRANSCEIVER);
+    verify(TestIdPack.LABEL_TOTALTOPAY, "150.50");
+    tap(TestIdPack.BUTTON_RECEIPT_ROW1);
+    tap(TestIdPack.BUTTON_EDIT_CHECKSTOCK);
+
+    // Verify Product details is visible
+    isVisible(TestIdPack.SUBWINDOW_PRODUCTDETAILS, true);
+
+    tap(TestIdPack.BUTTON_DELETERECEIPT);
+    tap(TestIdPack.BUTTON_DELETERECEIPT_CONFIRM);
+
+    // Verify Product details is not visible
+    isVisible(TestIdPack.SUBWINDOW_PRODUCTDETAILS, false);
+
+    verify(TestIdPack.LABEL_TOTALTOPAY, "0.00");
+  }
+}
\ No newline at end of file
