[FIX] website_sale,*: fix shop_buy_product tour

*: website_sale_product_configurator

The goal of this commit is to fix the tour : "shop_buy_product"
by adding the "goToCart" step to work with the new "add to cart"
scenarios (adding products in the same page is default behaviour).

closes odoo/odoo#68889

X-original-commit: ccc1584cd5ee9156e96e373997765b94831a828d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
xO-Tx
2021-04-07 12:48:41 +00:00
parent 5d295cb73d
commit 0af36ab87d
2 changed files with 3 additions and 1 deletions
@@ -2,6 +2,7 @@ odoo.define('website_sale.tour', function (require) {
'use strict';
var tour = require("web_tour.tour");
const tourUtils = require('website_sale.tour_utils');
tour.register('shop_buy_product', {
test: true,
@@ -37,6 +38,7 @@ tour.register('shop_buy_product', {
extra_trigger: 'label:contains(Steel) input:propChecked',
trigger: '#product_detail form[action^="/shop/cart/update"] #add_to_cart',
},
tourUtils.goToCart(),
{
content: "add suggested",
extra_trigger: '#wrap:not(:has(#cart_products:contains("Storage Box")))',
@@ -11,7 +11,7 @@ var addCartStepIndex = _.findIndex(tour.tours.shop_buy_product.steps, function (
return (step.id === 'add_cart_step');
});
tour.tours.shop_buy_product.steps.splice(addCartStepIndex + 1, 0, {
tour.tours.shop_buy_product.steps.splice(addCartStepIndex + 1, 1, {
content: "click in modal on 'Proceed to checkout' button",
trigger: 'button:contains("Proceed to Checkout")',
});