diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-08-28 10:16:37 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-08-28 13:43:54 +0000 |
| commit | f9ee1cf5f904116e4d1d70a8eaf4ee1d58b18a3a (patch) | |
| tree | 89425d0677083bb9489e42d47521c4bcf1e4ff44 /addons/mail/static/src/components/message/message_tests.js | |
| parent | 98e12901c97a67dc87f21647473754cd6f384d4a (diff) | |
[FIX] mail, *: rename thread viewer to thread view
The "viewer" should be the "parent" not the view itself. This distinction will
become important in a future commit to allow viewers to not display the view in
some situations.
Rename done as a standalone commit to ease diff readability.
Part of task-2310623
closes odoo/odoo#56737
X-original-commit: 1b811e6a972d72de02965adda67c5b039bee023f
Related: odoo/enterprise#12756
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@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.js | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/addons/mail/static/src/components/message/message_tests.js b/addons/mail/static/src/components/message/message_tests.js index 7f10771ce0d..cc2764389f0 100644 --- a/addons/mail/static/src/components/message/message_tests.js +++ b/addons/mail/static/src/components/message/message_tests.js @@ -189,7 +189,7 @@ QUnit.test('Notification Sent', async function (assert) { assert.expect(9); await this.start(); - const threadViewer = this.env.models['mail.thread_viewer'].create({ + const threadView = this.env.models['mail.thread_view'].create({ thread: [['create', { id: 11, model: 'mail.channel', @@ -204,10 +204,10 @@ QUnit.test('Notification Sent', async function (assert) { notification_type: 'email', partner: [['insert', { id: 12, name: "Someone" }]], }]], - originThread: [['link', threadViewer.thread]], + originThread: [['link', threadView.thread]], }); await this.createMessageComponent(message, { - threadViewerLocalId: threadViewer.localId + threadViewLocalId: threadView.localId }); assert.containsOnce( @@ -280,7 +280,7 @@ QUnit.test('Notification Error', async function (assert) { }); await this.start({ env: { bus } }); - const threadViewer = this.env.models['mail.thread_viewer'].create({ + const threadView = this.env.models['mail.thread_view'].create({ thread: [['create', { id: 11, model: 'mail.channel', @@ -294,10 +294,10 @@ QUnit.test('Notification Error', async function (assert) { notification_status: 'exception', notification_type: 'email', }]], - originThread: [['link', threadViewer.thread]], + originThread: [['link', threadView.thread]], }); await this.createMessageComponent(message, { - threadViewerLocalId: threadViewer.localId + threadViewLocalId: threadView.localId }); assert.containsOnce( @@ -346,7 +346,7 @@ QUnit.test("'channel_fetch' notification received is correctly handled", async f ], model: 'mail.channel', }); - const threadViewer = this.env.models['mail.thread_viewer'].create({ thread: [['link', thread]] }); + const threadView = this.env.models['mail.thread_view'].create({ thread: [['link', thread]] }); const message = this.env.models['mail.message'].create({ author: [['link', currentPartner]], body: "<p>Test</p>", @@ -354,7 +354,7 @@ QUnit.test("'channel_fetch' notification received is correctly handled", async f originThread: [['link', thread]], }); - await this.createMessageComponent(message, { threadViewerLocalId: threadViewer.localId }); + await this.createMessageComponent(message, { threadViewLocalId: threadView.localId }); assert.containsOnce( document.body, @@ -402,14 +402,14 @@ QUnit.test("'channel_seen' notification received is correctly handled", async fu ], model: 'mail.channel', }); - const threadViewer = this.env.models['mail.thread_viewer'].create({ thread: [['link', thread]] }); + const threadView = this.env.models['mail.thread_view'].create({ thread: [['link', thread]] }); const message = this.env.models['mail.message'].create({ author: [['link', currentPartner]], body: "<p>Test</p>", id: 100, originThread: [['link', thread]], }); - await this.createMessageComponent(message, { threadViewerLocalId: threadViewer.localId }); + await this.createMessageComponent(message, { threadViewLocalId: threadView.localId }); assert.containsOnce( document.body, @@ -457,14 +457,14 @@ QUnit.test("'channel_fetch' notification then 'channel_seen' received are corre ], model: 'mail.channel', }); - const threadViewer = this.env.models['mail.thread_viewer'].create({ thread: [['link', thread]] }); + const threadView = this.env.models['mail.thread_view'].create({ thread: [['link', thread]] }); const message = this.env.models['mail.message'].create({ author: [['link', currentPartner]], body: "<p>Test</p>", id: 100, originThread: [['link', thread]], }); - await this.createMessageComponent(message, { threadViewerLocalId: threadViewer.localId }); + await this.createMessageComponent(message, { threadViewLocalId: threadView.localId }); assert.containsOnce( document.body, @@ -537,14 +537,14 @@ QUnit.test('do not show messaging seen indicator if not authored by me', async f ]]], model: 'mail.channel', }); - const threadViewer = this.env.models['mail.thread_viewer'].create({ thread: [['link', thread]] }); + const threadView = this.env.models['mail.thread_view'].create({ thread: [['link', thread]] }); const message = this.env.models['mail.message'].insert({ author: [['link', author]], body: "<p>Test</p>", id: 100, originThread: [['link', thread]], }); - await this.createMessageComponent(message, { threadViewerLocalId: threadViewer.localId }); + await this.createMessageComponent(message, { threadViewLocalId: threadView.localId }); assert.containsOnce( document.body, @@ -574,7 +574,7 @@ QUnit.test('do not show messaging seen indicator if before last seen by all mess }]], model: 'mail.channel', }); - const threadViewer = this.env.models['mail.thread_viewer'].create({ thread: [['link', thread]] }); + const threadView = this.env.models['mail.thread_view'].create({ thread: [['link', thread]] }); const lastSeenMessage = this.env.models['mail.message'].create({ author: [['link', currentPartner]], body: "<p>You already saw me</p>", @@ -601,7 +601,7 @@ QUnit.test('do not show messaging seen indicator if before last seen by all mess }, ]]], }); - await this.createMessageComponent(message, { threadViewerLocalId: threadViewer.localId }); + await this.createMessageComponent(message, { threadViewLocalId: threadView.localId }); assert.containsOnce( document.body, @@ -649,14 +649,14 @@ QUnit.test('only show messaging seen indicator if authored by me, after last see }]], model: 'mail.channel', }); - const threadViewer = this.env.models['mail.thread_viewer'].create({ thread: [['link', thread]] }); + const threadView = this.env.models['mail.thread_view'].create({ thread: [['link', thread]] }); const message = this.env.models['mail.message'].insert({ author: [['link', currentPartner]], body: "<p>Test</p>", id: 100, originThread: [['link', thread]], }); - await this.createMessageComponent(message, { threadViewerLocalId: threadViewer.localId }); + await this.createMessageComponent(message, { threadViewLocalId: threadView.localId }); assert.containsOnce( document.body, |
