[REF] website_*: Change registerTours of tour_utils

As steps are encapsuled in an arrow function from
69a5d8e3ce47238 for steps tour definition to avoid
direct Markup(_t()) interpretation, the same is done
for registerWebsitePreviewTour() of
"odoo/addons/website/static/src/js/tours/tour_utils.js"
in this commit.

This is done in anticipation of the use of
_t() (import from @web/core/l10n/translation) with
registerWebsitePreviewTour().

task-3292454

closes odoo/design-themes#678

Related: odoo/odoo#130248
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit is contained in:
Pierre Pulinckx (pipu)
2023-07-31 13:58:17 +00:00
parent b9d48ebe86
commit 94b3042634
28 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("anelusia_tour", [
wTourUtils.registerThemeHomepageTour("anelusia_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"generic-17"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("artists_tour", [
wTourUtils.registerThemeHomepageTour("artists_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"artists-1"'),
wTourUtils.dragNDrop(snippets[0], 'top'),
wTourUtils.dragNDrop(snippets[1]),
+1 -1
View File
@@ -24,7 +24,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("avantgarde_tour", [
wTourUtils.registerThemeHomepageTour("avantgarde_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"avantgarde-3"'),
wTourUtils.dragNDrop(snippets[0], 'top'),
wTourUtils.clickOnText(snippets[0], 'h1', 'left'),
+2 -2
View File
@@ -1,7 +1,7 @@
/** @odoo-module */
import wTourUtils from '@website/js/tours/tour_utils';
import { _t } from '@web/legacy/js/services/core';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
@@ -30,7 +30,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("aviato_tour", [
wTourUtils.registerThemeHomepageTour("aviato_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"treehouse-5"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("beauty_tour", [
wTourUtils.registerThemeHomepageTour("beauty_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"beauty-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
+2 -2
View File
@@ -1,6 +1,6 @@
/** @odoo-module */
import wTourUtils from '@website/js/tours/tour_utils';
import { _t } from '@web/legacy/js/services/core';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
@@ -33,7 +33,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("bewise_tour", [
wTourUtils.registerThemeHomepageTour("bewise_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"bewise-1"'),
wTourUtils.dragNDrop(snippets[0], 'top'),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("bistro_tour", [
wTourUtils.registerThemeHomepageTour("bistro_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"bistro-5"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+2 -2
View File
@@ -1,7 +1,7 @@
/** @odoo-module */
import wTourUtils from '@website/js/tours/tour_utils';
import { _t } from '@web/legacy/js/services/core';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
@@ -30,7 +30,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("bookstore_tour", [
wTourUtils.registerThemeHomepageTour("bookstore_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"generic-8"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("buzzy_tour", [
wTourUtils.registerThemeHomepageTour("buzzy_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"kiddo-2"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+2 -2
View File
@@ -1,7 +1,7 @@
/** @odoo-module */
import wTourUtils from '@website/js/tours/tour_utils';
import { _t } from '@web/legacy/js/services/core';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
@@ -38,7 +38,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("clean_tour", [
wTourUtils.registerThemeHomepageTour("clean_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"clean-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
+1 -1
View File
@@ -30,7 +30,7 @@ const snippets = [
];
wTourUtils.registerThemeHomepageTour("cobalt_tour", [
wTourUtils.registerThemeHomepageTour("cobalt_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"cobalt-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("enark_tour", [
wTourUtils.registerThemeHomepageTour("enark_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"enark-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
+1 -1
View File
@@ -26,7 +26,7 @@ const snippets = [
];
wTourUtils.registerThemeHomepageTour("graphene_tour", [
wTourUtils.registerThemeHomepageTour("graphene_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"graphene-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("kea_tour", [
wTourUtils.registerThemeHomepageTour("kea_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"bewise-2"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
+2 -2
View File
@@ -1,6 +1,6 @@
/** @odoo-module */
import wTourUtils from '@website/js/tours/tour_utils';
import { _t } from '@web/legacy/js/services/core';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
@@ -25,7 +25,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("kiddo_tour", [
wTourUtils.registerThemeHomepageTour("kiddo_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"default-16"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
+1 -1
View File
@@ -25,7 +25,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("loftspace_tour", [
wTourUtils.registerThemeHomepageTour("loftspace_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"graphene-2"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
+1 -1
View File
@@ -37,7 +37,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("monglia_tour", [
wTourUtils.registerThemeHomepageTour("monglia_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"monglia-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("nano_tour", [
wTourUtils.registerThemeHomepageTour("nano_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"nano-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+2 -2
View File
@@ -1,7 +1,7 @@
/** @odoo-module */
import wTourUtils from '@website/js/tours/tour_utils';
import { _t } from '@web/legacy/js/services/core';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
@@ -30,7 +30,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("notes_tour", [
wTourUtils.registerThemeHomepageTour("notes_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"notes-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
+2 -2
View File
@@ -1,7 +1,7 @@
/** @odoo-module */
import wTourUtils from '@website/js/tours/tour_utils';
import { _t } from '@web/legacy/js/services/core';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
@@ -34,7 +34,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("odoo_experts_tour", [
wTourUtils.registerThemeHomepageTour("odoo_experts_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"odoo-experts-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.dragNDrop(snippets[1]),
+2 -2
View File
@@ -1,7 +1,7 @@
/** @odoo-module */
import wTourUtils from '@website/js/tours/tour_utils';
import { _t } from '@web/legacy/js/services/core';
import { _t } from "@web/core/l10n/translation";
const snippets = [
{
@@ -30,7 +30,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("orchid_tour", [
wTourUtils.registerThemeHomepageTour("orchid_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"orchid-7"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
+1 -1
View File
@@ -30,7 +30,7 @@ const snippets = [
];
wTourUtils.registerThemeHomepageTour("paptic_tour", [
wTourUtils.registerThemeHomepageTour("paptic_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"paptic-1"'),
wTourUtils.dragNDrop(snippets[0], 'top'),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+1 -1
View File
@@ -45,7 +45,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("real_estate_tour", [
wTourUtils.registerThemeHomepageTour("real_estate_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"real-estate-4"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1'),
@@ -5,7 +5,7 @@ import wTourUtils from '@website/js/tours/tour_utils';
wTourUtils.registerWebsitePreviewTour('theme_menu_hierarchies', {
url: '/example',
test: true,
}, [
}, () => [
{
content: 'Check Mega Menu is correctly created',
trigger: 'iframe #top_menu a.o_mega_menu_toggle',
+1 -1
View File
@@ -25,7 +25,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("treehouse_tour", [
wTourUtils.registerThemeHomepageTour("treehouse_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"treehouse-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("vehicle_tour", [
wTourUtils.registerThemeHomepageTour("vehicle_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"vehicle-1"'),
wTourUtils.dragNDrop(snippets[0], 'top'),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("yes_tour", [
wTourUtils.registerThemeHomepageTour("yes_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"yes-3"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.dragNDrop(snippets[1]),
+1 -1
View File
@@ -29,7 +29,7 @@ const snippets = [
},
];
wTourUtils.registerThemeHomepageTour("zap_tour", [
wTourUtils.registerThemeHomepageTour("zap_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"zap-1"'),
wTourUtils.dragNDrop(snippets[0]),
wTourUtils.clickOnText(snippets[0], 'h1', 'top'),