| 1 | import * as Numpad from "@point_of_sale/../tests/generic_helpers/numpad_util"; |
| 2 | import { registry } from "@web/core/registry"; |
| 3 | import * as Dialog from "@point_of_sale/../tests/generic_helpers/dialog_util"; |
| 4 | import * as Order from "@point_of_sale/../tests/generic_helpers/order_widget_util"; |
| 5 | import { inLeftSide, waitForLoading } from "@point_of_sale/../tests/pos/tours/utils/common"; |
| 6 | import * as ProductScreen from "@point_of_sale/../tests/pos/tours/utils/product_screen_util"; |
| 7 | import * as PaymentScreen from "@point_of_sale/../tests/pos/tours/utils/payment_screen_util"; |
| 8 | import * as Chrome from "@point_of_sale/../tests/pos/tours/utils/chrome_util"; |
| 9 | |
| 10 | registry.category("web_tour.tours").add("pos_basic_order_02_decimal_order_quantity", { |
| 11 | steps: () => |
| 12 | [ |
| 13 | waitForLoading(), |
| 14 | Chrome.startPoS(), |
| 15 | Dialog.confirm("Open Register"), |
| 16 | ProductScreen.clickDisplayedProduct("Desk Organizer", true, "1"), |
| 17 | inLeftSide([ |
| 18 | { ...ProductScreen.clickLine("Desk Organizer")[0], isActive: ["mobile"] }, |
| 19 | Numpad.click("."), |
| 20 | ...ProductScreen.selectedOrderlineHasDirect("Desk Organizer", "0"), |
| 21 | Numpad.click("9"), |
| 22 | ...ProductScreen.selectedOrderlineHasDirect("Desk Organizer", "0.9"), |
| 23 | Numpad.click("9"), |
| 24 | ...ProductScreen.selectedOrderlineHasDirect("Desk Organizer", "0.99"), |
| 25 | ]), |
| 26 | ProductScreen.clickPayButton(), |
| 27 | PaymentScreen.clickPaymentMethod("Cash", true, { amount: "5.05" }), |
| 28 | ProductScreen.finishOrder(), |
| 29 | ].flat(), |
| 30 | }); |
| 31 | |
| 32 | registry.category("web_tour.tours").add("pos_basic_order_03_tax_position", { |
| 33 | steps: () => |
| 34 | [ |
| 35 | waitForLoading(), |
| 36 | Chrome.startPoS(), |
| 37 | Dialog.confirm("Open Register"), |
| 38 | ProductScreen.clickDisplayedProduct("Letter Tray", true, "1"), |
| 39 | inLeftSide(...Order.hasTotal("5.28")), |
| 40 | ProductScreen.clickFiscalPosition("FP-POS-2M", true), |
| 41 | inLeftSide(...Order.hasTotal("5.52")), |
| 42 | ProductScreen.closePos(), |
| 43 | ].flat(), |
| 44 | }); |