Files
design-themes/theme_clean/static/src/js/tour.js
T
Benoit Socias 8b377af3a7 [IMP] theme_*: add precondition on tour to ensure expected theme
This commit adds a precondition to verify the presence of the specific
theme at the beginning of their tour.

See https://github.com/odoo/odoo/pull/100690.

task-2687506

closes odoo/design-themes#590

Related: odoo/odoo#100690
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-26 12:32:13 +02:00

57 lines
1.3 KiB
JavaScript

/** @odoo-module */
import wTourUtils from 'website.tour_utils';
import { _t } from 'web.core';
const snippets = [
{
id: 's_cover',
name: 'Cover',
},
{
id: 's_text_image',
name: 'Text - Image',
},
{
id: 's_title',
name: 'Title',
},
{
id: 's_features',
name: 'Features',
},
{
id: 's_carousel',
name: 'Carousel',
},
{
id: 's_numbers',
name: 'Numbers',
},
{
id: 's_three_columns',
name: 'Columns',
},
{
id: 's_call_to_action',
name: 'Call to Action',
},
];
wTourUtils.registerThemeHomepageTour("clean_tour", [
wTourUtils.assertCssVariable('--color-palettes-name', '"clean-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
wTourUtils.goBackToBlocks(),
wTourUtils.dragNDrop(snippets[1]),
wTourUtils.dragNDrop(snippets[2]),
wTourUtils.dragNDrop(snippets[3]),
wTourUtils.clickOnSnippet(snippets[3]),
wTourUtils.changeOption('ContainerWidth', 'we-button-group.o_we_user_value_widget', _t('width')),
wTourUtils.goBackToBlocks(),
wTourUtils.dragNDrop(snippets[4]),
wTourUtils.dragNDrop(snippets[5]),
wTourUtils.dragNDrop(snippets[6]),
wTourUtils.dragNDrop(snippets[7]),
]);