Files
odoo_source/addons/website/static/tests/tours/dashboard_tour.js
T
Romeo Fragomeli ab2e3fdb7d [REF] *: add tour steps utils
This commit moves some step utils in a dedicated file and add new ones.
These steps will be very useful for the Main Flow Tour to avoid
duplicated code.

To do this, we also had to transform it into functions to allow
utils to call each other. Existing one are converted for
standardization purpose.

Note that 'WEBSITE_NEW_PAGE' wasn't considered as an util.
This is a very simple step only used twice.
2020-03-11 10:10:16 +00:00

23 lines
685 B
JavaScript

odoo.define("website.tour.backend_dashboard", function (require) {
"use strict";
var tour = require("web_tour.tour");
tour.register("backend_dashboard", {
test: true,
url: "/web",
}, [tour.stepUtils.showAppsMenuItem(),
{
trigger: 'a[data-menu-xmlid="website.menu_website_configuration"]',
}, {
trigger: '.dropdown-toggle[data-menu-xmlid="website.menu_dashboard"]',
}, {
trigger: '.dropdown-item[data-menu-xmlid="website.menu_website_google_analytics"]',
}, {
// Visits section should always be present even when empty / not hooked to anything
trigger: 'h2:contains("Visits")',
content: "Check if dashboard loads",
run: function () {}
}]);
});