diff --git a/addons/pos_self_order/static/tests/tours/test_self_order_my_orders_tour.js b/addons/pos_self_order/static/tests/tours/test_self_order_my_orders_tour.js new file mode 100644 index 00000000000..1031e6039d1 --- /dev/null +++ b/addons/pos_self_order/static/tests/tours/test_self_order_my_orders_tour.js @@ -0,0 +1,26 @@ +/** @odoo-module **/ + +import { registry } from "@web/core/registry"; +import { PosSelf } from "./tour_utils"; + +registry.category("web_tour.tours").add("test_self_order_my_orders_tour", { + test: true, + steps: () => [ + // Verify if the self is open and My Orders is not displayed because we are in "meal" mode + PosSelf.check.isNotNotification(), + PosSelf.check.isNotPrimaryBtn("My Orders"), + PosSelf.action.clickPrimaryBtn("View Menu"), + + ...PosSelf.action.addProduct("Office Chair Black", 1), + PosSelf.action.clickPrimaryBtn("Review"), + PosSelf.check.isOrderline("Office Chair Black", "138.58", ""), + + PosSelf.action.clickPrimaryBtn("Order"), + PosSelf.check.tablePopupIsShown(), + PosSelf.action.selectTable({ id: "1", name: "1" }), + PosSelf.action.clickPrimaryBtn("Confirm"), + PosSelf.check.isNotification("Your order has been placed!"), + PosSelf.action.clickPrimaryBtn("My Orders"), + PosSelf.check.isOrderline("Office Chair Black", "138.58", ""), + ], +}); diff --git a/addons/pos_self_order/tests/test_frontend.py b/addons/pos_self_order/tests/test_frontend.py index 8798a2149b9..de879b45c0d 100644 --- a/addons/pos_self_order/tests/test_frontend.py +++ b/addons/pos_self_order/tests/test_frontend.py @@ -39,3 +39,12 @@ class TestFrontendMobile(SelfOrderCommonTest): "self_order_menu_only_tour", login=None, ) + def test_self_order_my_orders_tour(self): + self.pos_config.self_order_table_mode = True + self.pos_config.self_order_pay_after = "meal" + self.pos_config.with_user(self.pos_user).open_ui() + self.start_tour( + self.pos_config._get_self_order_route(), + "test_self_order_my_orders_tour", + login=None, + )