From 7842deecd17d2ca2fc45f77b44e1a10da298efcb Mon Sep 17 00:00:00 2001 From: Mahamadasif Ansari Date: Mon, 8 Jan 2024 09:51:18 +0000 Subject: [PATCH] [FIX] mass_mailing, website: add markup in tour content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Current behavior before PR: - HTML tags are displayed in the onboarding tour. Desired behavior after PR is merged: - Display the HTML tag effects instead of showing it in the onboarding tour. After the https://github.com/odoo/odoo/pull/107618 web_tour was converted into Owl, 'markup' was required to show the html tag effect instead of htm tags. Related Enterprise PR-https://github.com/odoo/enterprise/pull/53893 Task-3457112 closes odoo/odoo#149957 X-original-commit: c26ba2943317e82388bc05adfd64fa729923a86b Related: odoo/enterprise#54622 Signed-off-by: Aaron Bohy (aab) --- .../static/tests/tours/mass_mailing_code_view.js | 9 +++++---- .../website/static/tests/tours/homepage_edit_discard.js | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/addons/mass_mailing/static/tests/tours/mass_mailing_code_view.js b/addons/mass_mailing/static/tests/tours/mass_mailing_code_view.js index da30bc4b012..e13fcd1d7c0 100644 --- a/addons/mass_mailing/static/tests/tours/mass_mailing_code_view.js +++ b/addons/mass_mailing/static/tests/tours/mass_mailing_code_view.js @@ -1,5 +1,6 @@ /** @odoo-module **/ +import { markup } from "@odoo/owl"; import { registry } from "@web/core/registry"; import { stepUtils } from "@web_tour/tour_service/tour_utils"; @@ -14,7 +15,7 @@ registry.category("web_tour.tours").add('mass_mailing_code_view_tour', { trigger: 'button.o_list_button_add', }, { trigger: 'input#subject_0', - content: ('Pick the email subject.'), + content: markup('Pick the email subject.'), position: 'bottom', run: 'text Test' }, { @@ -26,11 +27,11 @@ registry.category("web_tour.tours").add('mass_mailing_code_view_tour', { run: 'click', }, { trigger: 'div[name="body_arch"] iframe #default', - content: 'Choose this theme.', + content: markup('Choose this theme.'), run: 'click', }, { trigger: 'iframe .o_codeview_btn', - content: ('Click here to switch to code view'), + content: markup('Click here to switch to code view'), run: 'click' }, { trigger: 'iframe .o_codeview', @@ -43,7 +44,7 @@ registry.category("web_tour.tours").add('mass_mailing_code_view_tour', { } }, { trigger: 'iframe .o_codeview_btn', - content: ('Click here to switch back from code view'), + content: markup('Click here to switch back from code view'), run: 'click' }, { trigger: '[name="body_arch"] iframe .o_mail_wrapper_td', diff --git a/addons/website/static/tests/tours/homepage_edit_discard.js b/addons/website/static/tests/tours/homepage_edit_discard.js index 991f63f217e..221e5da311f 100644 --- a/addons/website/static/tests/tours/homepage_edit_discard.js +++ b/addons/website/static/tests/tours/homepage_edit_discard.js @@ -1,5 +1,6 @@ /** @odoo-module **/ +import { markup } from "@odoo/owl"; import wTourUtils from "@website/js/tours/tour_utils"; // TODO remove this test; it is badly written: you just have to change the fact @@ -13,7 +14,7 @@ wTourUtils.registerWebsitePreviewTour('homepage_edit_discard', { }, () => [{ trigger: "#oe_snippets button[data-action=\"cancel\"]:not([disabled])", extra_trigger: "body:not(:has(.o_dialog))", - content: "Click Discard to Discard all Changes.", + content: markup("Click Discard to Discard all Changes."), position: "bottom", }, { trigger: "iframe body:not(.editor_enable)",