summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/message/message_tests.js
diff options
context:
space:
mode:
authorXavier Dubuc <xdu@odoo.com>2020-07-08 11:26:14 +0000
committerXavier Dubuc <xdu@odoo.com>2020-07-22 11:12:35 +0000
commitc43cdd3f192138d2eb74b2035798386ad901d27f (patch)
tree3488c54bdb5175f16af5bbed7eed8154bcf62825 /addons/mail/static/src/components/message/message_tests.js
parent1c2bc40a95cdedd7dcd0ad2f047887ff7278c038 (diff)
[IMP] mail: hide message error notifications if not origin thread
task-2282370 closes odoo/odoo#54768 X-original-commit: 4f693105bcaac7546590302cdc25c2b11b0f42cd Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/message/message_tests.js')
-rw-r--r--addons/mail/static/src/components/message/message_tests.js22
1 files changed, 20 insertions, 2 deletions
diff --git a/addons/mail/static/src/components/message/message_tests.js b/addons/mail/static/src/components/message/message_tests.js
index e1a5872d421..63ee06a4a78 100644
--- a/addons/mail/static/src/components/message/message_tests.js
+++ b/addons/mail/static/src/components/message/message_tests.js
@@ -220,6 +220,12 @@ QUnit.test('Notification Sent', async function (assert) {
assert.expect(9);
await this.start();
+ const threadViewer = this.env.models['mail.thread_viewer'].create({
+ thread: [['create', {
+ id: 11,
+ model: 'mail.channel',
+ }]],
+ });
const message = this.env.models['mail.message'].create({
id: 10,
message_type: 'email',
@@ -229,8 +235,11 @@ QUnit.test('Notification Sent', async function (assert) {
notification_type: 'email',
partner: [['insert', { id: 12, name: "Someone" }]],
}]],
+ originThread: [['link', threadViewer.thread]],
+ });
+ await this.createMessageComponent(message, {
+ threadViewerLocalId: threadViewer.localId
});
- await this.createMessageComponent(message);
assert.containsOnce(
document.body,
@@ -302,6 +311,12 @@ QUnit.test('Notification Error', async function (assert) {
});
await this.start({ env: { bus } });
+ const threadViewer = this.env.models['mail.thread_viewer'].create({
+ thread: [['create', {
+ id: 11,
+ model: 'mail.channel',
+ }]],
+ });
const message = this.env.models['mail.message'].create({
id: 10,
message_type: 'email',
@@ -310,8 +325,11 @@ QUnit.test('Notification Error', async function (assert) {
notification_status: 'exception',
notification_type: 'email',
}]],
+ originThread: [['link', threadViewer.thread]],
+ });
+ await this.createMessageComponent(message, {
+ threadViewerLocalId: threadViewer.localId
});
- await this.createMessageComponent(message);
assert.containsOnce(
document.body,