[FIX] website_sale: fix test with snippets to add to cart
Fixes build error 22850 Fixes build error 22851 closes odoo/odoo#137091 X-original-commit: f6e74a4d707f1b5e5e6286956d0bf66087045302 Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
This commit is contained in:
@@ -105,7 +105,7 @@ function fillAdressForm(adressParams = {
|
||||
function goToCart({quantity = 1, position = "bottom", backend = false} = {}) {
|
||||
return {
|
||||
content: _t("Go to cart"),
|
||||
trigger: `${backend ? "iframe" : ""} a:has(.my_cart_quantity:containsExact(${quantity}))`,
|
||||
trigger: `${backend ? "iframe" : ""} a sup.my_cart_quantity:containsExact(${quantity})`,
|
||||
position: position,
|
||||
run: "click",
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ wTourUtils.registerWebsitePreviewTour('add_to_cart_snippet_tour', {
|
||||
...wTourUtils.selectElementInWeSelectWidget('action_picker_opt', 'Buy Now'),
|
||||
...wTourUtils.clickOnSave(),
|
||||
wTourUtils.clickOnElement('add to cart button', 'iframe .s_add_to_cart_btn'),
|
||||
wTourUtils.assertPathName('/shop/payment', 'iframe a.btn[href="/shop/cart"]'),
|
||||
wTourUtils.assertPathName('/shop/payment', 'iframe h3:contains("Pay with")'),
|
||||
|
||||
wsTourUtils.goToCart({quantity: 4, backend: true}),
|
||||
wsTourUtils.assertCartContains({productName: 'Acoustic Bloc Screens', backend: true}),
|
||||
|
||||
@@ -30,7 +30,7 @@ class TestAddToCartSnippet(HttpCase):
|
||||
'redirect_form_view_id': redirect_form.id,
|
||||
})
|
||||
|
||||
# def test_configure_product(self): FIXME: failing in master since 2023-08-29
|
||||
# # Reset the company country id, which ensure that no country dependant fields are blocking the address form.
|
||||
# self.env.company.country_id = self.env.ref('base.us')
|
||||
# self.start_tour("/", 'add_to_cart_snippet_tour', login="admin")
|
||||
def test_configure_product(self):
|
||||
# Reset the company country id, which ensure that no country dependant fields are blocking the address form.
|
||||
self.env.company.country_id = self.env.ref('base.us')
|
||||
self.start_tour("/", 'add_to_cart_snippet_tour', login="admin")
|
||||
|
||||
Reference in New Issue
Block a user