| 1 | import { registry } from "@web/core/registry"; |
| 2 | import * as tourUtils from "@website_sale/js/tours/tour_utils"; |
| 3 | |
| 4 | registry.category("web_tour.tours").add('shop_buy_product', { |
| 5 | url: '/shop', |
| 6 | steps: () => [ |
| 7 | ...tourUtils.searchProduct("Storage Box", { select: true }), |
| 8 | { |
| 9 | content: "click on add to cart", |
| 10 | trigger: '#product_detail form #add_to_cart', |
| 11 | run: "click", |
| 12 | }, |
| 13 | tourUtils.goToCart(), |
| 14 | tourUtils.goToCheckout(), |
| 15 | tourUtils.confirmOrder(), |
| 16 | ...tourUtils.payWithTransfer({ |
| 17 | redirect: true, |
| 18 | expectUnloadPage: true, |
| 19 | waitFinalizeYourPayment: true, |
| 20 | }), |
| 21 | ] |
| 22 | }); |
| 23 | |
| 24 | registry.category("web_tour.tours").add('shop_repair_product', { |
| 25 | url: '/shop', |
| 26 | steps: () => [ |
| 27 | ...tourUtils.searchProduct("Test Repair Service", { select: true }), |
| 28 | { |
| 29 | content: "click on add to cart", |
| 30 | trigger: '#product_detail form #add_to_cart', |
| 31 | run: "click", |
| 32 | }, |
| 33 | tourUtils.goToCart(), |
| 34 | ] |
| 35 | }); |