2014-06-24 15:37:13 +00:00
|
|
|
(function () {
|
|
|
|
'use strict';
|
|
|
|
|
2014-06-25 10:39:21 +00:00
|
|
|
openerp.Tour.tours.shop_buy_product.steps.splice(3, 0, {
|
|
|
|
title: "click in modal on 'Proceed to checkout' button",
|
|
|
|
element: '.modal a:contains("Proceed to checkout")',
|
|
|
|
});
|
|
|
|
|
2014-06-24 15:37:13 +00:00
|
|
|
openerp.Tour.register({
|
|
|
|
id: 'shop_customize',
|
|
|
|
name: "Customize the page and search a product",
|
|
|
|
path: '/shop',
|
|
|
|
mode: 'test',
|
|
|
|
steps: [
|
|
|
|
{
|
|
|
|
title: "open customize menu",
|
|
|
|
element: '#customize-menu-button',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "click on 'Product Attribute's Filters'",
|
|
|
|
element: "#customize-menu a:contains(Product Attribute's Filters)",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "select product attribute memory 16 Go",
|
|
|
|
waitNot: '#customize-menu:visible',
|
|
|
|
element: 'form.js_attributes label:contains(16 Go) input:not(:checked)',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "check the selection",
|
|
|
|
waitFor: 'form.js_attributes label:contains(16 Go) input:checked',
|
|
|
|
},
|
|
|
|
{
|
2014-06-25 10:39:21 +00:00
|
|
|
title: "select iPad",
|
2014-06-24 15:37:13 +00:00
|
|
|
waitNot: '.oe_website_sale .oe_product_cart:eq(2)',
|
2014-06-25 10:39:21 +00:00
|
|
|
element: '.oe_product_cart a:contains("iPad")',
|
2014-06-24 15:37:13 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "click on 'Add to Cart' button",
|
|
|
|
waitNot: '#customize-menu:visible',
|
2014-06-25 10:39:21 +00:00
|
|
|
element: "a:contains(Add to Cart)",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "add an optional Warranty",
|
|
|
|
element: ".js_product:contains(Warranty) a:contains(Add to Cart)",
|
2014-06-24 15:37:13 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "click in modal on 'Proceed to checkout' button",
|
2014-06-25 10:39:21 +00:00
|
|
|
waitFor: '.js_product:contains(Warranty) a:contains(Add to Cart):hidden',
|
2014-06-24 15:37:13 +00:00
|
|
|
element: '.modal a:contains("Proceed to checkout")',
|
|
|
|
},
|
|
|
|
{
|
2014-06-25 10:39:21 +00:00
|
|
|
title: "check quantity",
|
|
|
|
waitFor: '.my_cart_quantity:containsExact(2)',
|
2014-06-24 15:37:13 +00:00
|
|
|
},
|
|
|
|
{
|
2014-06-25 10:39:21 +00:00
|
|
|
title: "check optional product",
|
|
|
|
waitFor: '.optional_product',
|
2014-06-24 15:37:13 +00:00
|
|
|
},
|
|
|
|
{
|
2014-06-25 10:39:21 +00:00
|
|
|
title: "remove iPad from cart",
|
|
|
|
element: '#cart_products a.js_add_cart_json:first',
|
2014-06-24 15:37:13 +00:00
|
|
|
},
|
|
|
|
{
|
2014-06-25 10:39:21 +00:00
|
|
|
title: "check optional product is removed",
|
|
|
|
waitNot: '.optional_product',
|
2014-06-24 15:37:13 +00:00
|
|
|
},
|
|
|
|
{
|
2014-06-25 10:39:21 +00:00
|
|
|
title: "click on shop",
|
|
|
|
element: "a:contains(Shop)",
|
|
|
|
waitNot: '#products_grid_before .js_attributes',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "open customize menu bis",
|
|
|
|
waitFor: '#products_grid_before .js_attributes',
|
|
|
|
element: '#customize-menu-button',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "remove 'Product Attribute's Filters'",
|
|
|
|
element: "#customize-menu a:contains(Product Attribute's Filters):has(.fa-check-square-o)",
|
2014-06-24 15:37:13 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "finish",
|
2014-06-25 10:39:21 +00:00
|
|
|
waitNot: '#products_grid_before .js_attributes',
|
|
|
|
waitFor: 'li:has(.my_cart_quantity):hidden',
|
2014-06-24 15:37:13 +00:00
|
|
|
},
|
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
}());
|