diff --git a/addons/mail/static/src/components/chat_window_manager/chat_window_manager_tests.js b/addons/mail/static/src/components/chat_window_manager/chat_window_manager_tests.js
index fb4c92d70c7..6e284a7156c 100644
--- a/addons/mail/static/src/components/chat_window_manager/chat_window_manager_tests.js
+++ b/addons/mail/static/src/components/chat_window_manager/chat_window_manager_tests.js
@@ -750,7 +750,7 @@ QUnit.test('focus next visible chat window when closing current chat window with
QUnit.test('[technical] chat window: composer state conservation on toggle home menu', async function (assert) {
// technical as show/hide home menu simulation are involved and home menu implementation
// have side-effects on DOM that may make chat window components not work
- assert.expect(6);
+ assert.expect(7);
Object.assign(this.data.initMessaging, {
channel_slots: {
@@ -775,6 +775,11 @@ QUnit.test('[technical] chat window: composer state conservation on toggle home
document.querySelector(`.o_ComposerTextInput_textarea`).focus();
document.execCommand('insertText', false, 'XDU for the win !');
});
+ assert.containsNone(
+ document.body,
+ '.o_Composer .o_Attachment',
+ "composer should have no attachment initially"
+ );
// Set attachments of the composer
const files = [
await createFile({
@@ -803,7 +808,7 @@ QUnit.test('[technical] chat window: composer state conservation on toggle home
document.body,
'.o_Composer .o_Attachment',
2,
- "verify chat window composer initial attachment count"
+ "composer should have 2 total attachments after adding 2 attachments"
);
await this.hideHomeMenu();
diff --git a/addons/mail/static/src/components/chatter/chatter_tests.js b/addons/mail/static/src/components/chatter/chatter_tests.js
index 36b87b65f5d..0b25b9f3d4e 100644
--- a/addons/mail/static/src/components/chatter/chatter_tests.js
+++ b/addons/mail/static/src/components/chatter/chatter_tests.js
@@ -55,6 +55,7 @@ QUnit.module('chatter_tests.js', {
QUnit.test('base rendering when chatter has no attachment', async function (assert) {
assert.expect(6);
+ this.data['res.partner'].records.push({ id: 100 });
const messages = [...Array(60).keys()].map(id => {
return {
author_id: [10, "Demo User"],
@@ -157,6 +158,7 @@ QUnit.test('base rendering when chatter has no record', async function (assert)
QUnit.test('base rendering when chatter has attachments', async function (assert) {
assert.expect(3);
+ this.data['res.partner'].records.push({ id: 100 });
await this.start({
async mockRPC(route, args) {
if (route.includes('ir.attachment/search_read')) {
@@ -200,6 +202,7 @@ QUnit.test('base rendering when chatter has attachments', async function (assert
QUnit.test('show attachment box', async function (assert) {
assert.expect(6);
+ this.data['res.partner'].records.push({ id: 100 });
await this.start({
async mockRPC(route, args) {
if (route.includes('ir.attachment/search_read')) {
@@ -262,6 +265,7 @@ QUnit.test('show attachment box', async function (assert) {
QUnit.test('composer show/hide on log note/send message', async function (assert) {
assert.expect(10);
+ this.data['res.partner'].records.push({ id: 100 });
await this.start();
const chatter = this.env.models['mail.chatter'].create({
threadId: 100,
@@ -343,6 +347,7 @@ QUnit.test('composer show/hide on log note/send message', async function (assert
QUnit.test('should not display user notification messages in chatter', async function (assert) {
assert.expect(1);
+ this.data['res.partner'].records.push({ id: 100 });
this.data['mail.message'].records = [{
author_id: [7, "Demo"],
body: "
-
+