| 1 |
import * as Chrome from "@point_of_sale/../tests/pos/tours/utils/chrome_util"; |
| 2 |
import * as ProductScreen from "@point_of_sale/../tests/pos/tours/utils/product_screen_util"; |
| 3 |
import * as PaymentScreen from "@point_of_sale/../tests/pos/tours/utils/payment_screen_util"; |
| 4 |
import * as TicketScreen from "@point_of_sale/../tests/pos/tours/utils/ticket_screen_util"; |
| 5 |
import * as ReceiptScreen from "@point_of_sale/../tests/pos/tours/utils/receipt_screen_util"; |
| 6 |
import * as Dialog from "@point_of_sale/../tests/generic_helpers/dialog_util"; |
| 7 |
import { registry } from "@web/core/registry"; |
| 8 |
|
| 9 |
registry.category("web_tour.tours").add("PosRazorpayTour", { |
| 10 |
steps: () => |
| 11 |
[ |
| 12 |
Chrome.startPoS(), |
| 13 |
Dialog.confirm("Open Register"), |
| 14 |
ProductScreen.addOrderline("Desk Pad"), |
| 15 |
ProductScreen.clickPayButton(), |
| 16 |
PaymentScreen.clickPaymentMethod("Razorpay"), |
| 17 |
ReceiptScreen.isShown(), |
| 18 |
].flat(), |
| 19 |
}); |
| 20 |
|
| 21 |
registry.category("web_tour.tours").add("PosRazorpayCancelTour", { |
| 22 |
steps: () => |
| 23 |
[ |
| 24 |
Chrome.startPoS(), |
| 25 |
Dialog.confirm("Open Register"), |
| 26 |
ProductScreen.addOrderline("Desk Pad"), |
| 27 |
ProductScreen.clickPayButton(), |
| 28 |
PaymentScreen.clickPaymentMethod("RazorPay"), |
| 29 |
PaymentScreen.clickCancelButton(), |
| 30 |
Dialog.is({ title: "Razorpay Error" }), |
| 31 |
Dialog.bodyIs("Razorpay POS transaction canceled successfully"), |
| 32 |
Dialog.confirm(), |
| 33 |
PaymentScreen.isShown(), |
| 34 |
PaymentScreen.clickRetryButton(), |
| 35 |
ReceiptScreen.isShown(), |
| 36 |
].flat(), |
| 37 |
}); |
| 38 |
|
| 39 |
registry.category("web_tour.tours").add("PosRazorpayRefundTour", { |
| 40 |
steps: () => |
| 41 |
[ |
| 42 |
Chrome.startPoS(), |
| 43 |
Dialog.confirm("Open Register"), |
| 44 |
ProductScreen.addOrderline("Desk Pad"), |
| 45 |
ProductScreen.clickPayButton(), |
| 46 |
PaymentScreen.clickPaymentMethod("Razorpay"), |
| 47 |
ReceiptScreen.isShown(), |
| 48 |
ReceiptScreen.clickNextOrder(), |
| 49 |
ProductScreen.clickRefund(), |
| 50 |
TicketScreen.selectOrder("001"), |
| 51 |
TicketScreen.confirmRefund(), |
| 52 |
PaymentScreen.clickPaymentMethod("Razorpay"), |
| 53 |
PaymentScreen.clickRefundButton(), |
| 54 |
ReceiptScreen.isShown(), |
| 55 |
].flat(), |
| 56 |
}); |