Files
odoo_source/addons/pos_restaurant/static/tests/tours/ControlButtons.tour.js
T
Samuel Degueldre 990b10aece [REF] point_of_sale, *: convert legacy modules to ES odoo modules
*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos,
l10n_sa_pos, pos_adyen, pos_discount, pos_epson_printer,
pos_epson_printer_restaurant, pos_hr, pos_loyalty, pos_mercury,
pos_restaurant, pos_restaurant_adyen, pos_restaurant_stripe, pos_sale,
pos_sale_product_configurator, pos_six, pos_stripe

We are about to refactor most of the Javasript code base of the point of
sale and related modules. In doing so, we will move a lot of files and
modernize the entire code-base. In order to avoid diffcult rebases,
their conversion to odoo-modules is done as a first step to avoid
getting lots of conflicts on files that were unindented, which marks the
entire file as being in conflict. Conflicts will occur during forward
ports but they will be easier to manage as the changes will be much
smaller in scope, and the author will have the context of the change
that causes the conflict in mind when dealing with it.

closes odoo/odoo#107621

Related: odoo/enterprise#34910
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-14 11:41:52 +01:00

61 lines
2.3 KiB
JavaScript

/** @odoo-module */
import { TextAreaPopup } from "@point_of_sale/../tests/tours/helpers/TextAreaPopupTourMethods";
import { NumberPopup } from "@point_of_sale/../tests/tours/helpers/NumberPopupTourMethods";
import { Chrome } from "@pos_restaurant/../tests/tours/helpers/ChromeTourMethods";
import { FloorScreen } from "@pos_restaurant/../tests/tours/helpers/FloorScreenTourMethods";
import { ProductScreen } from "@pos_restaurant/../tests/tours/helpers/ProductScreenTourMethods";
import { SplitBillScreen } from "@pos_restaurant/../tests/tours/helpers/SplitBillScreenTourMethods";
import { BillScreen } from "@pos_restaurant/../tests/tours/helpers/BillScreenTourMethods";
import { getSteps, startSteps } from "@point_of_sale/../tests/tours/helpers/utils";
import Tour from "web_tour.tour";
// signal to start generating steps
// when finished, steps can be taken from getSteps
startSteps();
// Test TransferOrderButton
FloorScreen.do.clickTable("T2");
ProductScreen.exec.addOrderline("Water", "5", "2", "10.0");
ProductScreen.do.clickTransferButton();
FloorScreen.do.clickTable("T4");
ProductScreen.do.clickOrderline("Water", "5", "2");
Chrome.do.backToFloor();
FloorScreen.do.clickTable("T2");
ProductScreen.check.orderIsEmpty();
Chrome.do.backToFloor();
FloorScreen.do.clickTable("T4");
ProductScreen.do.clickOrderline("Water", "5", "2");
// Test SplitBillButton
ProductScreen.do.clickSplitBillButton();
SplitBillScreen.do.clickBack();
// Test OrderlineNoteButton
ProductScreen.do.clickNoteButton();
TextAreaPopup.check.isShown();
TextAreaPopup.do.inputText("test note");
TextAreaPopup.do.clickConfirm();
ProductScreen.check.orderlineHasNote("Water", "5", "test note");
ProductScreen.exec.addOrderline("Water", "8", "1", "8.0");
// Test PrintBillButton
ProductScreen.do.clickPrintBillButton();
BillScreen.check.isShown();
BillScreen.do.clickOk();
// Test GuestButton
ProductScreen.do.clickGuestButton();
NumberPopup.do.pressNumpad("1 5");
NumberPopup.check.inputShownIs("15");
NumberPopup.do.clickConfirm();
ProductScreen.check.guestNumberIs("15");
ProductScreen.do.clickGuestButton();
NumberPopup.do.pressNumpad("5");
NumberPopup.check.inputShownIs("5");
NumberPopup.do.clickConfirm();
ProductScreen.check.guestNumberIs("5");
Tour.register("ControlButtonsTour", { test: true, url: "/pos/ui" }, getSteps());