Odoo18-Base/addons/website_sale/static/tests/tours/website_sale_buy.js
2025-01-06 10:57:38 +07:00

26 lines
778 B
JavaScript

/** @odoo-module **/
import { registry } from "@web/core/registry";
import * as tourUtils from "@website_sale/js/tours/tour_utils";
registry.category("web_tour.tours").add('shop_buy_product', {
url: '/shop',
steps: () => [
...tourUtils.searchProduct("Storage Box"),
{
content: "select Storage Box",
trigger: '.oe_product_cart:first a:contains("Storage Box")',
run: "click",
},
{
content: "click on add to cart",
trigger: '#product_detail form[action^="/shop/cart/update"] #add_to_cart',
run: "click",
},
tourUtils.goToCart(),
tourUtils.goToCheckout(),
tourUtils.confirmOrder(),
...tourUtils.payWithTransfer(true),
]
});