Files
design-themes/theme_bookstore/static/src/js/tour.js
T
2024-08-23 08:15:12 +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_masonry_block',
name: 'Masonry',
groupName: "Images",
},
{
id: 's_process_steps',
name: 'Steps',
groupName: "Content",
},
{
id: 's_showcase',
name: 'Showcase',
groupName: "Content",
},
{
id: 's_title',
name: 'Title',
groupName: "Text",
},
];
wTourUtils.registerThemeHomepageTour("bookstore_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"default-26"'),
...wTourUtils.dragNDrop(snippets[0]),
...wTourUtils.clickOnText(snippets[0], 'h1'),
wTourUtils.goBackToBlocks(),
...wTourUtils.dragNDrop(snippets[1]),
...wTourUtils.dragNDrop(snippets[2]),
...wTourUtils.dragNDrop(snippets[3]),
...wTourUtils.dragNDrop(snippets[4]),
...wTourUtils.clickOnSnippet(snippets[4]),
wTourUtils.changeOption('ContainerWidth', 'we-button-group.o_we_user_value_widget', _t('width')),
wTourUtils.goBackToBlocks(),
]);