Files
design-themes/theme_bookstore/static/src/js/tour.js
T
Augustin (duau) 7fc9343344 [FIX] *: update tours to use new DOM structure
*: theme_bookstore, theme_kiddo, theme_notes, theme_odoo_experts

DOM structure was modified in website refactor [1], those tours were
still using the former one because they were silently disabled during
the refactor. See community PR for details (which re-enables them).

[1]: https://github.com/odoo/odoo/commit/9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2

Related to opw-5020952
Related to opw-5040694

X-original-commit: 59f35e4dde
Part-of: odoo/design-themes#1141
Related: odoo/odoo#225809
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Augustin Dupin (duau) <duau@odoo.com>
2025-09-07 02:16:05 +00:00

47 lines
1.2 KiB
JavaScript

/** @odoo-module */
import * as wTourUtils from '@website/js/tours/tour_utils';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
id: 's_banner',
name: 'Banner',
groupName: "Intro",
},
{
id: 's_key_images',
name: 'Key Images',
groupName: "Columns",
},
{
id: 's_title',
name: 'Title',
groupName: "Text",
},
{
id: 's_accordion_image',
name: 'Accordion Image',
groupName: "Content",
},
{
id: 's_cta_box',
name: 'CTA Box',
groupName: "Content",
},
];
wTourUtils.registerThemeHomepageTour("bookstore_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"default-26"'),
...wTourUtils.insertSnippet(snippets[0]),
...wTourUtils.clickOnText(snippets[0], 'h1'),
wTourUtils.goBackToBlocks(),
...wTourUtils.insertSnippet(snippets[1]),
...wTourUtils.insertSnippet(snippets[2]),
...wTourUtils.insertSnippet(snippets[3]),
...wTourUtils.insertSnippet(snippets[4]),
...wTourUtils.clickOnSnippet(snippets[4]),
wTourUtils.changeOption('Box Call to Action', 'setContainerWidth', _t('width')),
wTourUtils.goBackToBlocks(),
]);