2023-06-13 09:47:44 +00:00
|
|
|
/** @odoo-module */
|
|
|
|
|
|
2023-07-13 06:53:15 +00:00
|
|
|
import { registry } from "@web/core/registry";
|
2023-06-13 09:47:44 +00:00
|
|
|
|
2023-07-13 06:53:15 +00:00
|
|
|
registry.category("web_tour.tours").add("website_theme_preview", {
|
2023-06-13 09:47:44 +00:00
|
|
|
test: true,
|
|
|
|
|
url: "/web#action=website.action_website_configuration",
|
|
|
|
|
},
|
|
|
|
|
[{
|
|
|
|
|
content: "Click on create new website",
|
|
|
|
|
trigger: 'button[name="action_website_create_new"]',
|
2024-06-04 08:45:24 +02:00
|
|
|
run: "click",
|
2023-06-13 09:47:44 +00:00
|
|
|
}, {
|
|
|
|
|
content: "insert website name",
|
|
|
|
|
trigger: '[name="name"] input',
|
|
|
|
|
run: "text Website Test",
|
|
|
|
|
}, {
|
|
|
|
|
content: "Validate the website creation modal",
|
|
|
|
|
trigger: "button.btn-primary",
|
2024-06-04 08:45:24 +02:00
|
|
|
run: "click",
|
2023-06-13 09:47:44 +00:00
|
|
|
},
|
|
|
|
|
// Configurator first screen
|
|
|
|
|
{
|
|
|
|
|
content: "Click Skip and start from scratch",
|
|
|
|
|
trigger: "button:contains('Skip and start from scratch')",
|
2024-06-04 08:45:24 +02:00
|
|
|
run: "click",
|
2023-06-13 09:47:44 +00:00
|
|
|
}, {
|
|
|
|
|
content: "Click on the Live preview of a theme",
|
|
|
|
|
trigger: ".o_theme_preview .o_button_area .btn-secondary:contains('Live Preview')",
|
2024-06-04 08:45:24 +02:00
|
|
|
run: "click",
|
2023-06-13 09:47:44 +00:00
|
|
|
}, {
|
|
|
|
|
content: "Switch from desktop to mobile preview",
|
|
|
|
|
trigger: ".btn[for=themeViewerMobile]",
|
2024-06-04 08:45:24 +02:00
|
|
|
run: "click",
|
2023-06-13 09:47:44 +00:00
|
|
|
}, {
|
|
|
|
|
content: "Check that the mobile view is active",
|
|
|
|
|
trigger: ".o_view_form_theme_preview_controller .o_field_iframe > div.is_mobile:visible",
|
|
|
|
|
run: () => null, // it's a check
|
|
|
|
|
}, {
|
|
|
|
|
content: "Switch back to desktop",
|
|
|
|
|
trigger: ".btn[for=themeViewerDesktop]",
|
2024-06-04 08:45:24 +02:00
|
|
|
run: "click",
|
2023-06-13 09:47:44 +00:00
|
|
|
}, {
|
|
|
|
|
content: "Check that the desktop view is active",
|
|
|
|
|
trigger: ".o_view_form_theme_preview_controller .o_field_iframe > div:not(.is_mobile):visible",
|
|
|
|
|
run: () => null, // it's a check
|
|
|
|
|
}]);
|