diff --git a/addons/mail/static/src/js/tour.js b/addons/mail/static/src/js/tour.js index 10ee548b00b..6b7160f2aa6 100644 --- a/addons/mail/static/src/js/tour.js +++ b/addons/mail/static/src/js/tour.js @@ -6,21 +6,53 @@ var tour = require('web_tour.tour'); var _t = core._t; -tour.register('mail_tour', [{ +tour.register('mail_tour', { + url: "/web", +}, [tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="mail.menu_root_discuss"]', + content: _t('Want to get in touch with your contacts? Discuss with them here.'), + position: 'right', + edition: 'community', +}, { + trigger: '.o_app[data-menu-xmlid="mail.menu_root_discuss"]', + content: _t('Want to get in touch with your contacts? Discuss with them here.'), + position: 'bottom', + edition: 'enterprise', +}, { trigger: '.o_mail_discuss .o_mail_discuss_sidebar .o_add[data-type="public"]', content: _t("

Channels make it easy to organize information across different topics and groups.

Try to create your first channel (e.g. sales, marketing, product XYZ, after work party, etc).

"), position: 'bottom', +}, { + trigger: '.o_mail_discuss .o_mail_discuss_sidebar .o_mail_add_thread[data-type="public"]', + content: _t("

Create a channel here.

"), + position: 'right', + run: function (actions) { + var t = new Date().getTime(); + actions.text("SomeChannel_" + t, this.$anchor.find("input")); + }, +}, { + trigger: ".ui-menu-item > a", + auto: true, + in_modal: false, }, { trigger: '.o_mail_discuss .o_composer_text_field', content: _t("

Write a message to the members of the channel here.

You can notify someone with '@' or link another channel with '#'. Start your message with '/' to get the list of possible commands.

"), position: "top", width: 350, + run: function (actions) { + var t = new Date().getTime(); + actions.text("SomeText_" + t, this.$anchor); + }, }, { - trigger: ".o_mail_discuss .o_mail_thread .o_thread_message_star", + trigger: '.o_mail_discuss .o_thread_composer .o_composer_button_send', + content: _t("Post your message on the thread"), + position: "top", +}, { + trigger: '.o_mail_discuss .o_mail_thread .o_thread_message_star', content: _t("Messages can be starred to remind you to check back later."), position: "right", }, { - trigger: '.o_mail_discuss .o_mail_item_item[data-thread-id="mailbox_starred"]', + trigger: '.o_mail_discuss .o_mail_discuss_item[data-thread-id="mailbox_starred"]', content: _t("Once a message has been starred, you can come back and review it at any time here."), position: "bottom", }, { diff --git a/addons/test_mail/tests/test_ui.py b/addons/test_mail/tests/test_ui.py new file mode 100644 index 00000000000..f3f38d8a8c4 --- /dev/null +++ b/addons/test_mail/tests/test_ui.py @@ -0,0 +1,10 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +import odoo.tests + + +@odoo.tests.tagged('post_install', '-at_install') +class TestUi(odoo.tests.HttpCase): + + def test_01_project_tour(self): + self.phantom_js("/web", "odoo.__DEBUG__.services['web_tour.tour'].run('mail_tour')", "odoo.__DEBUG__.services['web_tour.tour'].tours.mail_tour.ready", login="admin")