Files
design-themes/theme_odoo_experts/static/src/js/tour.js
T
qsm-odoo 10148e0354 [FIX] test_themes, theme_*: fix errors in theme tours
Also disable the two theme tours that currently do not pass (for some
reason, they are not even starting at all). To fix later.

X-original-commit: 04f90cd883
Part-of: odoo/design-themes#971
Related: odoo/odoo#182039
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-09-30 16:38:13 +00:00

60 lines
1.7 KiB
JavaScript

/** @odoo-module */
import * as wTourUtils from '@website/js/tours/tour_utils';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
id: 's_mockup_image',
name: 'Mockup Image',
groupName: "Content",
},
{
id: 's_references',
name: 'References',
groupName: "People",
},
{
id: 's_text_image',
name: 'Image - Text',
groupName: "Content",
},
{
id: 's_text_image',
name: 'Text - Image',
groupName: "Content",
},
{
id: 's_showcase',
name: 'Showcase',
groupName: "Content",
},
{
id: 's_faq_collapse',
name: 'FAQ Block',
groupName: "Text",
},
{
id: 's_cta_box',
name: 'Box Call to Action',
groupName: "Content",
},
];
wTourUtils.registerThemeHomepageTour("odoo_experts_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"default-11"'),
...wTourUtils.insertSnippet(snippets[0]),
...wTourUtils.insertSnippet(snippets[1]),
...wTourUtils.insertSnippet(snippets[2]),
...wTourUtils.clickOnText(snippets[2], 'h2'),
wTourUtils.goBackToBlocks(),
...wTourUtils.insertSnippet(snippets[3]),
...wTourUtils.insertSnippet(snippets[4]),
...wTourUtils.insertSnippet(snippets[5]),
...wTourUtils.clickOnSnippet(snippets[5], 'top'),
wTourUtils.changeOption('ColoredLevelBackground', 'we-button[data-toggle-bg-shape]', _t('Background Shape')),
wTourUtils.selectNested('we-select-page', 'BackgroundShape', ':not(.o_we_pager_controls)', _t('Background Shape')),
wTourUtils.goBackToBlocks(),
...wTourUtils.insertSnippet(snippets[6]),
]);