summaryrefslogtreecommitdiff
path: root/addons/snailmail/static/src/components
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-08-28 10:16:37 +0000
committerSébastien Theys <seb@odoo.com>2020-08-28 13:43:54 +0000
commitf9ee1cf5f904116e4d1d70a8eaf4ee1d58b18a3a (patch)
tree89425d0677083bb9489e42d47521c4bcf1e4ff44 /addons/snailmail/static/src/components
parent98e12901c97a67dc87f21647473754cd6f384d4a (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/snailmail/static/src/components')
-rw-r--r--addons/snailmail/static/src/components/message/message_tests.js46
1 files changed, 23 insertions, 23 deletions
diff --git a/addons/snailmail/static/src/components/message/message_tests.js b/addons/snailmail/static/src/components/message/message_tests.js
index 5736cbecf5a..fca1ba5237c 100644
--- a/addons/snailmail/static/src/components/message/message_tests.js
+++ b/addons/snailmail/static/src/components/message/message_tests.js
@@ -46,7 +46,7 @@ QUnit.test('Sent', async function (assert) {
assert.expect(8);
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',
@@ -60,10 +60,10 @@ QUnit.test('Sent', async function (assert) {
notification_status: 'sent',
notification_type: 'snail',
}]],
- originThread: [['link', threadViewer.thread]],
+ originThread: [['link', threadView.thread]],
});
await this.createMessageComponent(message, {
- threadViewerLocalId: threadViewer.localId
+ threadViewLocalId: threadView.localId
});
assert.containsOnce(
@@ -116,7 +116,7 @@ QUnit.test('Canceled', async function (assert) {
assert.expect(8);
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',
@@ -130,10 +130,10 @@ QUnit.test('Canceled', async function (assert) {
notification_status: 'canceled',
notification_type: 'snail',
}]],
- originThread: [['link', threadViewer.thread]],
+ originThread: [['link', threadView.thread]],
});
await this.createMessageComponent(message, {
- threadViewerLocalId: threadViewer.localId
+ threadViewLocalId: threadView.localId
});
assert.containsOnce(
@@ -186,7 +186,7 @@ QUnit.test('Pending', async function (assert) {
assert.expect(8);
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',
@@ -200,10 +200,10 @@ QUnit.test('Pending', async function (assert) {
notification_status: 'ready',
notification_type: 'snail',
}]],
- originThread: [['link', threadViewer.thread]],
+ originThread: [['link', threadView.thread]],
});
await this.createMessageComponent(message, {
- threadViewerLocalId: threadViewer.localId
+ threadViewLocalId: threadView.localId
});
assert.containsOnce(
@@ -263,7 +263,7 @@ QUnit.test('No Price Available', async function (assert) {
return this._super(...arguments);
},
});
- 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',
@@ -278,10 +278,10 @@ QUnit.test('No Price Available', async function (assert) {
notification_status: 'exception',
notification_type: 'snail',
}]],
- originThread: [['link', threadViewer.thread]],
+ originThread: [['link', threadView.thread]],
});
await this.createMessageComponent(message, {
- threadViewerLocalId: threadViewer.localId
+ threadViewLocalId: threadView.localId
});
assert.containsOnce(
@@ -349,7 +349,7 @@ QUnit.test('Credit Error', async function (assert) {
return this._super(...arguments);
},
});
- 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',
@@ -364,10 +364,10 @@ QUnit.test('Credit Error', async function (assert) {
notification_status: 'exception',
notification_type: 'snail',
}]],
- originThread: [['link', threadViewer.thread]],
+ originThread: [['link', threadView.thread]],
});
await this.createMessageComponent(message, {
- threadViewerLocalId: threadViewer.localId
+ threadViewLocalId: threadView.localId
});
assert.containsOnce(
@@ -440,7 +440,7 @@ QUnit.test('Trial Error', async function (assert) {
return this._super(...arguments);
},
});
- 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',
@@ -455,10 +455,10 @@ QUnit.test('Trial Error', async function (assert) {
notification_status: 'exception',
notification_type: 'snail',
}]],
- originThread: [['link', threadViewer.thread]],
+ originThread: [['link', threadView.thread]],
});
await this.createMessageComponent(message, {
- threadViewerLocalId: threadViewer.localId
+ threadViewLocalId: threadView.localId
});
assert.containsOnce(
@@ -539,7 +539,7 @@ QUnit.test('Format 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',
@@ -554,10 +554,10 @@ QUnit.test('Format Error', async function (assert) {
notification_status: 'exception',
notification_type: 'snail',
}]],
- originThread: [['link', threadViewer.thread]],
+ originThread: [['link', threadView.thread]],
});
await this.createMessageComponent(message, {
- threadViewerLocalId: threadViewer.localId
+ threadViewLocalId: threadView.localId
});
assert.containsOnce(
@@ -627,11 +627,11 @@ QUnit.test('Missing Required Fields', 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: [['insert', { id: 20, model: 'res.partner' }]],
});
const message = this.env.models['mail.message'].find(message => message.id === 10);
- await this.createMessageComponent(message, { threadViewerLocalId: threadViewer.localId });
+ await this.createMessageComponent(message, { threadViewLocalId: threadView.localId });
assert.containsOnce(
document.body,