[IMP] mail: update notification_type to match server's default
task-2767820 closes odoo/odoo#85095 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -379,7 +379,7 @@ QUnit.test('sidebar: inbox with counter', async function (assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// notification expected to be counted at init_messaging
|
||||
this.data['mail.notification'].records.push({ res_partner_id: this.data.currentPartnerId });
|
||||
this.data['mail.notification'].records.push({ notification_type: 'inbox', res_partner_id: this.data.currentPartnerId });
|
||||
await this.start();
|
||||
assert.strictEqual(
|
||||
document.querySelectorAll(`
|
||||
@@ -529,6 +529,7 @@ QUnit.test('sidebar: channel rendering with needaction counter', async function
|
||||
// expected needaction notification
|
||||
this.data['mail.notification'].records.push({
|
||||
mail_message_id: 100, // id of related message
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId, // must be for current partner
|
||||
});
|
||||
await this.start();
|
||||
@@ -2346,11 +2347,13 @@ QUnit.test('inbox: mark all messages as read', async function (assert) {
|
||||
// notification to have first message in inbox
|
||||
{
|
||||
mail_message_id: 100, // id of related message
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId, // must be for current partner
|
||||
},
|
||||
// notification to have second message in inbox
|
||||
{
|
||||
mail_message_id: 101, // id of related message
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId, // must be for current partner
|
||||
}
|
||||
);
|
||||
@@ -3209,6 +3212,7 @@ QUnit.test('reply to message from inbox (message linked to document)', async fun
|
||||
// notification to have message in Inbox
|
||||
this.data['mail.notification'].records.push({
|
||||
mail_message_id: 100, // id of related message
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId, // must be for current partner
|
||||
});
|
||||
await this.start({
|
||||
@@ -3347,11 +3351,13 @@ QUnit.test('messages marked as read move to "History" mailbox', async function (
|
||||
// notification to have first message in inbox
|
||||
{
|
||||
mail_message_id: 100, // id of related message
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId, // must be for current partner
|
||||
},
|
||||
// notification to have second message in inbox
|
||||
{
|
||||
mail_message_id: 101, // id of related message
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId, // must be for current partner
|
||||
}
|
||||
);
|
||||
@@ -3466,10 +3472,12 @@ QUnit.test('mark a single message as read should only move this message to "Hist
|
||||
this.data['mail.notification'].records.push(
|
||||
{
|
||||
mail_message_id: 1,
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId,
|
||||
},
|
||||
{
|
||||
mail_message_id: 2,
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId,
|
||||
}
|
||||
);
|
||||
@@ -3589,6 +3597,7 @@ QUnit.test('all messages in "Inbox" in "History" after marked all as read', asyn
|
||||
// notification to have message in Inbox
|
||||
this.data['mail.notification'].records.push({
|
||||
mail_message_id: id, // id of related message
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId, // must be for current partner
|
||||
});
|
||||
|
||||
|
||||
+4
@@ -62,9 +62,11 @@ QUnit.test('channel - counter: should not have a counter if the category is unfo
|
||||
});
|
||||
this.data['mail.notification'].records.push({
|
||||
mail_message_id: 100,
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId,
|
||||
}, {
|
||||
mail_message_id: 200,
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId,
|
||||
});
|
||||
await this.start();
|
||||
@@ -113,9 +115,11 @@ QUnit.test('channel - counter: should have correct value of needaction threads i
|
||||
});
|
||||
this.data['mail.notification'].records.push({
|
||||
mail_message_id: 100,
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId,
|
||||
}, {
|
||||
mail_message_id: 200,
|
||||
notification_type: 'inbox',
|
||||
res_partner_id: this.data.currentPartnerId,
|
||||
});
|
||||
this.data['res.users.settings'].records.push({
|
||||
|
||||
@@ -266,6 +266,7 @@ QUnit.test('counter is taking into account failure notification', async function
|
||||
this.data['mail.notification'].records.push({
|
||||
mail_message_id: 11, // id of the related message
|
||||
notification_status: 'exception', // necessary value to have a failure
|
||||
notification_type: 'email',
|
||||
});
|
||||
const { createMessagingMenuComponent } = await this.start();
|
||||
await createMessagingMenuComponent();
|
||||
|
||||
@@ -171,7 +171,7 @@ export class MockModels {
|
||||
is_read: { string: "Is Read", type: 'boolean', default: false },
|
||||
mail_message_id: { string: "Message", type: 'many2one', relation: 'mail.message' },
|
||||
notification_status: { string: "Notification Status", type: 'selection', selection: [['ready', 'Ready to Send'], ['sent', 'Sent'], ['bounce', 'Bounced'], ['exception', 'Exception'], ['canceled', 'Canceled']], default: 'ready' },
|
||||
notification_type: { string: "Notification Type", type: 'selection', selection: [['email', 'Handle by Emails'], ['inbox', 'Handle in Odoo']], default: 'email' },
|
||||
notification_type: { string: "Notification Type", type: 'selection', selection: [['email', 'Handle by Emails'], ['inbox', 'Handle in Odoo']], default: 'inbox' },
|
||||
res_partner_id: { string: "Needaction Recipient", type: 'many2one', relation: 'res.partner' },
|
||||
},
|
||||
records: [],
|
||||
|
||||
Reference in New Issue
Block a user