Files
design-themes/theme_test_custo/static/tests/tours/website_theme_preview.js
T
Hubert Van De Walle a3eb65d3ea [FIX] theme_test_custo: prevent failing test_website_theme_preview tour
When running the test test_website_theme_preview, we have the following error:

`tour.steps has to be a function that returns TourStep[]`

runbot-111646
runbot-163139

closes odoo/design-themes#1062

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2025-05-09 15:42:20 +00:00

42 lines
1.4 KiB
JavaScript

/** @odoo-module */
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add("website_theme_preview", {
test: true,
url: "/web#action=website.action_website_configuration",
steps: () => [
{
content: "Click on create new website",
trigger: 'button[name="action_website_create_new"]',
}, {
content: "insert website name",
trigger: '[name="name"] input',
run: "text Website Test",
}, {
content: "Validate the website creation modal",
trigger: "button.btn-primary",
},
// Configurator first screen
{
content: "Click Skip and start from scratch",
trigger: "button:contains('Skip and start from scratch')",
}, {
content: "Click on the Live preview of a theme",
trigger: ".o_theme_preview .o_button_area .btn-secondary:contains('Live Preview')",
}, {
content: "Switch from desktop to mobile preview",
trigger: ".btn[for=themeViewerMobile]",
}, {
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]",
}, {
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
}]});