Files
design-themes/theme_graphene/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

47 lines
1.0 KiB
JavaScript

odoo.define("theme_graphene.tour.graphene", function (require) {
"use strict";
const wTourUtils = require("website.tour_utils");
const snippets = [
{
id: 's_cover',
name: 'Cover',
},
{
id: 's_text_image',
name: 'Text - Image',
},
{
id: 's_numbers',
name: 'Numbers',
},
{
id: 's_picture',
name: 'Picture',
},
{
id: 's_comparisons',
name: 'Comparisons',
},
];
wTourUtils.registerThemeHomepageTour("graphene_tour", [
wTourUtils.assertCssVariable('--color-palettes-name', '"graphene-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
wTourUtils.goBackToBlocks('left'),
wTourUtils.dragNDrop(snippets[1]),
wTourUtils.dragNDrop(snippets[2]),
wTourUtils.dragNDrop(snippets[3], 'top'),
wTourUtils.dragNDrop(snippets[4], 'top'),
wTourUtils.clickOnSnippet(snippets[4], 'top'),
wTourUtils.changeBackgroundColor('left'),
wTourUtils.selectColorPalette(),
]);
});