Files
design-themes/theme_loftspace/static/src/js/tour.js
T
Benoit Socias f127ff3741 [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#594

X-original-commit: 8b377af3a7
Related: odoo/odoo#101119
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-26 14:43:17 +02:00

41 lines
961 B
JavaScript

/** @odoo-module */
import wTourUtils from 'website.tour_utils';
const snippets = [
{
id: 's_cover',
name: 'Cover',
},
{
id: 's_three_columns',
name: 'Columns',
},
{
id: 's_title',
name: 'Title',
},
{
id: 's_images_wall',
name: 'Images Wall',
},
{
id: 's_call_to_action',
name: 'Call to Action',
},
];
wTourUtils.registerThemeHomepageTour("loftspace_tour", [
wTourUtils.assertCssVariable('--color-palettes-name', '"graphene-2"'),
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.changeBackgroundColor(),
wTourUtils.selectColorPalette(),
]);