diff --git a/addons/mail/static/tests/tours/discuss_channel_as_guest_tour.js b/addons/mail/static/tests/tours/discuss_channel_as_guest_tour.js index e6886419ff0..187e39956c0 100644 --- a/addons/mail/static/tests/tours/discuss_channel_as_guest_tour.js +++ b/addons/mail/static/tests/tours/discuss_channel_as_guest_tour.js @@ -1,7 +1,6 @@ /* @odoo-module */ import { registry } from "@web/core/registry"; -import { createFile, inputFiles } from "web.test_utils_file"; registry .category("web_tour.tours") @@ -25,63 +24,7 @@ registry { content: "Check that we are on channel page", trigger: ".o-mail-Thread", - run() { - // Wait for modules to be loaded or failed for the next step - odoo.__DEBUG__.didLogInfo.then(() => { - const { missing, failed, unloaded } = odoo.__DEBUG__.jsModules; - if ([missing, failed, unloaded].some((arr) => arr.length)) { - console.error( - "Couldn't load all JS modules.", - JSON.stringify({ missing, failed, unloaded }) - ); - } - document.body.classList.add( - "o_discuss_channel_as_guest_tour_modules_loaded" - ); - }); - }, - extraTrigger: ".o_discuss_channel_as_guest_tour_modules_loaded", - }, - { - content: "Wait for all modules loaded check in previous step", - trigger: ".o_discuss_channel_as_guest_tour_modules_loaded", - }, - { - content: "Write something in composer", - trigger: ".o-mail-Composer-input", - run: "text cheese", - }, - { - content: "Add one file in composer", - trigger: ".o-mail-Composer button[aria-label='Attach files']", - async run() { - const file = await createFile({ - content: "hello, world", - contentType: "text/plain", - name: "text.txt", - }); - inputFiles(document.querySelector(".o-mail-Composer-coreMain .o_input_file"), [ - file, - ]); - }, - }, - { - content: "Check the earlier provided attachment is listed", - trigger: '.o-mail-AttachmentCard[title="text.txt"]', - extra_trigger: ".o-mail-AttachmentCard:not(.o-isUploading)", // waiting the attachment to be uploaded run() {}, }, - { - content: "Send message", - trigger: ".o-mail-Composer-send", - }, - { - content: "Check message is shown", - trigger: '.o-mail-Message-body:contains("cheese")', - }, - { - content: "Check message contains the attachment", - trigger: '.o-mail-Message .o-mail-AttachmentCard:contains("text.txt")', - }, ], }); diff --git a/addons/mail/static/tests/tours/discuss_public_tour.js b/addons/mail/static/tests/tours/discuss_public_tour.js index 9da90d1d7d3..92e85f99c1f 100644 --- a/addons/mail/static/tests/tours/discuss_public_tour.js +++ b/addons/mail/static/tests/tours/discuss_public_tour.js @@ -9,6 +9,7 @@ registry.category("web_tour.tours").add("mail/static/tests/tours/discuss_public_ { trigger: ".o-mail-DiscussPublic", extraTrigger: ".o-mail-Thread", + run() {}, }, { content: "Check that we are on channel page", @@ -34,6 +35,7 @@ registry.category("web_tour.tours").add("mail/static/tests/tours/discuss_public_ { content: "Wait for all modules loaded check in previous step", trigger: ".o_discuss_channel_public_modules_loaded", + run() {}, }, { content: "Write something in composer", @@ -67,10 +69,12 @@ registry.category("web_tour.tours").add("mail/static/tests/tours/discuss_public_ { content: "Check message is shown", trigger: '.o-mail-Message-body:contains("cheese")', + run() {}, }, { content: "Check message contains the attachment", trigger: '.o-mail-Message .o-mail-AttachmentCard:contains("text.txt")', + run() {}, }, ], });