[FIX] website_sale: tour using demo data
The previous FIX on this tour was using an hardcoded id to go to the product page. We now have a test product created and searched through the tour. closes odoo/odoo#100575 Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit is contained in:
@@ -5,9 +5,16 @@ import wTourUtils from 'website.tour_utils';
|
||||
|
||||
tour.register('website_sale_cart_popover_tour', {
|
||||
test: true,
|
||||
url: '/shop/chair-floor-protection-29',
|
||||
url: '/shop',
|
||||
},
|
||||
[
|
||||
{
|
||||
content: "Search for the product",
|
||||
trigger: 'form input[name="search"]',
|
||||
run: 'text website_sale_cart_popover_tour_product'
|
||||
},
|
||||
wTourUtils.clickOnElement('Search', 'form:has(input[name="search"]) .oe_search_button'),
|
||||
wTourUtils.clickOnElement('website_sale_cart_popover_tour_product', 'a:contains(website_sale_cart_popover_tour_product)'),
|
||||
wTourUtils.clickOnElement('Add to Cart', '#product_detail form[action^="/shop/cart/update"] #add_to_cart'),
|
||||
{
|
||||
content: "hover on cart popover",
|
||||
|
||||
@@ -7,6 +7,14 @@ from odoo.tests.common import HttpCase
|
||||
|
||||
@tagged('post_install', '-at_install')
|
||||
class TestWebsiteSaleCartPopover(HttpCase):
|
||||
def setUp(self):
|
||||
super(TestWebsiteSaleCartPopover, self).setUp()
|
||||
self.env['product.product'].create({
|
||||
'name': 'website_sale_cart_popover_tour_product',
|
||||
'type': 'consu',
|
||||
'website_published': True,
|
||||
'list_price': 1000,
|
||||
})
|
||||
|
||||
def test_website_sale_cart_popover(self):
|
||||
self.start_tour("/", 'website_sale_cart_popover_tour', login="admin")
|
||||
|
||||
Reference in New Issue
Block a user