| 1 |
import * as Chrome from "@point_of_sale/../tests/pos/tours/utils/chrome_util"; |
| 2 |
import * as Dialog from "@point_of_sale/../tests/generic_helpers/dialog_util"; |
| 3 |
import * as ProductScreen from "@point_of_sale/../tests/pos/tours/utils/product_screen_util"; |
| 4 |
import * as PaymentScreen from "@point_of_sale/../tests/pos/tours/utils/payment_screen_util"; |
| 5 |
import * as ReceiptScreen from "@point_of_sale/../tests/pos/tours/utils/receipt_screen_util"; |
| 6 |
import { GenericHooks } from "@point_of_sale/../tests/pos/tours/utils/generic_hooks"; |
| 7 |
import { registry } from "@web/core/registry"; |
| 8 |
|
| 9 |
|
| 10 |
registry.category("web_tour.tours").add("generic_localization_tour", { |
| 11 |
steps: () => |
| 12 |
[ |
| 13 |
Chrome.startPoS().map((step) => ({ ...step, timeout: 20000 })), |
| 14 |
Dialog.confirm("Open Register"), |
| 15 |
ProductScreen.clickPartnerButton(), |
| 16 |
ProductScreen.clickCustomer("AAAA Generic Partner"), |
| 17 |
ProductScreen.clickDisplayedProduct("Whiteboard Pen"), |
| 18 |
ProductScreen.clickDisplayedProduct("Wall Shelf Unit"), |
| 19 |
ProductScreen.clickPayButton(), |
| 20 |
PaymentScreen.clickPaymentMethod("Cash"), |
| 21 |
PaymentScreen.clickValidate(), |
| 22 |
GenericHooks.afterValidateHook(), |
| 23 |
{ |
| 24 |
timeout: 20000, |
| 25 |
content: "receipt screen is shown", |
| 26 |
trigger: ".pos .receipt-screen", |
| 27 |
}, |
| 28 |
ReceiptScreen.clickNextOrder(), |
| 29 |
ProductScreen.isShown(), |
| 30 |
Chrome.endTour(), |
| 31 |
].flat(), |
| 32 |
}); |