summaryrefslogtreecommitdiff
path: root/addons/sms/static
diff options
context:
space:
mode:
authorDidier (did) <did@odoo.com>2020-11-05 12:37:15 +0000
committerDidier (did) <did@odoo.com>2020-11-17 08:11:20 +0000
commit69432fbe47f8cf6ca89f018e38961fdeba8b0fc7 (patch)
treeea58dcbca5e2f80013b4ce65493ae1dfb5fa54f6 /addons/sms/static
parent2abc90263fead40223a98f0d2e20b9cd80bd9572 (diff)
[FIX] mail,sms: avoid event propagation on avatar click in message list
Before this commit, when a user click on the author avatar inside the message list, it trigger the o-clicked for the message. task-2341603 closes odoo/odoo#61400 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Co-authored-by: Sébastien Theys <seb@odoo.com>
Diffstat (limited to 'addons/sms/static')
-rw-r--r--addons/sms/static/src/components/message/message_tests.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/sms/static/src/components/message/message_tests.js b/addons/sms/static/src/components/message/message_tests.js
index d0670e2113f..57bc21ab28b 100644
--- a/addons/sms/static/src/components/message/message_tests.js
+++ b/addons/sms/static/src/components/message/message_tests.js
@@ -4,6 +4,7 @@ odoo.define('sms/static/src/components/message/message_tests.js', function (requ
const components = {
Message: require('mail/static/src/components/message/message.js'),
};
+const { makeDeferred } = require('mail/static/src/utils/deferred/deferred.js');
const {
afterEach,
afterNextRender,
@@ -122,6 +123,7 @@ QUnit.test('Notification Sent', async function (assert) {
QUnit.test('Notification Error', async function (assert) {
assert.expect(8);
+ const openResendActionDef = makeDeferred();
const bus = new Bus();
bus.on('do-action', null, payload => {
assert.step('do_action');
@@ -135,6 +137,7 @@ QUnit.test('Notification Error', async function (assert) {
10,
"action should have correct message id"
);
+ openResendActionDef.resolve();
});
await this.start({ env: { bus } });
@@ -179,10 +182,8 @@ QUnit.test('Notification Error', async function (assert) {
'fa-mobile',
"icon should represent sms"
);
-
- await afterNextRender(() => {
- document.querySelector('.o_Message_notificationIconClickable').click();
- });
+ document.querySelector('.o_Message_notificationIconClickable').click();
+ await openResendActionDef;
assert.verifySteps(
['do_action'],
"should do an action to display the resend sms dialog"