Skip to content

Commit

Permalink
[FIX] website_sale_suggest_create_account: migrate test to V17
Browse files Browse the repository at this point in the history
- steps must be a function
- no more require("web_tour.tour")
  • Loading branch information
carlos-lopez-tecnativa committed Aug 9, 2024
1 parent 690909c commit 2d27772
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 54 deletions.
2 changes: 1 addition & 1 deletion website_sale_suggest_create_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"data": ["views/website_sale.xml"],
"assets": {
"web.assets_tests": [
"website_sale_suggest_create_account/static/tests/tours/checkout.js",
"website_sale_suggest_create_account/static/tests/tours/checkout.esm.js",
],
},
"post_init_hook": "post_init_hook",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/** @odoo-module */

import {registry} from "@web/core/registry";
registry.category("web_tour.tours").add("shop_buy_checkout_suggest_account_website", {
test: true,
url: "/shop",
steps: () => [
// Shop Page
{
trigger: "a:contains('Customizable')",
},
{
trigger: "#add_to_cart",
},
{
trigger: "button:contains('Proceed to Checkout')",
},
// Cart page
{
trigger:
"a.btn-primary[href='/web/login?redirect=/shop/checkout?express=1']",
},
// TODO: Add a step to check that "checkout" button doesn't exists
// Odoo 13.0 initial config doesn't have b2c actived for the website
// Login Page
{
trigger: "#login",
run: "text portal",
},
{
trigger: "#password",
run: "text portal",
},
{
trigger: "button.btn-primary:first",
},
// Checkout Page
{
trigger: "button[name='o_payment_submit_button']",
},
{
trigger: "span",
content: "Order",
},
// The End
],
});
53 changes: 0 additions & 53 deletions website_sale_suggest_create_account/static/tests/tours/checkout.js

This file was deleted.

0 comments on commit 2d27772

Please sign in to comment.