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/chat_window_manager | |
| 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/chat_window_manager')
| -rw-r--r-- | addons/mail/static/src/components/chat_window_manager/chat_window_manager_tests.js | 36 |
1 files changed, 18 insertions, 18 deletions
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 16e2f194df3..3306dbed905 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 @@ -325,8 +325,8 @@ QUnit.test('chat window: basic rendering', async function (assert) { "should have part to display thread content inside chat window" ); assert.ok( - chatWindow.querySelector(`:scope .o_ChatWindow_thread`).classList.contains('o_ThreadViewer'), - "thread viewer part should use component ThreadViewer" + chatWindow.querySelector(`:scope .o_ChatWindow_thread`).classList.contains('o_ThreadView'), + "thread part should use component ThreadView" ); }); @@ -391,7 +391,7 @@ QUnit.test('chat window: fold', async function (assert) { assert.containsOnce( document.body, '.o_ChatWindow_thread', - "chat window should have a thread viewer" + "chat window should have a thread" ); assert.verifySteps(['rpc:channel_fold/open']); @@ -401,7 +401,7 @@ QUnit.test('chat window: fold', async function (assert) { assert.containsNone( document.body, '.o_ChatWindow_thread', - "chat window should not have any thread viewer" + "chat window should not have any thread" ); // Unfold chat window @@ -410,7 +410,7 @@ QUnit.test('chat window: fold', async function (assert) { assert.containsOnce( document.body, '.o_ChatWindow_thread', - "chat window should have a thread viewer" + "chat window should have a thread" ); }); @@ -730,23 +730,23 @@ QUnit.test('[technical] chat window: scroll conservation on toggle home menu', a document.querySelector(`.o_MessagingMenu_dropdownMenu .o_NotificationList_preview`).click() ); // Set a scroll position to chat window - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop = 142; + document.querySelector(`.o_ThreadView_messageList`).scrollTop = 142; assert.strictEqual( - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop, + document.querySelector(`.o_ThreadView_messageList`).scrollTop, 142, "chat window initial scrollTop should be 142px" ); await afterNextRender(() => this.hideHomeMenu()); assert.strictEqual( - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop, + document.querySelector(`.o_ThreadView_messageList`).scrollTop, 142, "chat window scrollTop should still be the same after home menu is hidden" ); await afterNextRender(() => this.showHomeMenu()); assert.strictEqual( - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop, + document.querySelector(`.o_ThreadView_messageList`).scrollTop, 142, "chat window scrollTop should still be the same after home menu is shown" ); @@ -1471,9 +1471,9 @@ QUnit.test('chat window with a thread: keep scroll position in message list on f document.querySelector(`.o_NotificationList_preview`).click() ); // Set a scroll position to chat window - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop = 142; + document.querySelector(`.o_ThreadView_messageList`).scrollTop = 142; assert.strictEqual( - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop, + document.querySelector(`.o_ThreadView_messageList`).scrollTop, 142, "verify chat window initial scrollTop" ); @@ -1482,14 +1482,14 @@ QUnit.test('chat window with a thread: keep scroll position in message list on f await afterNextRender(() => document.querySelector('.o_ChatWindow_header').click()); assert.containsNone( document.body, - ".o_ThreadViewer", - "chat window should be folded so no thread viewer should be present" + ".o_ThreadView", + "chat window should be folded so no ThreadView should be present" ); // unfold chat window await afterNextRender(() => document.querySelector('.o_ChatWindow_header').click()); assert.strictEqual( - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop, + document.querySelector(`.o_ThreadView_messageList`).scrollTop, 142, "chat window scrollTop should still be the same when chat window is unfolded" ); @@ -1600,9 +1600,9 @@ QUnit.test('[technical] chat window with a thread: keep scroll position in messa document.querySelector(`.o_MessagingMenu_dropdownMenu .o_NotificationList_preview`).click() ); // Set a scroll position to chat window - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop = 142; + document.querySelector(`.o_ThreadView_messageList`).scrollTop = 142; assert.strictEqual( - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop, + document.querySelector(`.o_ThreadView_messageList`).scrollTop, 142, "should have scrolled to 142px" ); @@ -1613,7 +1613,7 @@ QUnit.test('[technical] chat window with a thread: keep scroll position in messa // unfold chat window await afterNextRender(() => document.querySelector('.o_ChatWindow_header').click()); assert.strictEqual( - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop, + document.querySelector(`.o_ThreadView_messageList`).scrollTop, 142, "chat window scrollTop should still be the same after home menu is hidden" ); @@ -1625,7 +1625,7 @@ QUnit.test('[technical] chat window with a thread: keep scroll position in messa // unfold chat window await afterNextRender(() => document.querySelector('.o_ChatWindow_header').click()); assert.strictEqual( - document.querySelector(`.o_ThreadViewer_messageList`).scrollTop, + document.querySelector(`.o_ThreadView_messageList`).scrollTop, 142, "chat window scrollTop should still be the same after home menu is shown" ); |
