diff --git a/addons/im_livechat/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js b/addons/im_livechat/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js
index 7ad7f9a0f87..73ce465f094 100644
--- a/addons/im_livechat/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js
+++ b/addons/im_livechat/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js
@@ -15,15 +15,17 @@ QUnit.module('chat_window_manager_tests.js', {
beforeEach(this);
this.start = async params => {
- const { afterEvent, env, widget } = await start(Object.assign(
- { hasChatWindow: true, hasMessagingMenu: true },
+ const res = await start(Object.assign(
+ { hasChatWindow: true },
params,
{ data: this.data }
));
+ const { afterEvent, env, widget } = res;
this.debug = params && params.debug;
this.afterEvent = afterEvent;
this.env = env;
this.widget = widget;
+ return res;
};
},
afterEach() {
@@ -48,7 +50,8 @@ QUnit.test('closing a chat window with no message from admin side unpins it', as
uuid: 'channel-10-uuid',
},
);
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await afterNextRender(() => document.querySelector(`.o_NotificationList_preview`).click());
diff --git a/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js b/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js
index c5ef06a0975..6b988ee921f 100644
--- a/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js
+++ b/addons/im_livechat/static/src/components/messaging_menu/tests/messaging_menu_tests.js
@@ -15,12 +15,13 @@ QUnit.module('messaging_menu_tests.js', {
beforeEach(this);
this.start = async params => {
- let { env, widget } = await start(Object.assign({}, params, {
+ const res = await start(Object.assign({}, params, {
data: this.data,
- hasMessagingMenu: true,
}));
+ const { env, widget } = res;
this.env = env;
this.widget = widget;
+ return res;
};
},
afterEach() {
@@ -38,7 +39,8 @@ QUnit.test('livechats should be in "chat" filter', async function (assert) {
livechat_operator_id: this.data.currentPartnerId,
members: [this.data.currentPartnerId, this.data.publicPartnerId],
});
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
assert.containsOnce(
document.body,
'.o_MessagingMenu',
diff --git a/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js b/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js
index 4c697ddb06f..c5be8007fb0 100644
--- a/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js
+++ b/addons/mail/static/src/components/chat_window_manager/tests/chat_window_manager_tests.js
@@ -21,15 +21,17 @@ QUnit.module('chat_window_manager_tests.js', {
beforeEach(this);
this.start = async params => {
- const { afterEvent, env, widget } = await start(Object.assign(
- { hasChatWindow: true, hasMessagingMenu: true },
+ const res = await start(Object.assign(
+ { hasChatWindow: true },
params,
{ data: this.data }
));
+ const { afterEvent, env, widget } = res;
this.debug = params && params.debug;
this.afterEvent = afterEvent;
this.env = env;
this.widget = widget;
+ return res;
};
},
afterEach() {
@@ -84,7 +86,8 @@ QUnit.test('initial mount', async function (assert) {
QUnit.test('chat window new message: basic rendering', async function (assert) {
assert.expect(10);
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_toggler`).click()
);
@@ -146,7 +149,8 @@ QUnit.test('chat window new message: basic rendering', async function (assert) {
QUnit.test('chat window new message: focused on open [REQUIRE FOCUS]', async function (assert) {
assert.expect(2);
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_toggler`).click()
);
@@ -167,7 +171,8 @@ QUnit.test('chat window new message: focused on open [REQUIRE FOCUS]', async fun
QUnit.test('chat window new message: close', async function (assert) {
assert.expect(1);
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_toggler`).click()
);
@@ -187,7 +192,8 @@ QUnit.test('chat window new message: close', async function (assert) {
QUnit.test('chat window new message: fold', async function (assert) {
assert.expect(6);
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_newMessageButton`).click()
@@ -251,7 +257,7 @@ QUnit.test('open chat from "new message" chat window should open chat in place o
{ is_minimized: true },
);
const imSearchDef = makeDeferred();
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
browser: {
innerWidth: 1920,
@@ -265,6 +271,7 @@ QUnit.test('open chat from "new message" chat window should open chat in place o
return res;
}
});
+ await createMessagingMenuComponent();
assert.containsN(
document.body,
'.o_ChatWindow',
@@ -365,7 +372,7 @@ QUnit.test('new message chat window should close on selecting the user if chat w
state: 'open',
});
const imSearchDef = makeDeferred();
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
async mockRPC(route, args) {
const res = await this._super(...arguments);
if (args.method === 'im_search') {
@@ -374,6 +381,7 @@ QUnit.test('new message chat window should close on selecting the user if chat w
return res;
},
});
+ await createMessagingMenuComponent();
// open "new message" chat window
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
@@ -411,7 +419,7 @@ QUnit.test('new message autocomplete should automatically select first result',
this.data['res.partner'].records.push({ id: 131, name: "Partner 131" });
this.data['res.users'].records.push({ partner_id: 131 });
const imSearchDef = makeDeferred();
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
async mockRPC(route, args) {
const res = await this._super(...arguments);
if (args.method === 'im_search') {
@@ -420,6 +428,7 @@ QUnit.test('new message autocomplete should automatically select first result',
return res;
},
});
+ await createMessagingMenuComponent();
// open "new message" chat window
await afterNextRender(() =>
@@ -453,7 +462,8 @@ QUnit.test('chat window: basic rendering', async function (assert) {
// channel that is expected to be found in the messaging menu
// with random unique id and name that will be asserted during the test
this.data['mail.channel'].records.push({ id: 20, name: "General" });
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_toggler`).click()
@@ -543,7 +553,7 @@ QUnit.test('chat window: fold', async function (assert) {
// channel that is expected to be found in the messaging menu
// with random UUID, will be asserted during the test
this.data['mail.channel'].records.push({ uuid: 'channel-uuid' });
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
mockRPC(route, args) {
if (args.method === 'channel_fold') {
assert.step(`rpc:${args.method}/${args.kwargs.state}`);
@@ -551,6 +561,7 @@ QUnit.test('chat window: fold', async function (assert) {
return this._super(...arguments);
},
});
+ await createMessagingMenuComponent();
// Open Thread
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await afterNextRender(() =>
@@ -597,7 +608,7 @@ QUnit.test('chat window: open / close', async function (assert) {
// channel that is expected to be found in the messaging menu
// with random UUID, will be asserted during the test
this.data['mail.channel'].records.push({ uuid: 'channel-uuid' });
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
mockRPC(route, args) {
if (args.method === 'channel_fold') {
assert.step(`rpc:channel_fold/${args.kwargs.state}`);
@@ -605,6 +616,7 @@ QUnit.test('chat window: open / close', async function (assert) {
return this._super(...arguments);
},
});
+ await createMessagingMenuComponent();
assert.containsNone(
document.body,
'.o_ChatWindow',
@@ -659,13 +671,14 @@ QUnit.test('Mobile: opening a chat window should not update channel state on the
id: 20,
state: 'closed',
});
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
device: {
isMobile: true,
},
},
});
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await afterNextRender(() => document.querySelector(`.o_NotificationList_preview`).click());
assert.containsOnce(
@@ -692,13 +705,14 @@ QUnit.test('Mobile: closing a chat window should not update channel state on the
id: 20,
state: 'open',
});
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
device: {
isMobile: true,
},
},
});
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await afterNextRender(() => document.querySelector(`.o_NotificationList_preview`).click());
assert.containsOnce(
@@ -916,7 +930,8 @@ QUnit.test('chat window: composer state conservation on toggle discuss', async f
// channel that is expected to be found in the messaging menu
// with random unique id that is needed to link messages
this.data['mail.channel'].records.push({ id: 20 });
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_dropdownMenu .o_NotificationList_preview`).click()
@@ -990,7 +1005,8 @@ QUnit.test('chat window: scroll conservation on toggle discuss', async function
res_id: 20,
});
}
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await this.afterEvent({
eventName: 'o-component-message-list-scrolled',
@@ -1065,13 +1081,14 @@ QUnit.test('open 2 different chat windows: enough screen width [REQUIRE FOCUS]',
// 2 channels are expected to be found in the messaging menu, each with a
// random unique id that will be referenced in the test
this.data['mail.channel'].records.push({ id: 10 }, { id: 20 });
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
browser: {
innerWidth: 1920, // enough to fit at least 2 chat windows
},
},
});
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await afterNextRender(() =>
document.querySelector(`
@@ -1184,7 +1201,8 @@ QUnit.test('open 2 chat windows: check shift operations are available', async fu
// 2 channels are expected to be found in the messaging menu
// only their existence matters, data are irrelevant
this.data['mail.channel'].records.push({}, {});
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => {
document.querySelector('.o_MessagingMenu_toggler').click();
@@ -1410,13 +1428,14 @@ QUnit.test('open 3 different chat windows: not enough screen width', async funct
// 3 channels are expected to be found in the messaging menu, each with a
// random unique id that will be referenced in the test
this.data['mail.channel'].records.push({ id: 1 }, { id: 2 }, { id: 3 });
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
browser: {
innerWidth: 900, // enough to fit 2 chat windows but not 3
},
},
});
+ await createMessagingMenuComponent();
// open, from systray menu, chat windows of channels with Id 1, 2, then 3
await afterNextRender(() =>
@@ -1554,7 +1573,8 @@ QUnit.test('chat window: switch on TAB', async function (assert) {
{ id: 1, name: "channel1" },
{ id: 2, name: "channel2" }
);
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_toggler`).click()
@@ -1759,7 +1779,8 @@ QUnit.test('chat window with a thread: keep scroll position in message list on f
res_id: 20,
});
}
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await this.afterEvent({
eventName: 'o-component-message-list-scrolled',
@@ -1872,13 +1893,14 @@ QUnit.test('chat window: post message on non-mailing channel with "CTRL-Enter" k
id: 20,
is_minimized: true,
});
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
device: {
isMobile: true, // here isMobile is used for the small screen size, not actually for the mobile devices
},
},
});
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await afterNextRender(() =>
@@ -1913,7 +1935,8 @@ QUnit.test('chat window with a thread: keep scroll position in message list on t
res_id: 20,
});
}
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await this.afterEvent({
eventName: 'o-component-message-list-scrolled',
@@ -1983,7 +2006,8 @@ QUnit.test('chat window with a thread: keep scroll position in message list on t
res_id: 20,
});
}
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await this.afterEvent({
eventName: 'o-component-message-list-scrolled',
diff --git a/addons/mail/static/src/components/messaging_menu/messaging_menu.js b/addons/mail/static/src/components/messaging_menu/messaging_menu.js
index 032e9a082fc..0d5629fcdd9 100644
--- a/addons/mail/static/src/components/messaging_menu/messaging_menu.js
+++ b/addons/mail/static/src/components/messaging_menu/messaging_menu.js
@@ -30,6 +30,16 @@ export class MessagingMenu extends Component {
*/
_constructor() {}
+ /**
+ * @override
+ */
+ setup() {
+ // for now, the legacy env is needed for internal functions such as
+ // `useModels` to work
+ this.env = owl.Component.env;
+ super.setup();
+ }
+
mounted() {
document.addEventListener('click', this._onClickCaptureGlobal, true);
}
diff --git a/addons/mail/static/src/components/messaging_menu/tests/messaging_menu_tests.js b/addons/mail/static/src/components/messaging_menu/tests/messaging_menu_tests.js
index 756c193a224..6a717ce7a45 100644
--- a/addons/mail/static/src/components/messaging_menu/tests/messaging_menu_tests.js
+++ b/addons/mail/static/src/components/messaging_menu/tests/messaging_menu_tests.js
@@ -18,13 +18,14 @@ QUnit.module('messaging_menu_tests.js', {
beforeEach(this);
this.start = async params => {
- let { discussWidget, env, widget } = await start(Object.assign({}, params, {
+ const res = await start(Object.assign({}, params, {
data: this.data,
- hasMessagingMenu: true,
}));
+ const { discussWidget, env, widget } = res;
this.discussWidget = discussWidget;
this.env = env;
this.widget = widget;
+ return res;
};
},
afterEach() {
@@ -44,10 +45,11 @@ QUnit.test('[technical] messaging not created then becomes created', async funct
assert.expect(2);
const messagingBeforeCreationDeferred = makeTestPromise();
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
messagingBeforeCreationDeferred,
waitUntilMessagingCondition: 'none',
});
+ await createMessagingMenuComponent();
assert.containsOnce(
document.body,
'.o_MessagingMenu',
@@ -78,10 +80,11 @@ QUnit.test('[technical] no crash on attempting opening messaging menu when messa
*/
assert.expect(2);
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
messagingBeforeCreationDeferred: new Promise(() => {}), // keep messaging not created
waitUntilMessagingCondition: 'none',
});
+ await createMessagingMenuComponent();
assert.containsOnce(
document.body,
'.o_MessagingMenu',
@@ -107,7 +110,7 @@ QUnit.test('[technical] no crash on attempting opening messaging menu when messa
QUnit.test('messaging not initialized', async function (assert) {
assert.expect(2);
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
async mockRPC(route) {
if (route === '/mail/init_messaging') {
// simulate messaging never initialized
@@ -117,6 +120,7 @@ QUnit.test('messaging not initialized', async function (assert) {
},
waitUntilMessagingCondition: 'created',
});
+ await createMessagingMenuComponent();
assert.strictEqual(
document.querySelectorAll('.o_MessagingMenu_loading').length,
1,
@@ -136,7 +140,7 @@ QUnit.test('messaging becomes initialized', async function (assert) {
const messagingInitializedProm = makeTestPromise();
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
async mockRPC(route) {
const _super = this._super.bind(this, ...arguments); // limitation of class.js
if (route === '/mail/init_messaging') {
@@ -146,6 +150,7 @@ QUnit.test('messaging becomes initialized', async function (assert) {
},
waitUntilMessagingCondition: 'created',
});
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
// simulate messaging becomes initialized
@@ -164,7 +169,8 @@ QUnit.test('messaging becomes initialized', async function (assert) {
QUnit.test('basic rendering', async function (assert) {
assert.expect(21);
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
assert.strictEqual(
document.querySelectorAll('.o_MessagingMenu').length,
1,
@@ -303,7 +309,8 @@ QUnit.test('counter is taking into account failure notification', async function
mail_message_id: 11, // id of the related message
notification_status: 'exception', // necessary value to have a failure
});
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
assert.containsOnce(
document.body,
@@ -320,7 +327,8 @@ QUnit.test('counter is taking into account failure notification', async function
QUnit.test('switch tab', async function (assert) {
assert.expect(15);
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
assert.strictEqual(
@@ -427,9 +435,10 @@ QUnit.test('switch tab', async function (assert) {
QUnit.test('new message', async function (assert) {
assert.expect(3);
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
hasChatWindow: true,
});
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_toggler`).click()
@@ -456,10 +465,11 @@ QUnit.test('new message', async function (assert) {
QUnit.test('no new message when discuss is open', async function (assert) {
assert.expect(3);
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
autoOpenDiscuss: true,
hasDiscuss: true,
});
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_toggler`).click()
@@ -506,7 +516,8 @@ QUnit.test('channel preview: basic rendering', async function (assert) {
model: 'mail.channel', // necessary to link message to channel
res_id: 20, // id of related channel
});
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
assert.strictEqual(
@@ -603,7 +614,8 @@ QUnit.test('filtered previews', async function (assert) {
res_id: 20, // id of related channel
},
);
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_toggler`).click()
@@ -754,9 +766,10 @@ QUnit.test('open chat window from preview', async function (assert) {
// channel expected to be found in the menu, only its existence matters, data are irrelevant
this.data['mail.channel'].records.push({});
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
hasChatWindow: true,
});
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector(`.o_MessagingMenu_toggler`).click()
@@ -780,7 +793,8 @@ QUnit.test('no code injection in message body preview', async function (assert)
model: "mail.channel",
res_id: 11,
});
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => {
document.querySelector(`.o_MessagingMenu_toggler`).click();
@@ -822,7 +836,8 @@ QUnit.test('no code injection in message body preview from sanitized message', a
model: "mail.channel",
res_id: 11,
});
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => {
document.querySelector(`.o_MessagingMenu_toggler`).click();
@@ -864,7 +879,8 @@ QUnit.test('
tags in message body preview are transformed in spaces', async
model: "mail.channel",
res_id: 11,
});
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() => {
document.querySelector(`.o_MessagingMenu_toggler`).click();
@@ -894,7 +910,7 @@ QUnit.test('
tags in message body preview are transformed in spaces', async
QUnit.test('rendering with OdooBot has a request (default)', async function (assert) {
assert.expect(4);
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
browser: {
Notification: {
@@ -903,6 +919,7 @@ QUnit.test('rendering with OdooBot has a request (default)', async function (ass
},
},
});
+ await createMessagingMenuComponent();
assert.ok(
document.querySelector('.o_MessagingMenu_counter'),
@@ -932,7 +949,7 @@ QUnit.test('rendering with OdooBot has a request (default)', async function (ass
QUnit.test('rendering without OdooBot has a request (denied)', async function (assert) {
assert.expect(2);
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
browser: {
Notification: {
@@ -941,6 +958,7 @@ QUnit.test('rendering without OdooBot has a request (denied)', async function (a
},
},
});
+ await createMessagingMenuComponent();
assert.containsNone(
document.body,
@@ -961,7 +979,7 @@ QUnit.test('rendering without OdooBot has a request (denied)', async function (a
QUnit.test('rendering without OdooBot has a request (accepted)', async function (assert) {
assert.expect(2);
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
browser: {
Notification: {
@@ -970,6 +988,7 @@ QUnit.test('rendering without OdooBot has a request (accepted)', async function
},
},
});
+ await createMessagingMenuComponent();
assert.containsNone(
document.body,
@@ -990,7 +1009,7 @@ QUnit.test('rendering without OdooBot has a request (accepted)', async function
QUnit.test('respond to notification prompt (denied)', async function (assert) {
assert.expect(4);
- await this.start({
+ const { createMessagingMenuComponent } = await this.start({
env: {
browser: {
Notification: {
@@ -1012,6 +1031,7 @@ QUnit.test('respond to notification prompt (denied)', async function (assert) {
}
},
});
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector('.o_MessagingMenu_toggler').click()
@@ -1047,7 +1067,8 @@ QUnit.test('Group chat should be displayed inside the chat section of the messag
channel_type: 'group',
is_pinned: true,
});
- await this.start();
+ const { createMessagingMenuComponent } = await this.start();
+ await createMessagingMenuComponent();
await afterNextRender(() =>
document.querySelector('.o_MessagingMenu_toggler').click()
diff --git a/addons/mail/static/src/components/notification_request/notification_request.xml b/addons/mail/static/src/components/notification_request/notification_request.xml
index f238f4f5c48..6849c2134d2 100644
--- a/addons/mail/static/src/components/notification_request/notification_request.xml
+++ b/addons/mail/static/src/components/notification_request/notification_request.xml
@@ -3,28 +3,30 @@
-