Skip to content

Commit 12ec9d8

Browse files
committed
[FIX] fix mass_mailing tours
1 parent 879fad4 commit 12ec9d8

File tree

5 files changed

+31
-27
lines changed

5 files changed

+31
-27
lines changed

addons/mass_mailing/static/tests/tours/mailing_editor.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ registry.category("web_tour.tours").add('mailing_editor', {
2323
content: 'wait for the editor to be rendered',
2424
trigger: '[name="body_arch"] :iframe .o_editable[data-editor-message="DRAG BUILDING BLOCKS HERE"]',
2525
}, {
26-
content: 'drag the "Title" snippet from the design panel and drop it in the editor',
27-
trigger: '[name="body_arch"] .o-snippets-menu [name="Title"] .oe_snippet_thumbnail',
28-
async run(helpers) {
29-
await helpers.drag_and_drop(`[name="body_arch"] :iframe .o_editable`, {
30-
position: {
31-
top: 340,
32-
},
33-
});
34-
},
26+
trigger: '.o_snippet[name="Headings"] button',
27+
content: 'Click the "Headings" snippet category to drop a snippet in the editor',
28+
run: "click",
29+
}, {
30+
trigger: ":iframe .o_snippet_preview_wrap:has(.s_title)",
31+
content: "Select the Title Snippet",
32+
run: "click",
3533
}, {
3634
content: 'wait for the snippet menu to finish the drop process',
3735
trigger: 'body:not(:has(.o_we_ongoing_insertion))',

addons/mass_mailing/static/tests/tours/mailing_editor_theme.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ registry.category("web_tour.tours").add('mailing_editor_theme', {
115115
trigger: ".o-select-color-foreground",
116116
run: "click",
117117
},
118+
{
119+
content: "Open Solid tab",
120+
trigger: ".btn-tab.solid-tab",
121+
run: "click",
122+
},
118123
{
119124
content: "Pick a color",
120125
trigger: '.o_font_color_selector button[data-color="o-color-1"]',

addons/mass_mailing/static/tests/tours/mass_mailing_code_view.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@ registry.category("web_tour.tours").add('mass_mailing_code_view_tour', {
3434
content: markup('Click here to switch to <b>code view</b>'),
3535
run: 'click'
3636
}, {
37-
trigger: 'textarea.o_codeview',
38-
content: ('Remove all content from codeview'),
37+
trigger: "textarea.o_codeview",
38+
content: "Remove all content from codeview",
3939
run: function () {
40-
const iframe = document.querySelector('.wysiwyg_iframe');
41-
const iframeDocument = iframe.contentWindow.document;
42-
let element = iframeDocument.querySelector(".o_codeview");
43-
element.value = '';
44-
}
40+
const element = document.querySelector(".o_codeview");
41+
element.value = "";
42+
},
4543
}, {
4644
trigger: '.o_codeview_btn',
4745
content: markup('Click here to switch back from <b>code view</b>'),
@@ -50,16 +48,19 @@ registry.category("web_tour.tours").add('mass_mailing_code_view_tour', {
5048
trigger: '[name="body_arch"] :iframe .o_mail_wrapper_td',
5149
content: 'Verify that the dropable zone was not removed',
5250
}, {
53-
trigger: '[name="body_arch"] #email_designer_body_elements [name="Title"] .oe_snippet_thumbnail',
54-
content: 'Drag the "Title" snippet from the design panel and drop it in the editor',
55-
async run(helpers) {
56-
helpers.drag_and_drop(`[name="body_arch"] :iframe .o_editable`, {
57-
position: {
58-
top: 340,
59-
}
60-
});
61-
}
51+
trigger: ".o_builder_sidebar_open",
52+
content: "Wait for the html_builder to be visible",
6253
}, {
54+
trigger: '.o_snippet[name="Headings"] button',
55+
content: 'Click the "Headings" snippet category to drop a snippet in the editor',
56+
run: "click",
57+
},
58+
{
59+
trigger: ".modal-body :iframe .o_snippet_preview_wrap:has(.s_title)",
60+
content: "Select the Title Snippet",
61+
run: "click",
62+
},
63+
{
6364
trigger: '[name="body_arch"] :iframe .o_editable h1',
6465
content: 'Verify that the title was inserted properly in the editor',
6566
},

addons/mass_mailing/static/tests/tours/mass_mailing_dynamic_placeholder_tour.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ registry.category("web_tour.tours").add('mass_mailing_dynamic_placeholder_tour',
4444
},
4545
{
4646
content: "Click on the the dynamic placeholder powerBox options",
47-
trigger: '.oe-powerbox-commandName:contains("Dynamic Placeholder")',
47+
trigger: '.o-we-command-name:contains("Dynamic Placeholder")',
4848
run: "click",
4949
},
5050
{

addons/mass_mailing/static/tests/tours/snippets_mailing_menu_toolbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ registry.category("web_tour.tours").add('snippets_mailing_menu_toolbar', {
4141
{ // necessary to wait for the cursor to be placed in the first p
4242
// and to avoid leaving the page before the selection is added
4343
content: "Wait for template selection event to be over.",
44-
trigger: ':iframe .o_editable.theme_selection_done',
44+
trigger: ":iframe .o_editable.note-editable",
4545
run: "click",
4646
},
4747
{

0 commit comments

Comments
 (0)