From c0d3a663135a00da9f9da1fc43b20d5de6bcc2b7 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 15 May 2025 12:56:51 +0000 Subject: [PATCH] [FIX] theme_test_custo: fix nightly theme preview tour The theme preview feature before selection was disabled in [1]. This commit disables the related tour steps that were testing it a nightly tour... that was red since then. [1]: https://github.com/odoo/odoo/commit/7cb71e9479df0ee9af0b7ad39302857666726177 Related to task-3454790 closes odoo/design-themes#1082 X-original-commit: b4dfb01abe6aaafec1860c2e94463bfa7f6a01db Related: odoo/odoo#210890 Signed-off-by: Quentin Smetz (qsm) --- .../static/tests/tours/website_theme_preview.js | 8 ++++++-- theme_test_custo/tests/test_theme_creation.py | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/theme_test_custo/static/tests/tours/website_theme_preview.js b/theme_test_custo/static/tests/tours/website_theme_preview.js index 7c34907ee..ba3119b60 100644 --- a/theme_test_custo/static/tests/tours/website_theme_preview.js +++ b/theme_test_custo/static/tests/tours/website_theme_preview.js @@ -1,5 +1,3 @@ -/** @odoo-module */ - import { registry } from "@web/core/registry"; registry.category("web_tour.tours").add("website_theme_preview", { @@ -22,6 +20,11 @@ registry.category("web_tour.tours").add("website_theme_preview", { { content: "Click Skip and start from scratch", trigger: "button:contains('Skip and start from scratch')", +/* +TODO The feature that the following steps are testing is currently disabled. +It will either be restored or entirely removed at some point. See task-3454790. +Also, we simply do not go through theme choice when using "Skip and start from +scratch" in the configurator: the tour flow would have to be adapted. run: "click", }, { content: "Click on the Live preview of a theme", @@ -43,4 +46,5 @@ registry.category("web_tour.tours").add("website_theme_preview", { 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 +*/ }]}); diff --git a/theme_test_custo/tests/test_theme_creation.py b/theme_test_custo/tests/test_theme_creation.py index 67bbd8710..8f0ef1896 100644 --- a/theme_test_custo/tests/test_theme_creation.py +++ b/theme_test_custo/tests/test_theme_creation.py @@ -3,6 +3,7 @@ from odoo.tests import HttpCase, tagged from odoo.addons.website.tests.test_configurator import TestConfiguratorCommon + # TODO: `test_themes` tag should not be there, runbot config should be adapted # to test this module too. There is a special config for the theme repo. @tagged('post_install', '-at_install', 'test_themes') @@ -14,6 +15,7 @@ class Crawler(HttpCase): theme_custo.with_context(load_all_views=True, apply_new_theme=True)._theme_load(website) self.start_tour('/@/example', "theme_menu_hierarchies", login='admin') + @tagged('post_install', '-at_install') class TestThemeConfigurator(TestConfiguratorCommon): def test_website_theme_preview(self):