19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:29:53 +01:00
parent 6e54c1af6c
commit 3ca647e428
1087 changed files with 132065 additions and 108499 deletions

View file

@ -0,0 +1,53 @@
import * as ProductScreenPos from "@point_of_sale/../tests/pos/tours/utils/product_screen_util";
import * as ProductScreenResto from "@pos_restaurant/../tests/tours/utils/product_screen_util";
const ProductScreen = { ...ProductScreenPos, ...ProductScreenResto };
import * as Dialog from "@point_of_sale/../tests/generic_helpers/dialog_util";
import * as PaymentScreen from "@point_of_sale/../tests/pos/tours/utils/payment_screen_util";
import * as ReceiptScreen from "@point_of_sale/../tests/pos/tours/utils/receipt_screen_util";
import * as FloorScreen from "@pos_restaurant/../tests/tours/utils/floor_screen_util";
import * as TicketScreen from "@point_of_sale/../tests/pos/tours/utils/ticket_screen_util";
import * as Chrome from "@point_of_sale/../tests/pos/tours/utils/chrome_util";
import * as Order from "@point_of_sale/../tests/generic_helpers/order_widget_util";
import { registry } from "@web/core/registry";
import { inLeftSide } from "@point_of_sale/../tests/pos/tours/utils/common";
registry.category("web_tour.tours").add("RefundStayCurrentTableTour", {
steps: () =>
[
Chrome.startPoS(),
Dialog.confirm("Open Register"),
// Create first order and pay it
FloorScreen.clickTable("2"),
ProductScreen.clickDisplayedProduct("Coca-Cola", true, "1"),
ProductScreen.clickDisplayedProduct("Coca-Cola", true, "2"),
ProductScreen.clickDisplayedProduct("Water", true, "1"),
ProductScreen.totalAmountIs("6.60"),
ProductScreen.clickPayButton(false),
ProductScreen.discardOrderWarningDialog(),
PaymentScreen.clickPaymentMethod("Cash"),
PaymentScreen.clickValidate(),
ReceiptScreen.clickNextOrder(),
// Go to another table and refund one of the products
FloorScreen.clickTable("4"),
ProductScreen.orderIsEmpty(),
...ProductScreen.clickRefund(),
TicketScreen.selectOrder("001"),
Order.hasLine({
productName: "Coca-Cola",
}),
ProductScreen.clickNumpad("2"),
TicketScreen.toRefundTextContains("To Refund: 2"),
TicketScreen.confirmRefund(),
PaymentScreen.isShown(),
PaymentScreen.clickBack(),
ProductScreen.isShown(),
inLeftSide(ProductScreen.orderLineHas("Coca-Cola")),
ProductScreen.totalAmountIs("-4.40"),
ProductScreen.clickPayButton(),
PaymentScreen.clickPaymentMethod("Cash"),
PaymentScreen.clickValidate(),
ReceiptScreen.isShown(),
].flat(),
});