From f127ff37414d79e2bff4d7570c90bcffa703a5b2 Mon Sep 17 00:00:00 2001 From: Benoit Socias Date: Wed, 21 Sep 2022 09:20:55 +0000 Subject: [PATCH] [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: 8b377af3a71b875dfc452a14206a9a1679371000 Related: odoo/odoo#101119 Signed-off-by: Romain Derie (rde) --- theme_anelusia/static/src/js/tour.js | 1 + theme_artists/static/src/js/tour.js | 1 + theme_avantgarde/static/src/js/tour.js | 1 + theme_aviato/static/src/js/tour.js | 1 + theme_beauty/static/src/js/tour.js | 1 + theme_bewise/static/src/js/tour.js | 1 + theme_bistro/static/src/js/tour.js | 1 + theme_bookstore/static/src/js/tour.js | 1 + theme_buzzy/static/src/js/tour.js | 1 + theme_clean/static/src/js/tour.js | 1 + theme_cobalt/static/src/js/tour.js | 2 +- theme_enark/static/src/js/tour.js | 1 + theme_graphene/static/src/js/tour.js | 1 + theme_kea/static/src/js/tour.js | 1 + theme_kiddo/static/src/js/tour.js | 1 + theme_loftspace/static/src/js/tour.js | 1 + theme_monglia/static/src/js/tour.js | 1 + theme_nano/static/src/js/tour.js | 1 + theme_notes/static/src/js/tour.js | 1 + theme_odoo_experts/static/src/js/tour.js | 1 + theme_orchid/static/src/js/tour.js | 1 + theme_paptic/static/src/js/tour.js | 1 + theme_real_estate/static/src/js/tour.js | 1 + theme_treehouse/static/src/js/tour.js | 1 + theme_vehicle/static/src/js/tour.js | 1 + theme_yes/static/src/js/tour.js | 1 + theme_zap/static/src/js/tour.js | 1 + 27 files changed, 27 insertions(+), 1 deletion(-) diff --git a/theme_anelusia/static/src/js/tour.js b/theme_anelusia/static/src/js/tour.js index 9341014e7..b32e0edf9 100644 --- a/theme_anelusia/static/src/js/tour.js +++ b/theme_anelusia/static/src/js/tour.js @@ -34,6 +34,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("anelusia_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"generic-17"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_artists/static/src/js/tour.js b/theme_artists/static/src/js/tour.js index f2190f72b..15b87dbbc 100644 --- a/theme_artists/static/src/js/tour.js +++ b/theme_artists/static/src/js/tour.js @@ -30,6 +30,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("artists_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"artists-1"'), wTourUtils.dragNDrop(snippets[0], 'top'), wTourUtils.dragNDrop(snippets[1]), wTourUtils.clickOnText(snippets[1], 'h2'), diff --git a/theme_avantgarde/static/src/js/tour.js b/theme_avantgarde/static/src/js/tour.js index 08992e6a5..cec49d920 100644 --- a/theme_avantgarde/static/src/js/tour.js +++ b/theme_avantgarde/static/src/js/tour.js @@ -25,6 +25,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("avantgarde_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"avantgarde-3"'), wTourUtils.dragNDrop(snippets[0], 'top'), wTourUtils.clickOnText(snippets[0], 'h1', 'left'), wTourUtils.goBackToBlocks(), diff --git a/theme_aviato/static/src/js/tour.js b/theme_aviato/static/src/js/tour.js index b94f53085..eab6fa2b7 100644 --- a/theme_aviato/static/src/js/tour.js +++ b/theme_aviato/static/src/js/tour.js @@ -31,6 +31,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("aviato_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"treehouse-5"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_beauty/static/src/js/tour.js b/theme_beauty/static/src/js/tour.js index a8bcf00be..84fdfda1b 100644 --- a/theme_beauty/static/src/js/tour.js +++ b/theme_beauty/static/src/js/tour.js @@ -30,6 +30,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("beauty_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"beauty-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_bewise/static/src/js/tour.js b/theme_bewise/static/src/js/tour.js index 16e634e40..1d98ba68d 100644 --- a/theme_bewise/static/src/js/tour.js +++ b/theme_bewise/static/src/js/tour.js @@ -34,6 +34,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("bewise_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"bewise-1"'), wTourUtils.dragNDrop(snippets[0], 'top'), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_bistro/static/src/js/tour.js b/theme_bistro/static/src/js/tour.js index e134b2ab0..5eca8a734 100644 --- a/theme_bistro/static/src/js/tour.js +++ b/theme_bistro/static/src/js/tour.js @@ -30,6 +30,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("bistro_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"bistro-5"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_bookstore/static/src/js/tour.js b/theme_bookstore/static/src/js/tour.js index 50f78ff38..1dfde30d8 100644 --- a/theme_bookstore/static/src/js/tour.js +++ b/theme_bookstore/static/src/js/tour.js @@ -31,6 +31,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("bookstore_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"generic-8"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_buzzy/static/src/js/tour.js b/theme_buzzy/static/src/js/tour.js index eccb33983..a4fd4a477 100644 --- a/theme_buzzy/static/src/js/tour.js +++ b/theme_buzzy/static/src/js/tour.js @@ -30,6 +30,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("buzzy_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"kiddo-2"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_clean/static/src/js/tour.js b/theme_clean/static/src/js/tour.js index 4fe49f083..8f21fe675 100644 --- a/theme_clean/static/src/js/tour.js +++ b/theme_clean/static/src/js/tour.js @@ -39,6 +39,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("clean_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"clean-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_cobalt/static/src/js/tour.js b/theme_cobalt/static/src/js/tour.js index 0fa42b5d6..8ba3e0041 100644 --- a/theme_cobalt/static/src/js/tour.js +++ b/theme_cobalt/static/src/js/tour.js @@ -31,6 +31,7 @@ const snippets = [ wTourUtils.registerThemeHomepageTour("cobalt_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"cobalt-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), @@ -41,5 +42,4 @@ wTourUtils.registerThemeHomepageTour("cobalt_tour", [ wTourUtils.dragNDrop(snippets[4]), wTourUtils.dragNDrop(snippets[5]), - ]); diff --git a/theme_enark/static/src/js/tour.js b/theme_enark/static/src/js/tour.js index 168efdd7f..826c9c1bd 100644 --- a/theme_enark/static/src/js/tour.js +++ b/theme_enark/static/src/js/tour.js @@ -31,6 +31,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("enark_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"enark-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_graphene/static/src/js/tour.js b/theme_graphene/static/src/js/tour.js index 073abcc16..b95adddb1 100644 --- a/theme_graphene/static/src/js/tour.js +++ b/theme_graphene/static/src/js/tour.js @@ -28,6 +28,7 @@ const snippets = [ wTourUtils.registerThemeHomepageTour("graphene_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"graphene-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks('left'), diff --git a/theme_kea/static/src/js/tour.js b/theme_kea/static/src/js/tour.js index 1d046c0c8..af99988b5 100644 --- a/theme_kea/static/src/js/tour.js +++ b/theme_kea/static/src/js/tour.js @@ -30,6 +30,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("kea_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"bewise-2"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_kiddo/static/src/js/tour.js b/theme_kiddo/static/src/js/tour.js index d502cc1d6..d5ee7c622 100644 --- a/theme_kiddo/static/src/js/tour.js +++ b/theme_kiddo/static/src/js/tour.js @@ -26,6 +26,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("kiddo_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"default-16"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_loftspace/static/src/js/tour.js b/theme_loftspace/static/src/js/tour.js index cc645ebb6..d96f902d6 100644 --- a/theme_loftspace/static/src/js/tour.js +++ b/theme_loftspace/static/src/js/tour.js @@ -26,6 +26,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("loftspace_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"graphene-2"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_monglia/static/src/js/tour.js b/theme_monglia/static/src/js/tour.js index bb7e6e897..73dd88381 100644 --- a/theme_monglia/static/src/js/tour.js +++ b/theme_monglia/static/src/js/tour.js @@ -38,6 +38,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("monglia_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"monglia-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_nano/static/src/js/tour.js b/theme_nano/static/src/js/tour.js index 18f5b7f4d..6aadf61c7 100644 --- a/theme_nano/static/src/js/tour.js +++ b/theme_nano/static/src/js/tour.js @@ -30,6 +30,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("nano_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"nano-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_notes/static/src/js/tour.js b/theme_notes/static/src/js/tour.js index 64c06bbfb..0655db150 100644 --- a/theme_notes/static/src/js/tour.js +++ b/theme_notes/static/src/js/tour.js @@ -31,6 +31,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("notes_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"notes-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_odoo_experts/static/src/js/tour.js b/theme_odoo_experts/static/src/js/tour.js index 48a8b71c7..a717a7b09 100644 --- a/theme_odoo_experts/static/src/js/tour.js +++ b/theme_odoo_experts/static/src/js/tour.js @@ -35,6 +35,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("odoo_experts_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"odoo-experts-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.dragNDrop(snippets[1]), wTourUtils.dragNDrop(snippets[2]), diff --git a/theme_orchid/static/src/js/tour.js b/theme_orchid/static/src/js/tour.js index 485ac8569..3292b7070 100644 --- a/theme_orchid/static/src/js/tour.js +++ b/theme_orchid/static/src/js/tour.js @@ -31,6 +31,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("orchid_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"orchid-7"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_paptic/static/src/js/tour.js b/theme_paptic/static/src/js/tour.js index 117f3b123..6a645f5df 100644 --- a/theme_paptic/static/src/js/tour.js +++ b/theme_paptic/static/src/js/tour.js @@ -31,6 +31,7 @@ const snippets = [ wTourUtils.registerThemeHomepageTour("paptic_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"paptic-1"'), wTourUtils.dragNDrop(snippets[0], 'top'), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_real_estate/static/src/js/tour.js b/theme_real_estate/static/src/js/tour.js index 491d1c6e7..d3330565b 100644 --- a/theme_real_estate/static/src/js/tour.js +++ b/theme_real_estate/static/src/js/tour.js @@ -47,6 +47,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("real_estate_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"real-estate-4"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1'), wTourUtils.goBackToBlocks(), diff --git a/theme_treehouse/static/src/js/tour.js b/theme_treehouse/static/src/js/tour.js index 8ec3ab4d5..2ff874525 100644 --- a/theme_treehouse/static/src/js/tour.js +++ b/theme_treehouse/static/src/js/tour.js @@ -26,6 +26,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("treehouse_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"treehouse-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_vehicle/static/src/js/tour.js b/theme_vehicle/static/src/js/tour.js index 869cd05e7..a155d151e 100644 --- a/theme_vehicle/static/src/js/tour.js +++ b/theme_vehicle/static/src/js/tour.js @@ -31,6 +31,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("vehicle_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"vehicle-1"'), wTourUtils.dragNDrop(snippets[0], 'top'), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(), diff --git a/theme_yes/static/src/js/tour.js b/theme_yes/static/src/js/tour.js index f5c19492a..f0149306a 100644 --- a/theme_yes/static/src/js/tour.js +++ b/theme_yes/static/src/js/tour.js @@ -30,6 +30,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("yes_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"yes-3"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.dragNDrop(snippets[1]), wTourUtils.clickOnText(snippets[1], 'h1'), diff --git a/theme_zap/static/src/js/tour.js b/theme_zap/static/src/js/tour.js index fde80a559..8f0a652e5 100644 --- a/theme_zap/static/src/js/tour.js +++ b/theme_zap/static/src/js/tour.js @@ -30,6 +30,7 @@ const snippets = [ ]; wTourUtils.registerThemeHomepageTour("zap_tour", [ + wTourUtils.assertCssVariable('--color-palettes-name', '"zap-1"'), wTourUtils.dragNDrop(snippets[0]), wTourUtils.clickOnText(snippets[0], 'h1', 'top'), wTourUtils.goBackToBlocks(),